Aduino thermometer using LCD sheild, an LM335 and servo.

A project trying out a few things for the first time.

1) An LCD shield that only uses 2 pins from the Arduino to control (using i2C). This was rwally easy to get going with a couple of lines of code.

2) An LM335 temperature sensor IC used as shown in the disgram with a 2.2K current limiting resistor and 10k trim pot for ajustment.

3) Controlling a servo using the Servo.h library included with Arduino. The trickiest thing here was figuring out the wiring on the servo as it was manufactures in the early 80s (Graupner). I found this helpful link with all the diffrent colour schemes used by the various manufacturers.

The code I wrote (attached) is very rough and could be tidies up a lot on error handling etc but seems to work a treat.

the interesting bits.

Converting from a 10mv per Centigrade ourput from the LM335 to an absolute tempterature:

float value = analogRead(0); float millivolts = ( value / 1024.0)*5000; float centigradeTemperature =(millivolts/10)-273.15;

Converting from a tempterature to an angle in the 180 degrees (ish) rotation of the servo: