Monday, 18 March 2013

What can you do with an Analogue to Digital Convertor?

Following the post on the Custard Pi 2 which has 2 analogue inputs, this one looks at some applications for A to D convertors.

Temperature measurement

Temperature is a continuously variable analogue measurement. To allow decisions to be made, this needs to be converted into a digital signal. TMP36 is a 3 pin device that measures temperature and presents a voltage proportional temperature. For example, at a temperature of 50 deg C the output voltage is 1V. An excellent summary of this is presented here http://learn.adafruit.com/tmp36-temperature-sensor

tmp36pinout.gif

The Custard Pi 2 analogue input has a range from 0V to 3.3V with 12 bits. The maths for working out the voltage is quite straightforward.


Current measurement

Split core current clamps present a voltage of 0.33V when the rated maximum current passes through the wire being monitored. Here is data on a split core current clamp rated at 20 A


Split Core CTs

To get the voltage to a reasonable level, one would need to amplify the signal by x10 to give a voltage of 3.3V when a current of 20 Amp is flowing.

With 12 bits, 4096 bits will represent 20 A, 1024 bits will represent 5 Amps.

Accelerometers

The ADXL335 chip is a 3-axis accelorometer that outputs a voltage proportional to acceleration in the x, y and z axis. Wow - this means we can a motion sensor for a robot to identify exactly where it is. The A to D generator will allow us to measure the acceleration in the 3 axis which will allow the computation of the exact position of the device.

 ADXL335 - 5V ready triple-axis accelerometer (+-3g analog out)

This chip is available as a assembly here.

In summary, having an A to D function allows the Raspberry Pi to interface to the real world and monitor temperature, current and motion.




No comments:

Post a Comment