Hello, everyone !!! I'm going to show you how to make an LCD thermometer with an Arduino UNO and a LM35/36 analog temperature sensor with jumpers and a breadboard.

This project is very good for people beginning with Arduino, it doesn't require any special engineering nor programming skills and it will take you less than 10 minutes to build it, once you have all the parts of course. :)

Step 1: Gathering the Parts

These are the part you need to build the thermometer:

  1. 1x Arduino UNO board
  2. 1x Breadboard
  3. 1x 16x2 LCD display
  4. 1x LM35 or LM36 analog temperature sensor
  5. 1x 10k potentiometer - for adjusting the brightness of the display*
  6. 19x Jumpers - to connect everything

They are also met in the official Arduino Starter Kit which you can order from Arduino's official web page here. Also you can buy them separately from the following stores: Adafruit, SparkFun, Aliexpress, Banggood, etc.

*If you dont have a 10k pot you can use 50k like me !

Step 2: Building the Thermometer

By following the Fritzing schematic above, plug the LCD in the breadboard and then connect it to the Arduino board with jumpers. After that plug the potentiometer and the sensor in the breadboard, connect the left and the right pins of the pot to ground and +5V and the middle one to the LCD display.

Then connect the sensor to ground and to +5V and to the Arduino but be very carefully, because if you connect it wrong the sensor will heat up to 280+ C(540 F) and might get damaged.

Once you have connected everything move on the next step.

Step 3: Programming the Arduino

To get it work you have to use one of the two codes below. Upload it to your Arduino using theintegrated development environment, for short IDE, which you can download from Arduino's official page and you are done !!!

If you don't see anything on the LCD or you see rectangles, turn the pot clockwise/anti-clockwise until you see the letter clear.

Now you have a thermometer and you can measure the temperature of the air around you, inside your house or outside.

The first code is from Gaige Kerns, and it can be used to read from LM36 or LM35. Thanks Gaige !!!

Also check out my new thermometer project here !!!

