How To Use a Temperature Sensor to Measure Body Temperature?
We know that we are going to measure the body temperature of a person using Arduino. So, let us get started to gather further information to start the project.
Step 1: Components
If you want to avoid any inconvenience in the middle of any project, the best approach is to make a complete list of all the components that we are going to use. The second step, before starting to make the circuit, is to go through a brief study of all these components. A list of all the components that we need in this project is given below.
Step 2: Studying The Components
As we have already made a list of components, let us move a step ahead and go through a brief study of the working of each component. Arduino Nano is a microcontroller board. The microcontroller on it is ATmega328P. It requires a C Code to operate. In this code, we tell the controller how and what operations to carry out. LM35 is a temperature sensor. Its shape is like a transistor. It produces an output voltage that is directly proportional to the temperature. The output voltage can be easily used to tell the temperature in Celcius. It is better than thermistors because it is more sensitive to temperature and provides accurate readings. Its range is from -55 degrees to 150 degrees Centigrade.
Step 3: Making the Circuit
Let us now assemble all the components together to make a circuit.
Step 4: Getting Started with Arduino
If you are not already familiar with the Arduino IDE. Don’t worry, because a step by step procedure to set up and use Arduino IDE is given below: Click here to download the code.
Step 5: Code.
The code is very simple. It is explained briefly below:
- The pin of Arduino to take Analog input is initialized at the start. Al the variables that will be used later to store different values are also initialized here.
- void setup() is a function in which we initialize the pins of Arduino to be used as INPUT or OUTPUT. Baud Rate is also set in this function. Baud Rate is the communication speed of the microcontroller board to the sensors attached.
- void loop() is a function that runs repeatedly in a cycle. In this function, the input to the Arduino board is processed and output is sent to the other pins or displayed on the serial monitor. In the above function, an analog input is coming to the pin A5 of the Arduino. This analog input is converted to digital form by using a formula. In this formula, the analog input is multiplied by the total volts provided of the microcontroller board and divided by the maximum analog value which is 1023. When this analog data is converted into digital form, it is directly interpreted as the temperature in degree Celcius. To display the Ferhanite temperature on the serial monitor also, we have used a formula to convert this temperature to Ferhanite and than displayed it on screen. Now as we have made a digital thermometer using Arduino. Put this LM35 sensor on your arm and cover it with a cloth and enjoy measuring your body temperature.
How To Make A Digital DC Voltmeter Using Arduino?How To Make A Digital Air Pollution Meter Using Arduino?How To Make A Smoke Alarm For Your Kitchen Using Arduino?How To Make Obstacle Avoiding Robot Using Arduino?