Setup the LM335 Therometer using the Arduino

About: The LM335 is a simple thermometer with only 3 pins. It can be easily interfaced to the arduino or any other microcontroller. The LM335 is pretty much just a diode in a TO-92 case. The voltage rises 10mv for every degree in Kelvins. You will pretty much need to convert the kelvin temperature to Celsius or Fahrenheit using simple calculations.

Objective: To build a simple digital thermometer using a LM335 and an Arduino.

Material: You will need the following:

Instructions: The connections are very simple, you will only need to use 2 of the 3 pins on the LM335. Pins 2 and 3 will only be used. Refer to the breadboard diagram below for connections. The resistors connects to the middle pin of the LM335. The middle pin then connects to the arduino analog0. Pin 3 of the LM335 is connected to ground.


Calculations: The calculations are based off the Wikipedia for Kelvin. To calculate the Kelvin we read the analog0 pin on our arduino. We multiply that value by .004882812. Why .004882812? We get that by dividing our 5v (Power Supply) by 1024 (10bits based off arduino analog). After we get our Kelvin we – 273.15 to get our Celsius. To get our Fahrenheit we multiply our Kelvin value by 9/5 and then subtract 459.67.

Arduino Code:

If you have any questions or comment leave a comment.

Leave a Reply