Page 1 of 1

ADC Flowcode V5

Posted: Thu May 08, 2014 5:26 pm
by Jason Q
Hi guys I have no experience in the use of ADC. I am doing a project using Zigbee Eblocks (EB051C and EB051R).
I have found an example flowcode program showing me how to initialize the Network and add my second node.
The problem is the example program shows how to transmit characters pressed on a Keypad EBlock and display the pressed characters at the opposite node on a graphical LCD Eblock.
I have 2 EB006 programmer boards for the two nodes, I have an EB005 LCD for node 1 and have used an AD592 temperature sensor (273 micro amps = 0 Degrees Celsius) output through a 1k resistor to get a voltage output (273 micro amps = 273 mV).
I require to transmit this voltage and display it on my LCD EBlock.
Can somebody help me with the ADC part of the program as I need to display "Temp is 0 Degrees Celsius" on my LCD when the input voltage on the ADC pin of the micro-controller (16F877A) is 273mV.
For each mV after 273 the Temperature display should increment by 1. (Eg 274mV=1, 275mV=2, .......... 300mV= 27 Degrees Celsius.
I only require to measure room temperature with the sensor.
Any info would be greatly appreciated,

Thank you.

Re: ADC Flowcode V5

Posted: Fri May 09, 2014 11:30 am
by LeighM
Hi

There are a lot of examples of this on the forum, try the search feature, it will give you topics such as this one
http://www.matrixmultimedia.com/mmforum ... 20&#p53036
medelec35 gave a good explanation of how you can calculate temperature from an ADC input.
You need to consider the resolution of the ADC (e.g. 8 bits, 10 bits) and the reference voltage used, from which you can calculate the step voltage for each bit increment and then compare that with the sensor output.
You might need to consider changing the value of the resistor

Leigh