A while back I did a post about controlling a hospital bed with a robotic button pusher and then voice activating it:
That can be a useful method if for some reason the bed controls can not or should not be modified. But in cases where you can modify the bed controls, this can simplify the solution and remove some possible points of failure. Here’s a video of one implementation in action:
The individual I built this for had great voice recognition success with Amazon Echo and was already using that for other things like controlling lights in her apartment so for this first go that’s what we also used to control the bed. Similar to my voice activated window shade project, voice commands are picked up by Echo and sent to a Photon board via IFTTT:
Even though the bed is now voice activated, there are times an aide will want to still be able to control the bed with a controller for more direct control. Also if there’s some issue with the voice activation you want a fallback. To facilitate this I repurposed the controller as an input to the new system. In this way both voice and the controller can control the bed.
Here are some closeups of the electronics now controlling the bed. These electronics perform the same functions that the original bed controls did but these can also be activated by voice. The original controller simply had relays in it that were button actuated. This new setup also has a set of relays wired up the same way to the bed control wiring which I unsoldered from the original controller circuit board. These new relays are controlled by an Arduino.
Original Bed Control Wiring
For each of the movements, the corresponding wire should connect to GND when OFF, and connect to VDD when ON.
- Lt Blue -> S1 -> Head Up
- Dk Blue -> S2 -> Head Down
- Pink -> S3 -> Feet Up
- Purple -> S4 -> Feet Down
- Yellow -> S5 -> Bed Up
- Brown -> S6 -> Bed Down
- White -> GND
- Green -> VDD
Below is the main motor under the bed including the cable to the bed controls and the cable to the secondary motor. NOTE: kept in the room is a second unmodified bed controller. If for some reason the new setup breaks, it can be unplugged and the unmodified controller can be plugged in to replace it until a repair is made. As much as possible fallbacks must be in place so the user is not stuck in a bad situation.
This particular setup does have several dependencies and risks which must be evaluated for the the user’s exact situation. First are the network dependencies which amount to the internet connection in the user’s living space, the WiFi router, Amazon’s Alexa servers, IFTTT’s servers, and Particle’s servers. If any of these are down, the bed will not operate by voice until those are restored. Note that there are several means of voice recognition that do not rely on the internet, but those must be evaluated with the particular user.
Lastly, the outcome of a malfunction must be understood and weighed, in this case the bed moving when it shouldn’t, or not moving when it should. If a malfunction would only be inconvenient, that’s a different conversation than if a malfunction would be harmful.