• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Sensors and Detectors / 2 Simple Arduino Temperature Meter Circuits Explored

Circuit Simulator: Assemble and Simulate

2 Simple Arduino Temperature Meter Circuits Explored

Last Updated on January 19, 2025 by Swagatam 7 Comments

In this article, I will show how to construct a couple of easy Arduino temperature meter circuits which can be also used as a LED room thermometer circuit.

Table of Contents
  • 1) Using DTH11 as the Temperature Sensor
  • The Design:
  • Author’s prototype:
  • Program Code:
  • 2) Arduino Temperature Meter Using DS18B20
  • Hardware required
  • DS18B20 Digital Thermometer Specifications
  • Pinout Details
  • How to Hook Up the Arduino Temperature Meter

The circuit is designed to display the readings in doted/bar LEDs. This project can be implemented for applications where ambient temperature plays a crucial role or it could be built just as another fun project for your home.

1) Using DTH11 as the Temperature Sensor

The heart and brain of the first temperature meter project is DTH11 sensor and Arduino respectively. We are going to extract only the temperature data from the sensor.

The arduino will infer the data and refresh the displayed temperature every few seconds.

We are going to take 12 resolutions of temperature sensor, in other words, we are going to take the temperature range where the ambient temperature usually vary.

If you wish to add more resolution/LEDs, you will need arduino mega to take advantage of whole temperature spectrum of the sensor with modified program.

DTH11 as the Temperature Sensor

The above illustrated layout may be adopted for best looking for your setup.

The user just needs to enter the minimum temperature range of the room. It can be a rough value, which can be later changed once full hardware setup is completed.

If the temperature range goes below the threshold value that user entered, no LED will glow and if the temperature goes beyond the maximum range (minimum + 11) all LED would glow.

If there are any sensor connectivity issues, all the LED will blink every second simultaneously.

The Design:

The Arduino LED temperature meter circuit wiring is very simple, a series of LED connected to GPIO pins ranging from 2 to 13 with current limiting resistors, and DHT11 sensor is plugged to analog I/O pins, which is programmed to give power supply to sensor as well as read data.

Arduino LED Room Thermometer Circuit Diagram

Thus, your LED thermometer circuit setup is complete and ready to upload the code. It is always recommended to test the circuit on bread board before making it permanent.

Tip: Use different color LED for indicating different temperature ranges. You may use blue LEDs for lower temperature range, green or yellow for mid temperature range and red LEDs for higher temperature. This will make more attractive.

Author’s prototype:

working prototype of Arduino LED Room Thermometer Circuit

NOTE: The following program is only compatible with DHT11 sensor.

Before proceeding, please make sure to download the library file form the following link:

https://arduino-info.wikispaces.com/file/detail/DHT-lib.zip

Program Code:

//-------Program developed by R.Girish------//
#include<dht.h>
int a=2;
int b=3;
int c=4;
int d=5;
int e=6;
int f=7;
int g=8;
int h=9;
int i=10;
int j=11;
int k=12;
int l=13;
int p=A0;
int data=A1;
int n=A2;
int ack;
dht DHT;
int temp=25;   // set temperature range.
void setup()
{
Serial.begin(9600); // may be removed after testing.
pinMode(a,OUTPUT);
pinMode(b,OUTPUT);
pinMode(c,OUTPUT);
pinMode(d,OUTPUT);
pinMode(e,OUTPUT);
pinMode(f,OUTPUT);
pinMode(g,OUTPUT);
pinMode(h,OUTPUT);
pinMode(i,OUTPUT);
pinMode(j,OUTPUT);
pinMode(k,OUTPUT);
pinMode(l,OUTPUT);
pinMode(p,OUTPUT);
pinMode(n,OUTPUT);
digitalWrite(p,HIGH);
digitalWrite(n,LOW);
}
void loop()
{
// may be removed after testing.
Serial.print("Temperature(°C) = ");
Serial.println(DHT.temperature);
Serial.print("Humidity(%) = ");
Serial.println(DHT.humidity);
Serial.print("\n");
//till here
ack=0;
int chk = DHT.read11(data);
switch (chk)
{
case DHTLIB_ERROR_CONNECT:
ack=1;
break;
}
if (ack==0)
{
if(DHT.temperature>=temp)digitalWrite(a,HIGH);
if(DHT.temperature>=temp+1)digitalWrite(b,HIGH);
if(DHT.temperature>=temp+2)digitalWrite(c,HIGH);
if(DHT.temperature>=temp+3)digitalWrite(d,HIGH);
if(DHT.temperature>=temp+4)digitalWrite(e,HIGH);
if(DHT.temperature>=temp+5)digitalWrite(f,HIGH);
if(DHT.temperature>=temp+6)digitalWrite(g,HIGH);
if(DHT.temperature>=temp+7)digitalWrite(h,HIGH);
if(DHT.temperature>=temp+8)digitalWrite(i,HIGH);
if(DHT.temperature>=temp+9)digitalWrite(j,HIGH);
if(DHT.temperature>=temp+10)digitalWrite(k,HIGH);
if(DHT.temperature>=temp+11)digitalWrite(l,HIGH);
delay(2000);
goto refresh;
}
if (ack==1)
{
// This may be removed after testing.
Serial.print("NO DATA");
Serial.print("\n\n");
// till here
delay(500);
digitalWrite(a,1);
digitalWrite(b,1);
digitalWrite(c,1);
digitalWrite(d,1);
digitalWrite(e,1);
digitalWrite(f,1);
digitalWrite(g,1);
digitalWrite(h,1);
digitalWrite(i,1);
digitalWrite(j,1);
digitalWrite(k,1);
digitalWrite(l,1);
refresh:
delay(500);
digitalWrite(a,0);
digitalWrite(b,0);
digitalWrite(c,0);
digitalWrite(d,0);
digitalWrite(e,0);
digitalWrite(f,0);
digitalWrite(g,0);
digitalWrite(h,0);
digitalWrite(i,0);
digitalWrite(j,0);
digitalWrite(k,0);
digitalWrite(l,0);
}
}
//-------Program developed by R.Girish------//

