Weight, Height and BMI - project using microcontroller

Post Reply
knut_ny
Posts: 8
Joined: Fri Mar 30, 2012 3:56 am

Weight, Height and BMI - project using microcontroller

Post by knut_ny » Sat Mar 31, 2012 12:26 am

Build a BMI measuring scale using these parts:
A (defective) electronic bathroom scale for loadcells , microcontroller (Arduino?), Ultrasonic sensor (e.g. SR04), LCD-display (e.g.1602), dual Rail-to-Rail OpAmp (e.g. one TS912) , Resistors and connecting wire.

The scale has a loadcell in each corner. These are to be wired as picture shows.
Oposite corners are connected i paralell. The wires are connected such that U1 drops and U2 increases when scale takes load.
Image
Power the scale. (e.g.5V) Measure the voltage between U1 and U2. This can show 0V when no load is present. (but : it my case it was 3mV)
Then load the scale with your body (say 60kg). Read the voltage again. If i rises to, say 8mV - it great!
Now we can assume that 120kgs will give a voltage differance of 10mV.
Amplify this 470 times to span of 4.7 V , which is suitable for my op-amp and an analog input on microcontroller.
(you can use other values for the resistors. R2 = R3 and R1=R4 , R4/R3 = times amplification you want)
Image
The most positive voltage connects to V2, so Vout rises when load is added on the scale.

Calibrating your scale:
Read value from DAC with no load.
void loop() {
int raw=analogRead(port);
serial.println(raw);}
// say it shows 96
next: put yourself on scale and rerun program
void loop() {
int raw=analogRead(port)-96;
serial.println(raw); }
// say it shows 630.. and you know i should show your actual weight of 60
final:
void loop() {
int raw=analogRead(port)-96;
float result=60.0*raw/630.0;
serial.println(result); }
// shows weight!

---------------------------------
Next part is to connect Ultrasonic (you will find lot of examples elsewhere). We mounted it on a stick hanging from the roof at about 2m over the scale)
Programming is simple:
read h=distance to top of head (in cm). (200 - distance = height (cm))
float hh=1.0*h*h/10000.0
------------------------------------
float BMI = result/hh
Display all results om LCD

This was a school project for my students. It works nice and easy..

Bepapargo
Posts: 1
Joined: Tue Aug 21, 2012 10:35 am
Location: Israel
Contact:

Yes

Post by Bepapargo » Tue Aug 21, 2012 10:51 am

+1. this is very interesting

Post Reply