Sometimes LM35 analog temperature sensors give inconsistent readings. Reading fluctuations are simply too high. Specially if LM35 sensor is connected using a cable that is a meter long or longer. There are some techniques tu compensate for those fluctuations and get more consistent readings.… Read the rest
Starting from hardware side of things, all components were tested separately on breadboard. Putting all this together in a manageable package is just a bit of work.
The compnents used here are:
1x Arduino Duemilanove board
The next logical step for using sensors, in this case LM35 and DS18B20 temperature sensors, is to shield them somehow from elements. I am not very comfortable installing a bare sensor outside, into the rain for example.
Some kind of small metal pipe should bee good enough. I did find some electric cable connectors for a thick power cable in local hardware store.
I used some plasticine like stuff, which hardens in about an hour and is intended for emergency car repairs, to plug one end of that tube.
Finally got this DS18B20 working. Actually three of them. And in two modes. Parasite power mode and main mode.
A 4.7K ohm resistor is the key.
Starting with the main mode, three wires are needed, as this sensor has three pins.
Datasheet is here http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf.
Connection is almost simple.
Pin 1 to Arduino ground
Pin 2 to Arduino digital input
Pin 3 to Arduino 5V
And a 4.7K resistor between pin 2 and pin 3
Works with three wires, as seen on the followind illustration.
Checked out my local electronics store http://www.oomipood.ee yesterday and got some stuff.
First, a breadboard and some wires. Also got me a soldering iron. Those are just for testing. At least I do not have to twist wires together now.
Then I thought, LED-s are cool for something, right? There is a nice site http://www.ladyada.net/learn/arduino/lesson3.html. So I did get 10 1/4W 1K ohm resistors, and some leds, specifically 2 red, 2 blue and 2 green. 3mm and somewhere near 2000-4000 mcd.