# Temperature Controlled LEDs

533

LEDs do many jobs like giving indication, making digits on display boards, transferring information like the one we do with remote control. LEDs are heroes of electronics and actually "unsung" heroes. Not only this but they are widely used to illuminate our houses. Here we are using them to show the temperature. Of course not numbers but at least they can indicate if the temperature is hot, cold or just right. The circuit we will be making is built around Arduino UNO and LM35 IC.

Arduino UNO has made its place in every to every maker's toolbox. Arduino UNO is extremely pouplar because you can just unpack it and blink LED in under a minute.And also the language it is compatible which is C/C++ which have wide popularity.

Okay, so let's get on with the project and we will look towards one more hero of this project and that is our sensor.

## Step 1: Things We Will Need

1. Arduino UNO

3. LM35 temperature sensor

4. Red LED

5. Green LED

6. Blue LED

7. Jumper wires

8. Arduino IDE(software)

9. USB cable(the one that will connect our Arduino to PC)

## Step 2: About LM35 Sensor

LM35 is an excellent, accurate and versatile temperature sensor. LM35 is an IC which gives output proportional to temperature in degree Celsius. Temperature range of this IC is -55 to 150 degree Celsius. The rise of voltage at each degree in Celsius is 10mA i.e. 0.01V/Celsius.

LM35 can be easily interfaced to Arduino and other micro controllers.

Applications:

1. Temperature measurement

2. Auto thermal controller

3. Checking temperature of batteries

Pin configuration:

There are three pins in the IC:
1. +VCC

2. Output

3. GND

When we provide the 4-20V to the IC. There will be change in voltage at output pin. When the temperature is 0 degree Celsius, the output would be 0V. There will be rise of 10mA at every Celsius increased. To calculate temperature from voltage, we need to use this formula

Vout=0.01V/Temperature

## Step 3: Understanding Our Sensor

Here we will try to understand LM35 IC. Connect +5V of power supply to 1st pin of IC and connect Ground at 3rd pin of IC. Then, connect positive terminal of multimeter at 2nd pin of IC and Negative terminal of multimeter at 3rd pin of IC. You will get the voltage and if you put the sensor near a hot thing, the voltage will increase.

## Step 4: The Circuit

So now it's time for making our project. You need to follow the circuit diagram to connect LEDs. And I have not included sensor in schematic because there is no LM35 sensor in tinkercad. Sorry about it but follow the instructions given below to connect the sensor.

1. Connect 1st pin of IC to +5V of Arduino

2. Connect 2nd pin of IC to A2 of Arduino

3. Connect 3rd pin of IC to GND of Arduino

Now our hardware part is finished and the only thing we need to do is to uploading the code.

## Step 6: Done!

After uploading the code you will see that your LED starts glowing means a color of LED according to the weather will glow. By the way I forgot which LED stands for what temperature status. Actuallly,

If red LED glows, temperature is hot.

If blue LED glows, temperature is cold.

And if green LED glows, temperature is just right!

One more thing, if you open serial monitor and set the rate to 9600 bits per second, you can get a statement if the temperature is hot, cold or just right.

So thank you very much for reading this and I hope you like this tutorial.

Thanks!

Participated in the
Colors of the Rainbow Contest

## Recommendations

• ### Internet of Things Class

20,012 Enrolled