Designing and Building a Bed Monitoring System for hospital useFollow article
How do you feel about this article? Help us to provide better content for you.
Thank you! Your feedback has been received.
There was a problem submitting your feedback, please try again later.
What do you think of this article?
So far in my posts documenting the making of my bed monitoring system, I have covered writing the code and designing the circuits for a device that integrates a moisture sensor and a weighing mechanism, and made a custom acrylic case for these. The device logs a patient’s weight and a bed status of wet/dry to a CSV file that can subsequently be displayed in graph format, but also in the case of a wet bed, turns on an LED corresponding to the bed number on a LED bank located at a nurse’s station. The aim is to make a system that can be utilised in a hospital environment as wet beds increase the risk, severity, care time and cost of pressure sores. The hope is to reduce these aspects, which will in turn mean a speedier recovery and a better experience, and save some money in the process. It should also greatly benefit the patients and the nurses alike. Patient’s dignity in upheld through not having to ask publicly for help and those that are bedbound don’t have to get out of bed to be weighed several times a day to be able to quantitate their doses. It should also be a great tool for nurses to save them time and track some of the information they need. It’s all coming to a head now and the only thing I have to do is to solder all of my components to a prototyping board and assemble it. It’s the moment of truth and the pressure is on. Plus, being a bunglemsome lefty, soldering is not one of my strong points. The whole right handed world is against us, but that’s a different blog entirely. Here I’m just going to look at soldering the prototyping board, and my sensors and bringing it all together.
The Prototyping board
To minimise my chances of totally botching up my prototyping board — which I did anyway — I planned my prototyping by drawing countless plans and layouts before I started. First of all I combined my moisture sensor circuit, the IN1255P amplifier circuit and my MCP3008 analogue to digital converter circuit into one. That can be seen on the fritzing shot below.
I then used the Adafruit prototyping board for the Raspberry Pi to solder it in the hopes of creating a more professional prototype.
The board itself is half breadboard half perf board allowing for the use of DIP chips and sensors etc. There are screw blocks so you can make the sensors semi-permanent — something I decided against, but I’ll come back to that later. It is worth noting that this kit is best used for the Raspberry Pi Model A or Model B. You can use it with any "2x20 GPIO type" Pi (A+, B+, Zero, Pi 2, Pi 3) but only the 'top 26 pins' will be available for use. Luckily this didn’t affect me, but if your using those in any projects your undertaking a little re-jigging will need to be done. I drew out my set up on countless pieces of paper before I had one that I got right and then I set about soldering.
Above you can see a half way through stage as it was starting to come together. Once I’d finished that I started on my sensors.
At this stage I could have just soldered the sensors or used the screw pins, but I wanted to do a little more than that. Even though the casing for the prototype was open sided, I still wanted to make it as close to a final functioning device as I could, including sockets that meant that both the moisture sensor and the weight cell could be taken out and replaced easily if broken etc. I didn’t want to create a prototype that seemed really cheap to produce, but then once you started to develop it and add in hospital environment standards the price sky-rocketed; I wanted to be as accurate as I could from the outset. I chose IP rated sockets, and selected a 3-way panel mount socket and cable mounted plug for the moisture sensor, and 4-way panel mount socket and cable mounted plug for the weight cell. Below are a few pictures of the soldering process for my moisture sensor
The sensor terminated in very fine wire which was sewn into a piece of cloth. This is obviously not ideal, but for the purposes of the prototype was fine.
I then mounted my Raspberry Pi and the prototyping board and put the case together.
The nurse’s station was a similar process.
My prototype was now complete.
Connecting the Sensor to the station
To send information from the sensor to the nurse’s station I looked into a few different messaging systems. Message Queuing Telemetry Transport (MQTT) was introduced in 1999 by IBM. MQTT is a straightforward messaging protocol for machine-to-machine (M2M) communications that permits the transfer of data in the form of messages. Data Distribution Service for Real-Time systems (DDS) was another option. DDS and MQTT share some factors, such as frugality and efficiency, temporal decoupling and anonymity, but each have some inimitable features that make it more, or less suitable to a certain job. MQTT is most suitable for intermittent messages whereas DDS is most suitable for those applications that require real-time data exchange. While both have Raspberry Pi library’s that can simply be imported and used, as stated before the MQTT is pretty straightforward, and where DDS provides support for both Device-to-Cloud (Device-to-Data Centre) communication as well as Device-to-Device, MQTT provides very good support for Device-to-Data Centre communication. Since I am looking to send lots of information to one centre this appears to be the best solution. Coding can be written much in the same style as my previous code that controlled my bed monitor in my previous post. The bed monitor would run and the nurses station would send out a message to the bed monitors to return it the data regarding the beds status and patient’s weight, this would then the returned and logged on the central nurse’s station to a file or SD card etc.
Completing the project
Over the course of starting to intern at AB open and undertaking this project, I’ve learned more here than I did in my whole time in formal education. Well, that might be a slight exaggeration, but only slight. In such a short time, I’ve gone from never having even heard of Python to being able to understand functions, strings etc, to look at code and understand its purpose and write my own code. I’ve learned a lot about industry standards, do’s and don’ts, especially within prototyping. Though by no means an expert as you’ve seen, I’ve improved my soldering techniques, learned to laser cut, learnt about the design process as a whole and enjoyed myself along the way. I’ve added a few strings to my bow and I can’t wait to use them in future projects.