Introduction
In this Article, we interface the LM35 Sensor with the ESP32 Board And Display the Reading in the serial monitor,16×2 LCD Display, And Oled Display.
LM35 is an anloag sensor and measures the temperature in the ESP32 Board we Connect the sensor to Pin Number D32.LM35 Sensor has 3 terminals available. The first one is VCC, the middle one is a Data pin And the third one Is a GND Pin.
You Used The LM35 Sensor In Various fields which provides Real-Time data And is also suitable for all microcontrollers.
Guide For How You Install ESP32 Board In Arduino IDE software.
Bill Of Materials
S.N | Component's | Quantity | Link To Buy |
1 | ESP32 Board | 1 | |
2 | LM35 Sensor | 1 | |
3 | Buzzer | 1 | |
4 | Wire | 4 | |
5 | Zero PCB | 1 |
Component’s
- The ESP32 Board Is Integrated with Wi-Fi And Dual-Core, Low Power Bluetooth, Low Power Consumption, and High performance.
- ESP32 Is a small board With many pins available To Connect to the input and output Devices.
- Compared to the Esp8266 Board, so many Analog pins are Available On the ESP32 Board and it Takes Low Power.
The LM35 sensor is a temperature-sensitive element, typically made of a solid-state material such as silicon. This element exhibits a linear change in electrical properties in response to temperature variations.
Calculation
- LM35 temperature range is -55 °C To 150 °C
- The max voltage is = 1500mv
- The LM35 Sensor is a 10bit ADC and is 1024-bit (0-1023)
- Let’s calculate Resolution = Vref / Step Size
- Vref is Arduino Output Voltage = 5v
- Step Size = 1024
Specifications of the LM35 Sensor
- -55°C to +150°C Temperature Range.
- The output voltage has a scale factor of 10 mV/°C.
- Calibration accuracy of ±0.5°C.
- 4V to 25V Power Supply Required.
- 60 µA Current Consumption.
- The LM35 sensor has low self-heating characteristics.
Circuit Diagram
In this Circuit Diagram, We Connect the LM35 Sensor to Pin D33, VCC To 5V, And Gnd Will Connect To the Ground.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
//Prateek //https://justdoelectronics.com //https://www.youtube.com/@JustDoElectronics/videos #define ADC_VREF_mV 3300.0 #define ADC_RESOLUTION 4096.0 #define PIN_LM35 32 void setup() { Serial.begin(9600); } void loop() { int adcVal = analogRead(PIN_LM35); float milliVolt = adcVal * (ADC_VREF_mV / ADC_RESOLUTION); float tempC = milliVolt / 10; float tempF = tempC * 9 / 5 + 32; Serial.print("Temperature: "); Serial.print(tempC); Serial.print("°C"); Serial.print("....."); Serial.print(tempF); Serial.println("°F"); delay(1000); } |
Working Photo
First, we sold the ESP32 Board in a Zero PCB.
Now We check the LM35 Sensor Reading in a Serial Monitor.
Serial Monitor OUTPUT.
Conclusion
In this project, we interface the lm35 sensor with the ESP32 board and take readings in a serial monitor.LM35 Sensor measures the temperature.
if you like it plz share it with your friends