So, i have purchased the component needed from electronics online shopping and some in Jalan Pasar, Kuala Lumpur.
the electronics shop
online shopping
Mostly i founds all the the component that needed for my project except for the mask. i plan to use a plastic glass first as a mask.
So, i need to start the project based on the simulation .
Activity: Study the Simulation and Coding
First of all, he want to see the circuit diagram that have been construct based on the simulation that has been done in order to start the hardware project. Then he want us to searching and understand the coding for the project and try it.
After done some research about the coding, i found a coding to measure a temperature. The coding for this circuit also has been done by do some study in the Arduino website. This is because, to measure the respiration rate via temperature sensor, we need to measure the temperature first. So, the connection for the temperature sensor have been done in Proteus using 100k NTC thermistor. The circuit is function well as we increased the temperature sensor, the temperature displayed in the LCD also increase.
This is the connection that i have been done in Proteus 8.
The connection of the temperature measurement
When the 100k NTC thermistor was set 25 Celcius, the temperature measurement is 24.53 Celcius
The coding use when run the program was:
#include <LiquidCrystal.h>
int ThermistorPin = 0;
int Vo;
float R1 = 10000;
float logR2, R2, T;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
Serial.begin(9600);
}
void loop() {
Vo = analogRead(ThermistorPin);
R2 = R1 * (1023.0 / (float)Vo - 1.0);
logR2 = log(R2);
T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
T = T - 273.15;
T = (T * 9.0)/ 5.0 + 32.0;
lcd.print("Temp = ");
lcd.print(T);
lcd.print(" F");
delay(500);
lcd.clear();
}
Activity: Testing the construct circuit.
The Arduino will measure the voltage at a point between the thermistor and a known resistor. This is known as a voltage divider. The equation for a voltage divider is:
In terms of the voltage divider in a thermistor circuit, the variables in the equation above are:
This equation can be rearranged and simplified to solve for R2, the resistance of the thermistor:
The testing to measure temperature
Plastic glass a mas and power bank as a power supply
After testing, i meet my supervisor to shown my little progress of the temperature sensor measured. The temperature measurement have been test with him. It work but the temperature not very accurate because we are doing this under cold temperature which is in their office.
No comments:
Post a Comment