Sunday, August 9, 2015

Our Finished Product (Voila!)

The Arduino and relay in action

We have finally reached the end of our programming journey with the Bed Control apps. We first had to strip the wires of a serial cable in order to connect them to the relay pins. We diagrammed which wires went to which connections and figured out which functions we wanted them to perform.
We then attached them to the relay board. The serial plug will ultimately be connected to the bed itself, allowing for both manual control (with the already-existing buttons to push) and voice control of the bed.
The serial plug that connects to the bed and relays
Above: the iPad app interface
Below: the Arduino (behind) and relay board system

To sum everything up, here's how our project works:

1. Mom tells Siri "Hey Siri, open Bed Up" (or Bed Down, Knees Up, or Knees Down)
2. The app entitled Bed Up opens, which contains a simple program that causes the iPad to send a Bluetooth signal to the Arduino (the red-colored board in these pictures), which is running a script to constantly check for the iPad signal
3. This in turn tells the Arduino to send an electric current to the pin that is attached to the wire that controls the bed up function
4. The current travels from that wire (see green wires above) to the relay board (white board above), where it is carried through traces underneath the board to the designated relay (the yellow rectangles)
5. The current triggers a switch in the relay to close a circuit, which allows the electrons to flow to a designated wire of the serial plug (see colorful wires in above image)
6. The electricity flows through a colored wire to the bed controller, into which the serial plug is plugged. This causes the bed to tilt up for 5 seconds, after which the Arduino is programmed to set the pin low again, cutting off the electricity and stopping the bed's motion.
All of this happens in a matter of seconds!
See the software interface for the iPad app above (it was not essential to have so many options, but it allows for manual testing. The program connects to the Arduino automatically, so pushing the buttons on the interface is not needed in order for the program to work).
Mom is now happily able to control this simple aspect of her life, making herself more comfortable in bed without having to rely on us to push the button for her to tilt the bed.


No comments:

Post a Comment