Introduction: LM35 LED Temperature Bar
This is my first instructable, I have watched the website for a few years now and have recently done one of my first, worthy of record, project. Using an LM35 precision temperature sensor,I then display the temperature on a scale of 8 LEDS. The downside to this current set up is that you can only view 8 degrees of temperature.
Arduino, I used an uno
Resistors for LED
In the code you can change the temperature triggers for the LEDs, to better suit your situation.
Step 1: Breadboard Setup LEDs
I will upload a circuit diagram/fritzing when I have the time.
It is a very basic setup, don't be confused by my excessive use of wires.
To begin with locate 8 LEDs of your own preferred colours and put them into your breadboard, positive leg into the main tracks, negative into the ground rail.
Next put your resistors from the track opposite your led, over the middle and into the same track as each individual LED.
Now plug jumpers Into the same tracks as your resistors, 8 in total and connect them to pins 2,3,4,5,7,8,9,10 on your arduino.
Finally link the ground rail of your breadboard to ground on your arduino.
Step 2: Breadboard Setup Sensor
I decided to use an LM35 simply because it worked for me but other sensor in a similar package should work.
Ben the sensors legs into 3 lanes on the breadboard, use the image above to wire out 5v to arduino 5v, analogue voltage out to arduino A0 and Ground to the ground rail on the breadboard.
Your breadboard should now be setup.
Step 3: The Code
The code itself is very beginner code as I am still working on a way to condense it using the array functionality.
Apologies, i thought the code was in already on text form.
int tempPin = 0;
int pin2 = 2;
int pin3 = 3;
int pin4 = 4;
int pin5 = 5;
int pin7 = 7;
int pin8 = 8;
int pin9 = 9;
int pin10 = 10;
temp = analogRead(tempPin);
temp = (5.0 * temp * 100.0)/1024.0;
Step 4: Done
Please give me feedback and opinions.
joesinstructables made it!