Digital Thermometer Using NodeMCU and LM35

About: The purpose of the team is to share the knowledge that we gain through various symposiums and workshops to students in SRM through various interactive sessions. We aim to bridge the gulf between the theoret...

Make your own Digital Thermometer and monitor temperature over internet from anywhere.This instructable is a basic one to start tinkering with IoT. We will be interfacing temperature sensor LM35 with NodeMCU 1.0(ESP-12E).

LM35 is a temperature sensor which can measure temperature in the range of -55°C to 150°C.It is a 3-terminal device that provides analog voltage proportional to the temperature. NodeMCU ADC can be used to measure the analog voltage from LM35 and hence calculate the temperature which is in proportion to the analog voltage.

Step 1: Components Required

  • LM35 Temperature Sensor
  • NodeMCU 1.0(ESP 12-E Module)
  • Connecting Wires
  • Breadboard
  • Arduino IDE

Step 2: Make Connections

  1. Make connections as shown in the circuit diagram.
  2. Connect the Vcc pin of LM35 to 3V pin of NodeMCU.
  3. Connect the Analog pin of LM35 to A0 of NodeMCU.
  4. Connect the GND pin of LM35 to GND of NodeMCU.

Step 3: Conversion of Analog Value to Digital Value

  • The Analog to Digital Converter (ADC) converts analog values into a digital approximation based on the formula:

ADC Value = sample * 1024 / reference voltage

  • To convert analog values to Celsius we have 3.3 V on our board and we know that output voltage of LM35 varies by 10 mV to every degree Celsius rise/fall.

temp_celsius = ((analogRead(A0) * 330.0)/1024.0);

  • To convert Celsius to Fahrenheit

temp_fahrenheit = (temp_celsius * 1.8)+32.0;

Step 4: Interfacing LM35 and NodeMCU

  1. Open Arduino IDE.
  2. Go to Tools -> Boards -> NodeMCU 1.0 (ESP 12-E Module).
  3. Copy the code. (The Code has been attached below).
  4. Compile it.
  5. Upload it to NodeMCU.

Step 5: Monitoring Temperature

  • The temperature can be monitored by opening the serial monitor.
  • It can monitored over net by copy pasting the IP Address shown on the serial monitor,here it is 192.168.43.163

Share

    Recommendations

    • First Time Author

      First Time Author
    • PCB Contest

      PCB Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    Discussions

    0
    None
    DIY Hacks and How Tos

    2 months ago

    Welcome to Instructables. Thanks for sharing your project with the community.