Introduction: Nutrition Monitor for the Elderly
This is a nutrition monitor for the elderly. It calculates a malnutrition score based off of body mass index and the daily food intake. This score can then be accessed on a remote dashboard by a guardian, and be alerted if the score exceeds a threshold.
The daily food intake is measured in an unobtrusive way by automatically weighing the food placed on modules. This weight is sent to an application, which then uploads the data to the internet.
An Arduino is running a program using our ‘NutriModule’ library. This monitors the weight sensors, buttons, and controls the LEDs. Relevant data is sent to the application, written in Processing. In this application, the nutrition score is calculated, and data is sent to ThingSpeak. If the nutrition score exceeds a threshold, an alert is sent through Twitter.
In this Instructable, we will show you how to make your own. Let’s get started!
List of electronics:
- Arduino Pro Mini
- Tactile buttons (x3)
- Red LEDs (x3)
- 100 ohm resistors (x3)
- 1 mega ohm resistors (x2)
- 10K ohm resistors (x8)
List of supplies:
- Aluminum tape
- Conductive foam
- Solid core wire
- Stranded wire
- Hot glue
Nutrition Support for Adults (accessed Feb. 2, 2014)
Malnutrition Universal Screening Tool (accessed Feb. 2, 2014)
Step 1: DIY Force Sensitive Resistors
To be able to sense the change in weight of the food, we will need a sensor to measure the force applied to it. As an alternative to purchasing a force sensitive resistor (FSR), we decided to make our own.
Cut a piece of conductive foam to however large you want the sensitive area to be. We used ~1cm x 3cm
Cut two pieces of cardboard the same size
Cover the cardboard with one piece of aluminum tape. Cut the excess away, leaving a small (~1cm x 1cm) tab on the end.
Add two dots of hot glue to opposite ends on the conductive foam. Glue it to the aluminum foil - cardboard piece
Do the same with the remaining piece
Curl the ends of two solid core wires
Place the curled end of the wire onto the cardboard and fold the tab over it
Use hot glue to secure the folded tab onto the wire. It should not come loose.
Repeat for the remaining cardboard piece
Test your new force sensitive resistor by shaking it so that it will not come loose or fall apart.
Repeat these steps for however many FSRs you want to make
Step 2: Front Panels
In order to indicate the status of the food module to the person, there needs to be an LED. There also has to be a reset button for when initializing the weights of the food.
Solder two wires to a tactile button. Make sure to solder to the legs that are on the same side of the button. You can clip the other two legs off. Do this for the three buttons.
Solder two wires to a LED. Make sure to remember which leg is positive. Do this for the three LEDs.
Cut a piece of cardboard and mark on it the module name, and labels for the LED and button (status and reset, respectively). Create a hole where the wires will go through for the LED and button.
Slide the wires through the holes and secure the components in place with hot glue.
Repeat these steps for all three module face plates.
Step 3: Module Construction
The food needs to be placed on a unit that can house the force sensitive resistor, without making the food become unbalanced and cause a spill. The shape of each food module can also lend a cue as to what food should be placed in it.
Grab some cardboard and cut it into the shape you want your module as. This will be the base plate.
Place the force sensitive resistor in a position that will be compressed by the food.
Add small ‘blocks’ of cardboard to the base plate. The height of the blocks should be to about half of the height of the FSR.
Now create the over-plate that will go over these small blocks, and have a hole cut out for the FSR to appear through.
Glue the over-plate to the blocks on the base plate.
Create some borders to add to the over-plate. This will prevent the food from accidentally becoming unbalanced.
Repeat these steps for the three modules.
Step 4: Wiring & Electronics
Now it is time to wire up all of the electronics. We included a breadboard diagram to show more clearly what all of the wires are leading to. Be sure that all of your wires are long enough to reach the breadboard. You will have to solder longer wires onto the FSRs.
Follow the breadboard diagram for how to wire the electronics.
Step 5: Arduino Library & Code
We created a library for Arduino that will make it easier to add and adjust each of the modules. The NutriModule library handles filtering the sensor data for each module (up to 4 sensors per module). It also runs a state machine that handles the updating of the modules.
Download the NutriModule library and install it into your /Arduino/libraries directory.
This library depends on the Streaming library, be sure to download and install it as well.
Open the example sketch and upload it to your Arduino.
Step 6: Application Code (Processing)
We use an application as a gateway for the monitor to send the data to the internet. This application was written in Processing, and is available on most operating systems. You can skip this step if you will be using a wireless module on the Arduino to send the data to the internet.
Download the Processing sketch.
You will also need the to download and install controlP5 library. (This is for the GUI).
The variables that you will have to replace with your own variables are all at the top of the sketch. For reference, they are APIKEY, THINGTWEET_KEY, MASS_LB and HEIGHT_IN.
Run the Processing sketch.
Here is a description of what each group in the interface does:
Connection- Select which port your Arduino is on and press Connect for Processing to start listening to the data that Arduino is sending
Simulate- Press one of these buttons to remove a small amount of food from the current food level, for that specific module
Control- Next day iterates to the next time frame. This means the MUST score will be calculated freshly with any food changes, and the daily portion remaining will also be updated. Refill food sets the current food levels back to 100.
Current food levels- Displays the current amount of food on the modules.
Daily portion remaining- Displays the percent of food left to be eaten in order to have eaten the same portion as yesterday.
M.U.S.T. score- This is the malnutrition score. It is calculated based on the person’s BMI, and their food intake for today. For more details on how this is calculated, check out the function calculateMUST() (in the ‘Nutrition’ tab).
If you are interested in poking around the code, there are some interesting simulations that can be run (in the ‘Simulations’ tab). Be sure to set SIMULATE = true before running the sketch to start your simulation.
Step 7: Remote Dashboard With ThingSpeak
The remote dashboard allows for an easy experience to view the data and malnutrition score, all in one place, accessible from anywhere. The data from the application is uploaded onto a website called ThingSpeak. This is where you can access the graphs.
Here is a rough guide on how to create a similar remote dashboard:
Log in to your ThingSpeak account, and look at all of the graphs.
Press the pencil icon above the graph in the toolbar. Adjust the minimum and maximum values for each graph, and label the axes. You may want to limit the number of data points, as it can make your browser laggy (especially x7 graphs).
Press the comment icon above the graph in the toolbar. Copy the embed code.
Create a new html file, add your standard boilerplate html, and then paste the embed code.
Repeat for the other graphs. Stylize the page and make it yours.
In order to send the alerts out, we use Twitter. ThingSpeak has a plug-in that allows for easy twitter communication using their own API. To get started with this part, see the ThingTweet page.
Step 8: Conclusion
There are many more ways to further modify this hack. For example:
- Add wireless radios to broadcast data to internet
- Improve force sensitive resistors
- Create a futuristic ‘mat’ that can determine their shapes and weigh the food
- Improved calculation of malnutrition
This remote nutrition monitor for the elderly is a step in the direction of being able to be more aware of ourselves by using sensors placed in our homes.
With the nutrition monitor, a problem can be addressed in a few days, rather than many months.
Create the future!