NOTE 1:

In the program:

int temp=25;   // set temperature range.
Replace “25” with your minimum ambient temperature that you have encountered in past with other thermometers or predict a rough value.
NOTE 2: Please verify the temperature readings from the serial monitor and the LED setup.

2) Arduino Temperature Meter Using DS18B20

In this second design I have explained another simple, yet extremely accurate Arduino temperature sensor with Indicator circuit, using an advanced digital LCD display readout module.

digital LCD display readout module.

There's actually nothing too much explainable in this configuration, since everything is module based and simply requires hooking up or plugging-in with each other through the offered male female sockets and connectors.

Hardware required

Four basic materials are required for constructing this accurate Arduino LCD temperature meter circuit, which may be studied as given under:

1) An Arduino UNO Board

Arduino UNO Board

2) A Compatible LCD Module

LCD module for the Arduino

3) An analogue temperature sensor chip, such as a DS18B20 or our very own LM35 IC.

DS18B20 Digital Thermometer Specifications

The DS18B20 digital thermometer assures a 9-bit to 12-bit Celsius temperature specifications and carries an alarm feature with non-volatile consumer programmable higher and lower activation elements. The DS18B20 communicates over a single Wire bus that by description demands a single data line (and ground) for connection with a main microprocessor.

It includes a working temperature range of -55°C to +125°C which is precise to ± 0.5 ° C over the assortment of -10°C to +85°C.

Along with this, the DS18B20 is enabled to acquire power straight from the data line (“parasite power”), disposing the necessity of an
rel="nofollow" outside power supply.

Each one DS18B20 bears a distinctive 64-bit serial code, permitting multiple DS18B20s to work on the same 1 Wire bus. Consequently, it is user-friendly and uncomplicated just one microprocessor to manage loads associated with DS18B20s launched over a widespread location.

Programs that can easily take advantage from this attribute involve HVAC ecological configurations, temperature surveillance devices inside establishments, apparatus, or tools, and process supervising and regulation systems.

Pinout Details

DS18B20 Digital Thermometer Specifications

4) A 9V, 1 amp AC to DC adapter unit

Now it's just about pushing in the connectors with each other, do a bit of setting through the LCD push buttons, and you get a full fledged, accurate digital LCD temperature meter at your disposal.

You can measure room temperature with this set up, or clamp the sensor appropriately with any heat emitting device which needs to be monitored such as an automobile engine, egg incubator chamber, geyser, or simply to check the heat dissipation from a power amplifier devices.

How to Hook Up the Arduino Temperature Meter

The following figure shows the connection set up, where the Arduino board is at the bottom, with the LCD monitor plugged in over it, and the temperature sensor hooked up with the LCD board.

temp2Bmeter

But before you implement the above set up, you'll need to program the Arduino board with the following sample code.

