6/18/2011

Temperature-Sensor Network with RTC and LCD Part III

We continue with the base station and start to implement the temperature sensor.

There are a lot of temperature sensors available. You could use simple thermistors, analog temperature ICs (like TMP36 or LM335) or digital ones like the Dallas DS18X20 (X stands for S/ B). They all have their pros and cons and I like to experiment with different sensors.

Analog Devices AD22100KT
This time I chose the Analog Devices AD22100KT in a TO-92 package. It's a "Voltage Output Temperature Sensor with Signal Conditioning" and has a large temperature span of 200°C (-50°C to +150°C) a nice linearity and accuracy (according to the datasheet). The datasheet declares an initial error of 0.5°C (at Ta = 25°C, AD22100KT) and a maximum error of 2°C. That sounds much better than the LM335 (at Ta = 25° it's 2°C inital error for LM335, max. 6°C) I worked with at some higher cost for the part and with 60°C more temperature range. Voltage supply is at least 4 (up to 6) volts and quiescent current ist 650µA maximum. As we connect the sensor directly to the Arduino both values are not that important this time (it will be if we connect a temperature sensor directly to the XBee - more on that later).

Datasheet Analog Devices AD22100
You will need a 1k ohm resistor and a 0.1µF capacitor between Vout and the analog input to drive the temperature sensor.
The datasheet also gives insight into the formula we later need to calculate the temperature from our analog readout: Vout = (V+/ 5V) * [1.375V + (22.5mV/ °C) * Ta]. It's the formula where we see the sensor has a temperature coefficient of 22.5mV/ °C (that's techspeak and means the voltage changes by 22.5 millivolts per degree celsius).




The next module ist the Real Time Clock (RTC) DS1307. It's one of Dallas Semiconductor (now Maxim Integrated Products) famous clock-ICs and it's quite easy to build and program. You connect the IC via analog inputs 4 and 5 to the Arduino. That are the I2C pins of the microcontroller and you can use one of the RTC libraries that are available (you can find a great tutorial here).You only need two resistors for the SDA and SCL lines, the 32,768kHz crystal and the 3 volts backup battery (like a Lithium 2032 3 volts coin cell).

Well so far we are almost done with the base station. Please be aware that the left and right power rails of the breadboard are not connected, because the left power rails have 3.3 volts and the right rails are supplied by the 5 volt output from the Arduino UNO.

Arduino UNO with XBee, RTC DS1307 and AD22100KT
In the next part we will finish the base station by connecting the LCD and having a look into the code for the Arduino UNO. In the meantime have fun!

No comments:

Post a Comment