Professional Documents
Culture Documents
Bio Analyzer Project
Bio Analyzer Project
REPORT 1
Bio Analyzer
Team Leader
Saud Alali H00228805
Team Member
Abstract
BMI stands for Body Mass Index. It is uses your height and weight to give you an
idea of whether you are underweight, overweight or have an ideal weight. Also, the pulse
sensor will shows your heart beat wither it’s high low or medium. Then math calculations
will be applied to display your result. This Health Monitor will be controlled by a
AruidnoUNO microcontroller using load cells, ultrasonic sensors and heart pulse sensor.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 3
Table of Contents
1.0 Introduction....................................................................................................................4
6.0 Conclusion.....................................................................................................................9
References..........................................................................................................................10
Appendix............................................................................................................................10
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 4
1.0 Introduction
Figure 1
A future plan was to add a database and keypad for the design, unfortunately we
ran out of time and didn’t find someone to create a database. Also, to add a function that
measure a blood pressure using a pressure sensor.
Firstly we will turn on the microcontroller. When the Arduino is on, the LCD also
will turn on and it will display a message to with four lines for height, weight, heart beat
pulse and the BMI result. Now stand on the load cell platform and press the reset bottom.
It might takes some time to show stable result and calculating for your weight by load
cell and height by the ultrasonic sensor. After while the result of the BMI will be reveal
on the LCD. There is an LED that will synchronize the light with your heartbeat as a
flash.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 5
The figure below illustrate the design and schematic for printed circuit board that
we used for the project:
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 6
Input
Process Output
Load cell LED light
Ultrasonic sensor Microcontroller
LCD display
Pulse sensor Arduino uno
Ultrasonic
Push bottom
LED
Load cell
Light
Pulse
LCD Microcontroller sensor
Display Arduino UNO
Ultrasonic
sensor
Ultrasonic
Push
bottom
PC
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 7
Initialization
Push
bottom
Pulse
sensor
Load cell
Ultrasonic
Sensor
Calculate
Height ,
Weight ,
No
BMI , Yes
HB.
LED
Light
Ultrasonic
LCD
Display
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 8
we made a block diagrams to explain how the system will operate in the
project. It will show the general idea of the project by knowing the input, the
output devices and the controlled device. Each block above is define below:
( Start ) Block:
This is an example of input device that we used to clear the LCD display result.
This is an example of input device that we used to measure the heart beats .
This is an example of the input ( load cell )which measure the weight in the program.
( calculation # ? ) Block :
This is an example of the process that that make the calculation of inputs reading in the
program.
( Display ) Block :
This is an example of output display that will show the result after processing in the
software.
( LED ) Block :
This is an example of LED that will blink synchronize with pulse sensor showing
heartbeat.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 9
Load cell (stain gauge) : Firstly, we purchased a load cell with 3 wires only from
a local supplier. We tried to detect the change in voltage to determine the weight,
but the voltage change in Adruino is very small and can’t be recognize without
amplifying the voltage. We weren’t able to buy this amplifier 8-pin LM741CN
Op-Amp online due to long shipping time. So Mr.Cezar brought a load cell
CZL601 strain gauge that was previously used by others. We started to look for
the 4 colors wires and how we can connect it to the Arduino. Later, we tested it by
applying and external outsource 5 volt and see the changes on voltage, it was very
tiny but we add 8 pins LM741 Op-Amp. the we started to write the code and
then calibrate the weighting scale, its originally 0 at almost 416.
Ultrasonic sensor and LCD 20x4 : Arduino software has ping code and liquid
Crystal for LCD code ready, so used and modified it for to meet the project needs.
Pulse sensor : the code was ready to use on the Arduino website so we modified
it to meet the project needs.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 10
6.0 Conclusion
Working on this project was an immense step in our path to be engineers. They faced
some of issues and we tried to solve them as which show it’s a normal issues that can
happen in the coursework of any project. Finishing this project as a team helped us to
understand the importance of teamwork and coming up with ways to be able to work
effectively with my colleague. We tried our best to include details of the project in the
document correctly although there is a probability of errors in sensor readings. During the
design some codes didn’t work on the ArduinoYun, so we had to get a new ArduinoUno
in the last 3 weeks. We also faced problem with load cell found the amplifier so we had
to call the technical to find alternative amplifier. We took of some of the components
during the design because of the time and the coding. However after finishing the project
we found that we can add some improvement to the project in the future to enhance the
project such as adding pressure sensor to measure the B.P, in addition a database to save
the data of the user. Finlay data should transmit to an app that connected with the
network to share the data.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 11
7.0 References
8.0 Appendix
1) ArduinoUNO
2) Ultrasonic
which, the voltage on this pin has the voltage corresponding to the latest measured
distance.
This pin outputs an analog voltage scaled representation of the distance with a scale
factor of (Vcc/1024) per 5-mm. (This
output voltage is referenced to GND, Pin 7.) The analog voltage output is typically within
±10-mm of the serial output.
Using a 10bit analog to digital convertor, one can read the analog voltage bits (i.e. 0 to
1023) directly and just multiply the
number of bits in the value by 5 to yield the range in mm. For example, 60 bits
corresponds to 300-mm (where 60 * 5 =
300), and 1000 bits corresponds to 5000-mm (where 1000 * 5 = 5000-mm).
For users of this output that desire to work in voltage, a 5V power supply yields~4.88mV
per 5 mm. Output voltage range
when powered with 5V is 293mV for 300-mm, and 4.885V for 5000-mm.
Pin 4- Ranging Start/Stop: This pin is internally pulled high. If this pin is left
unconnected or held high, the sensor will
continually measure and output the range data. If held low, the HRLV-MaxSonar-EZ will
stop ranging. Bring high for
20uS or longer to command a range reading.
Real-time Range Data: When pin 4 is low and then brought high, the sensor will operate
in real time and the first reading
output will be the range measured from this first commanded range reading. When the
sensor tracks that the RX pin is low
after each range reading, and then the RX pin is brought high, unfiltered real time range
information can be obtained as
quickly as every 100mS.
Filtered Range Data: When pin 4 is left high, the sensor will continue to range every
100mS, but the output will pass
through a 2Hz filter, where the sensor will output the range based on recent range
information.
Pin 5-Serial Output: By default, the serial output is RS232 format (0 to Vcc) with a 1-
mm resolution. If TTL
output is desired, solder the TTL jumper pads on the back side of the PCB as shown in
the photo to the right.
For volume orders, the TTL option is available as no-cost factory installed jumper. The
output is an ASCII
capital “R”, followed by four ASCII character digits representing the range in
millimeters, followed by a
carriage return (ASCII 13). The maximum distance reported is 5000. The serial output is
the most accurate of the range
outputs. Serial data sent is 9600 baud, with 8 data bits, no parity, and one stop bit.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 16
V+ Pin 6 - Positive Power, Vcc: The sensor operates on voltages from 2.5V - 5.5V DC.
For best operation, the sensor
requires that the DC power be free from electrical noise. (For installations with known
dirty electrical power, a 100uF
capacitor placed at the sensor pins between V+ and GND will typically correct the
electrical noise.)
GND Pin 7 – Sensor ground pin: DC return, and circuit common ground.
3) Pulse sensor
Stats: Diameter = 0.625" (~16mm)
Overall thickness = 0.125" (~3mm)
Cable length = 24" (~609mm)
Voltage = 3V to 5V
Current consumption = ~4mA at 5V
4) Load cell
Stainless steel. Easy installation. It is used for weighing, measuring tension, pressure
measurement, vibration measurement:
Comprehensive error 0,03% F.S.
Rated output 2±0.02mV/V
Nonlinearity 0,03% F.S.
Repeatability 0,02% F.S.
Zero Balance 1% F.S.
Input Resistance 405±5Ω
Output Resistance 350±5Ω
Insulation Resistance >=5000MΩ(100VDC)
Excitation Voltage 9~12V
Protection class IP66
5) LCD
Optical characteristics
STN type display module (Ta=25℃, VDD=5.0V) Item Symbol Condition Min. Typ.
Max. Unit Viewing angle θ -60 - 35 Φ Cr≥2 -40 - 40 deg Contrast ratio Cr - 15 - -
Response time (rise) Tr - - 150 250 Response time (fall) Tr - - 150 250 ms Electrical
characteristics LED ratings Item Symbol Min Typ. Max Unit Forward Voltage VF
3.8 4.0 4.4 V Forward current IF 240 mA Power P 1.01 W Peak wave length λp 568
nm Luminance Lv 185 Cd/m2 Operating temperature range VOP -20 - +70 Storage
temperature range VST -25 - +80 ℃
DC characteristics
Parameter Symbol Conditions Min. Typ. Max. Unit Supply voltage for LCD VDD-
V0 Ta =25℃ - 4.6 - Input voltage VDD 4.7 - 5.5 Backlight supply voltage VF - 4.1
4.3 V Supply current IDD Ta=25℃, VDD=5.0V - 1.5 3 Backlight supply current IF
VDD=5.0V R=6.8 150 mA Input leakage current ILKG - - 1.0 uA “H” level input
voltage VIH 2.2 - VDD “L” level input voltage VIL Twice initial value or less 0 - 0.6
“H” level output voltage VOH LOH=-0.25mA 2.4 - - “L” level output voltage VOL
LOH=1.6mA - - 0.4 V.
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 18
8.3 Codes
#include <LiquidCrystal.h>
// VARIABLES
int pulsePin = 0; // Pulse Sensor purple wire connected to analog pin 0
int blinkPin = 13; // pin to blink led at each beat
// these variables are volatile because they are used during the interrupt service
routine!
volatile int BPM; // used to hold the pulse rate
volatile int Signal; // holds the incoming raw data
volatile int IBI = 600; // holds the time between beats, the Inter-Beat
Interval
volatile boolean Pulse = false; // true when pulse wave is high, false when it's
low
volatile boolean QS = false; // becomes true when Arduoino finds a beat.
void loop()
{
void calculate_bmi(void)
{
bmi = kg/(pow(cm/100.0, 2));
}
void read_sonar(void)
{
pulse = pulseIn(sonarPin, HIGH);
cm = pulse/29/2;
//cm = 200-cm; // the differance between the object and sensor
}
void read_load_cell(void)
{
load_cell_value = analogRead(loadcellPin);
if(digitalRead(loadcellResetpin) == LOW) zero_value = load_cell_value;
kg = (load_cell_value - zero_value)/ LOAD_CELL_SCALE;
if(kg<0) kg = 0;
}
void sendDataToLCD(void)
{
lcd.setCursor(0, 0);
lcd.print("Height = ");
lcd.print(" ");
lcd.setCursor(13, 0);
lcd.print(cm);
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 20
lcd.print("cm");
lcd.setCursor(0, 1);
lcd.print("Weight = ");
lcd.print(" ");
lcd.setCursor(13, 1);
lcd.print(kg,1);
lcd.print("kg");
lcd.setCursor(0, 2);
lcd.print("HR =");
lcd.print(" ");
lcd.setCursor(4, 2);
lcd.print(BPM);
lcd.print("ppm");
lcd.setCursor(11, 2);
if(BPM < HR_LOW) lcd.print("Low HR");
else if(BPM > HR_HIGH) lcd.print("High HR");
else lcd.print("Normal HR");
lcd.setCursor(0, 3);
lcd.print("BMI=");
lcd.print(" ");
lcd.setCursor(4, 3);
lcd.print(bmi,2);
lcd.setCursor(10, 3);
if(bmi < UNDER_WEIGHT) lcd.print("Under Wgt");
else if(bmi > OVER_WEIGHT) lcd.print(" Over Wgt");
else lcd.print("Normal Wgt");
//lcd.print("kg");
}
void sendDataToCompter(void)
{
Serial.print("BPS = ");
Serial.print(BPM);
Serial.print("\tHeight = ");
Serial.print(cm);
Serial.print("\tWeight = ");
Serial.print(kg,1);
Serial.print("\tBMI = ");
Serial.print(bmi,2);
Serial.print("\tLoad Cell = ");
Serial.println(load_cell_value);}
EGN 4033 – ENGINEERING PROJECT FINAL REPORT 21
9 Acknowledgement
We had to use the help and guideline of some respected persons while working on our
project. These people deserve our greatest gratitude. We would like to show our gratitude
to Dr. Haitham Tayyar for giving us a good guideline throughout numerous consultations.
We would also like to expand our deepest gratitude to all those who have directly and
indirectly guided us in completing this project.
In addition, We would like to thank the teachnical Mr. Cezar for making time in their
busy schedules to help us in the workshop and during the testing of our device.
Many people, especially our classmates and my colleagues Mohammed Jassim and
Khalid have made valuable suggestions which gave us an inspiration to improve our
project. We thank all the people for their help directly and indirectly to complete our
project.