OneWire ourWire(DS18B20);
DallasTemperature sensor(&ourWire);
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
byte degree_symbol[8] =
{
0b00111,
0b00101,
0b00111,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
void setup()
{
Serial.begin(9600);
delay(1000);
sensor.begin();
lcd.begin(16, 2);
lcd.createChar(1, degree_symbol);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Temp: ");
}

void loop()
{
sensor.requestTemperatures();
Serial.print(sensor.getTempCByIndex(0));
Serial.println("°C");
lcd.setCursor(7,0);
lcd.print(sensor.getTempCByIndex(0));
lcd.write(1);
lcd.print("C");
delay(1000);
}

Courtesy:  dfrobot.com/wiki/index.php?title=LCD_KeyPad_Shield_For_Arduino_SKU:_DFR0009

You'll also like:

  • 1.  How to Connect a TSOP1738 IR Sensor
  • 2.  Flashing Red, Green Railway Signal Lamp Circuit
  • 3.  3 Easy Capacitive Proximity Sensor Circuits Explored
  • 4.  3 Sound Activated Switch Circuits Explained
  • 5.  Single IC Piezo Driver Circuit – LED Warning Indicator
  • 6.  Automatic PWM Door Open/Close Controller Circuit

Filed Under: Sensors and Detectors Tagged With: Arduino, Circuits, Explored, Meter, Simple, Temperature

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Switching Two Alternate Loads ON/OFF with IC 555
Next Post: SPDT Relay Switch Circuit using Triac »

Reader Interactions

Comments

  1. Tyson Bintz says

    January 9, 2020 at 12:25 am

    Hey, thanks for the article post. Fantastic.

    Reply
  2. William says

    September 21, 2019 at 1:27 am

    Hi there,

    I am a student doing my B-Tech Mechanical project where I a design a solar tracker system for a parabolic dish, but have not that much knowledge on arduino uno coding, has anyone here ever done project need help please, using 2 stepper motor, one controlled by four LDR, and the other one by a timer.

    need help please

    Reply
  3. Unknown says

    April 2, 2017 at 5:07 am

    Hai ,
    i am padmanaban , i have seen lots of interesting projects on the web and giving solutions to the problems also. great and excelent.
    can you help me to my circuit problem, here i have attached the diagram , the problem is serial communication ,
    i am using atmega 16, AVR Studio, through usbapp programmer , avrdude.exe, this is the code: when i connect to the computer hyperterminal to see serial communication from microcontroller to PC terminal i am getting 95 , 47 instead 65 for A 66 for B on the terminal, BUT for U ie 85 in Decimal;, 0x55in Hex, it is showing correctly on hypertermial as 85 – ie U,

    I tried with 8 Mhz, 4 Mhz ,16Mhz, 14.7456 Mhz external crystals,
    Can you please Help me where I am doing Wrong,

    Thanks ,
    below is my Avr code and circuit diagram,

    #include
    #include
    #include
    #include

    void send_char (char ch);
    void mes2usart1 (char *ptr);

    int main (void)
    {
    // initialize serial port
    sei();
    UCSRB = 0x98;
    UCSRC = 0x06;
    UBRRL = 103; // 9600 16mhz
    UBRRH = 0;
    //UBRRL = 95; //9600 14.7456 // 9600 BAU //UBRRL = 51; // 9600 8mhz //UBRRL = 103; // 4800 8mhz
    //UBRRL = 51; // 9600 4mhz //UBRRL = 103; // 4800 4mhz

    while (1)
    {
    mes2usart1 ("AB");
    // UDR=0x55;
    _delay_ms(3000);
    }
    }

    void mes2usart1 (char *ptr)
    {
    while (*ptr)
    send_char (*ptr++);
    }

    ISR (USART_RXC_vect)
    {
    unsigned char tmp;
    tmp = UDR; // get data received through serial port
    UDR = tmp; // send back data to serial port
    mes2usart1 ( tmp);
    }

    void send_char (char ch)
    {
    UDR = ch;
    while (!(UCSRA & 0x40));
    UCSRA |= 0x40;
    }

    Reply
    • Swagatam says

      April 3, 2017 at 6:06 am

      Mr. GR, will look into the issue and will try to solve it for you soon

      Reply
    • GR says

      April 3, 2017 at 1:12 pm

      Hi padmanaban,

      Unfortunately,I have no experience with AVR studio, I can't comment on your issue.

      Best regards.

      Reply
  4. ShooShoo says

    July 23, 2016 at 7:53 pm

    Hi there would it be possible to get your contact details or pls drop me an email, I have an invention i need to discuss with you – ccjrokafor15@gmail.com

    Reply
    • Swagatam says

      July 24, 2016 at 5:42 am

      Hi, You can send it to admin (@) http://www.homemade-circuits.com

      but the discussions could become a part of this website if it is interesting.

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Subscribe to New Posts

Categories

  • Arduino Projects (89)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (104)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (88)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (101)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (39)
  • Water Controller (36)

Tags

AC Alarm Amplifier Application Arduino Automatic Battery Charger Circuits Control Controlled Controller Current Datasheet DC Detector Digital Driver Electronic Explained Explored Generator High Indicator Inverter Lamp LED Light Meter Motor Power Regulator Remote Sensor Simple Single Solar Supply Switch Timer Transistor Voltage Water Watt Working




Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap




People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin



  • Recent Comments

    • Swagatam on How to Make HHO Fuel Cell Circuit in Automobiles for better Fuel Efficiency
    • Swagatam on How to Make HHO Fuel Cell Circuit in Automobiles for better Fuel Efficiency
    • eq on How to Make HHO Fuel Cell Circuit in Automobiles for better Fuel Efficiency
    • Swagatam on How to Make HHO Fuel Cell Circuit in Automobiles for better Fuel Efficiency
    • eq on How to Make HHO Fuel Cell Circuit in Automobiles for better Fuel Efficiency

    © 2025 · Swagatam Innovations