<p>// include the library code #include 

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// initialize our variables
int sensorPin = 0;
int tempC, tempF;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
void loop() {
tempC = get_temperature(sensorPin);
tempF = celsius_to_fahrenheit(tempC);
lcd.print(tempF); lcd.print(" "); lcd.print((char)223); lcd.print("F");
int get_temperature(int pin) {
// We need to tell the function which pin the sensor is hooked up to. We're using
// the variable pin for that above
// Read the value on that pin
int temperature = analogRead(pin);
// Calculate the temperature based on the reading and send that value back
float voltage = temperature * 5.0;
voltage = voltage / 1024.0;
return ((voltage - 0.5) * 100);
int celsius_to_fahrenheit(int temp) {
return (temp * 9 / 5) + 32;
#include <LiquidCrystal.h>         

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //Digital pins to which you connect the LCD
const int inPin = 0;                   // A0 is where you connect the sensor
void setup()
void loop()
  int value = analogRead(inPin); // read the value from the sensor
  float millivolts = (value / 1024.0) * 5000; 
  float celsius = millivolts / 10;
  lcd.print((celsius * 9)/5 + 32); //turning the celsius into fahrehait
<p>There is an error in the code, you need to substract 500 in celsius temperature for having the correct value</p><p>void setup()<br>{<br> lcd.begin(16,2);<br>}<br>void loop()<br>{<br> int value = analogRead(inPin);<br> lcd.setCursor(0,1);<br> float millivolts = (value / 1024.0) * 5000;<br> float celsius =( millivolts-500) / 10;<br> lcd.clear();<br> lcd.setCursor(0,0);<br> lcd.print(celsius);<br> lcd.print(&quot;C&quot;);<br> lcd.setCursor(0,1);<br> lcd.print((celsius * 9)/5 + 32);<br> lcd.print(&quot;F&quot;);<br> delay(10000);<br>}</p>
<p>HI, I am making a thermometer as my project for my apprenticeship. I want to make it one that will measure body temperature and that you can program different temps into it. For example, if a persons body temperature calls between 36.5⁰C-37.2⁰C a green led will come on to say that it is normal. Any advice would be appreciated. Thank you </p>
<p>Hi , is it possible to add esp8266 between lcd and lm35 ?</p><p>i wanna monitor the temperature via web browser too</p>
<p>First of all, great project. But it doesn't work for me. By the way, i'am a newbie. Everything works, but as you can see on the pic, i'am in my living room an not in a sauna. So please, help.... Thank you.</p>
<p>Hey there,</p><p>I tried all the codes provided, yet I'm still getting a very non-reasonable pattern of readings like this 7.73, 0.00, 41.57, 3.97 ,0.00 ,41.78 ,3.97 ,0.00 ,40.82 ,6.34 ,0.00 ,25.78... in Celsius.</p><p>Any help?</p><p>Thanks in advance</p>
Can you provide a photo of your hardware setup ?
<p>I don't have an LCD so I'm viewing the results on the serial monitor, and so I made these connections. The arduino is powered by the laptop itself.</p>
<p>follow instructions to the letter and pin. problem!!! lcd backlight won't turn on!!!</p><p>PLEASE HELP!!!!!</p>
<p>what should i do?</p>
<p>Is that whole code? </p><p>You have to include proper library at the beginning,in this case it is</p><p><em><strong>#include&lt;LiquidCrystal.h&gt;</strong></em></p><p>You can try copy/paste sketch which I posted below.</p><p>j</p><p><br><em></em></p>
<p>Can you possibly also make this without the screen, but instead have the arduino measure the temperature of something periodically and have it gather data for you?</p>
<p>Search for project with data logger, one example here: </p><p>https://www.instructables.com/id/Arduino-Datalogger-with-Temperature-Sensor-and-Pho/</p>
<p>thank you!</p>
<p>Hi, the temperatures on my LCD keep varying over a vast range with a correct temperature being showed once in a while.I did the initial model on a breadboard.So is it happening because of the lose connections on the breadboard?Should I go for a vero board and solder the components.</p><p>Hope to get a reply soon.</p><p>Thanks in advance.</p>
<p>I have the same problem.</p><p>I do not know how it happens, but measurements that vary completely randomly of an entire degree are useless. </p><p>How do I avoid this noise.</p>
<p>You can try the sketch I just posted. If it doesn't help then try to use capacitor.</p>
<p>Hello !</p><p>I am sorry for my late answer, I am using F and M audio jacks to connect my temperature sensor. The F is soldered to arduino shield and the M is soldered for the other side of the cable which is soldered to the sensor.</p>
Ok will try to solder and get back to you
<p>Hi, I changed sketch little bit. Temperatures are displayed with one <br>decimal and temp calculation is slightly different compare to original <br>code. With this sketch I have no temperature jumps. Delay is set to 5s, <br>but you can change it if you need.</p><p><em><strong>#include&lt;LiquidCrystal.h&gt;<br><br>LiquidCrystal lcd(12,11,5,4,3,2);<br>float tempC;<br>int tempPin = 0;<br>int reading;<br><br><br>void setup()<br>{<br>lcd.begin(16,2);<br>analogReference(INTERNAL);<br>Serial.begin(9600);<br>}<br><br>void loop()<br>{<br>reading = analogRead(tempPin);<br>tempC = reading / 9.31;<br><br>Serial.println(tempC);<br>lcd.clear();<br>lcd.setCursor(0,0);<br>lcd.print(tempC, 1);<br>lcd.print(&quot; Celsius&quot;);<br>lcd.setCursor(0,1);<br>lcd.print(((tempC * 9)/5 + 32), 1);<br>lcd.print(&quot; Fahrenheit&quot;);<br><br>delay(5000);<br><br>}</strong></em></p>
<p>Hello, I dont know what I am doing wrong but display is showing nothing... I connected everything precisely as you did, I can change brightness with potentimeter, but I cant see any numbers... </p>
<p>Hello, mmondek, The problem is in the code, I will fix it later today and upload it.</p><p>P.S. Sorry for my late answer.</p>
<p>Hi, thank you for posting this project.</p><p>I am new to arduino and started to play and test with a free account at 123d.circuits.io.</p><p>I built this circuit and discovered that the LCD panel would blow up unless I inserted a 1K Ohm resistor. I wonder if this is a quirk with the online simulator. I also noticed that it doesn't seem to be able to display negative numbers for the temperature.</p><p>Again, is this just the simulator?</p><p>Please see my attached image.</p><p>Thank you.</p>
<p>Thank you !</p><p>Its not always needed to add 1k resistor the the LCD LED since most of the LCD have 150 Ohm or 1k resistors, so it is from the simulator.</p><p>My code should show and negative numbers so the problem is again from the simulator.</p><p>P.S. Sorry for my late answer !</p>
<p>Hi, I am fairly new to arduino programming and am trying to use this setup/code to run a thermostat which will tell a cooling system when it needs to turn on or off, using a set point of 80 degrees F for on and 65 degrees F for off. The cooling system is run off a 12V - 65AH marine battery. How can I integrate control for power based on temperature reading into this breadboard as well as the necessary code to run this thermostat and cooling system? Thank you in advance.</p>
<p>Please bear in mind running power to anything from a marine battery with little experience can be dangerous, both to the electronics and yourself. I would like to emphasize working with an automotive or marine battery is not a safe project for introductory electronics. That being said, if you would otherwise simply plug/unplug the cooling system when needed, a relay is a fairly simple option to switch power using a microcontroller such as with the Arduino.</p><p>If setting a temperature via programming is an option, a simple if statement based on the temperature read and powering a digital output high or low should be enough. If you need a clean interface, and to be able to adjust the temperature later without reprogramming, I would suggest looking into LCD screens and potentiometers.</p>
<p>Thanks for the info. I got the whole system figured out and working. Ended up using this instructable but including a 10A 5VDC power relay module and programming with an 'if' statement. Much easier than I thought! See below for modified wiring diagram:</p><p>And the following modified code:</p><p>#include&lt;LiquidCrystal.h&gt;<br><br>LiquidCrystal lcd(12,11,5,4,3,2);<br>const int inPin = 0;<br>int TURN_ON = 27;<br>int RELAY_PIN = 13;<br><br>void setup()<br>{<br> lcd.begin(16,2);<br> pinMode(RELAY_PIN, OUTPUT);<br> Serial.begin(9600);// pour a bowl of serial<br> <br>}<br>void loop()<br>{<br> int value = analogRead(inPin);<br> lcd.setCursor(0,1);<br> float millivolts = (value / 1024.0) * 5000;<br> float celsius = millivolts / 10;<br> Serial.print(celsius);<br> lcd.clear();<br> lcd.setCursor(0,0);<br> lcd.print(celsius);<br> lcd.print(&quot;C&quot;);<br> lcd.setCursor(0,1);<br> lcd.print((celsius * 9)/5 + 32);<br> lcd.print(&quot;F&quot;);<br> <br> if (celsius &gt; TURN_ON) {<br> digitalWrite(RELAY_PIN, HIGH);<br> } <br> else {<br> digitalWrite(RELAY_PIN,LOW); <br> }<br><br> delay(1000);<br><br>}</p>
<p>hi, i see you use Arduino here. Anyone know about Nuvoton Learning Board MC0 NUC140 VE3CN? I have a project using LM35 sensor, but can not get the right code and the right pin. Hope i could get any hand here. Thanks a lot</p>
<p><em>I am sorry but I cant help you. You better post your question at the forums - </em>https://www.instructables.com/community/</p>
<p>hi Im not getting the correct output on my lcd screen. It reads a constant 499.51 C. Can anyone give me any suggestions as to why I getting these results?</p>
<p>Hello, RayM17 !</p><p>I did like to see how did you connect the sensor to the arduino and also I wan to know what temp sensor you use ?</p>
<p>hey PowerBot, Im using lm 35. white wire to A0, blue to gnd, yellow to voltage</p>
<p>Hey RayM17, well everything is connected correctly, showing you 499.5 C means that the LM35 is not connected. As far as I see you are using jumpers, sometimes they barely touch the metal inside the fem connector, so you have to push it down (the jumper you use to connect the temp sensor).</p>
<p>PowerBot, thanks for your help. Ill check it out and report back when I get it working. thank you</p>
<p><em><strong>What am I doing wrong?</strong></em><br>My LCD is not lighting up. I did everything right, the code has no error as well and also how would I make this using a <strong>to92 temperature sensor</strong> instead? Thank you in advance! Good job on the project!</p>
<p><a href="http://pdf.datasheetcatalog.com/datasheets2/17/173163_1.pdf" rel="nofollow">http://pdf.datasheetcatalog.com/datasheets2/17/173...</a></p><p>idk if this is right :-/ <br>Stressing cause it's due on monday!!!!!!!!!!</p>
<p>I am sorry for my late answer, I will look for some more info for this TO92 temp sensor and I will tell will it work. As far as I saw its analog sensor and I don't see any reason to don't work. </p><p>Thanks !</p>
<p>Use this Code </p><p>// include the library code</p><p>#include &lt;LiquidCrystal.h&gt;</p><p>// initialize the library with the numbers of the interface pins</p><p>LiquidCrystal lcd(12,11,5,4,3,2);</p><p>// initialize our variables</p><p>int sensorPin = 0;</p><p>int tempC, tempF;</p><p>void setup() {</p><p> // set up the LCD's number of columns and rows: </p><p> lcd.begin(16, 2);</p><p>}</p><p>void loop() { </p><p> tempC = get_temperature(sensorPin);</p><p> tempF = celsius_to_fahrenheit(tempC);</p><p> lcd.setCursor(0,0);</p><p> lcd.print(tempF); lcd.print(&quot; &quot;); lcd.print((char)223); lcd.print(&quot;F&quot;);</p><p> delay(200);</p><p>}</p><p>int get_temperature(int pin) {</p><p> // We need to tell the function which pin the sensor is hooked up to. We're using</p><p> // the variable pin for that above</p><p> // Read the value on that pin</p><p> int temperature = analogRead(pin);</p><p> // Calculate the temperature based on the reading and send that value back</p><p> float voltage = temperature * 5.0;</p><p> voltage = voltage / 1024.0;</p><p> return ((voltage - 0.5) * 100);</p><p>}</p><p>int celsius_to_fahrenheit(int temp) {</p><p> return (temp * 9 / 5) + 32;</p><p>}</p><p>I found this to work better! and I am using a LM36 Temp Sensor</p>
<p>nice bit of code. I didn't see on the datasheet what the math needed to be.</p><p>Thanks,</p>
<p>Nicely done !! </p><p>You are right, you code works better and I am going to put it in this instructable, with you name of course and thanks !!! </p>
<p>The first try for the Arduino</p>
<p>It can be said so. :)</p>
<p>Hi</p><p>how to make arduino using XC4245 sensor and can you show me the code as well?</p><p>cheers</p>
<p>If you provide me a datasheet of that sensor, I will be able to make new code.</p>
<p>Hi. thanks for the reply.</p><p>I am using new sensor now which is DHT22. You can find the datasheet in website below. Cheers!</p><p>http://www.freetronics.com/products/humidity-and-temperature-sensor-module#.U_lwE_mSy-A</p>
<p>Try this, I kope it works. The resistor and the potetiometer are 10k you can use and 50k potentiometer.</p>
<p>Can I read the recorded temperature from my laptop? I need to read it from there. My project doesn't include the LCD display. thanks!</p>
<p>This is it, now you can read the recorded data from the sensor on your laptop, just connect the sensor like on the pic above and upload the code then oper the &quot;Serial monitor&quot; and you will see the temperature and the humidity.</p>
<p>Do I need the library though?</p>
<p>Sorry for my late answer.</p><p>Yes you will need DHT library.</p>
<p>can you please help me connect this project into vb.net interface with mysql as database? </p>

About This Instructable




Bio: I am a dreamer, maker and an engineer making and sharing interesting projects here at Instructables. Follow me @ instagram: @the_gadget.boy
More by Konstantin Dimitrov:Arduino/Genuino 101 BLE Thermometer With TMP102 and Blynk Pixie: An Arduino Based NeoPixel Wristwatch Turn Your Old 2.5'' Or 3.5'' Hard Drive Into Portable/External 
Add instructable to: