Thursday, September 11, 2014

SELECTING YOUR VOLTAGE REFERENCE FOR ARDUINO #17

Arduino’s getting very much popular for DIYers due to its extremely easy interfacing and coding environment.


World’s is analog. That’s why analog to digital conversion is most for the Microcontrollers to get interfaced with outer world. Most of the raw sensor will give analog voltage or current as output.Like LM35 temp sensor. While other digital sensor’s got there own processors inside to give output in some standard format like SPI, IIC, Serial , or like 232 level or 485 or SDI level  of signals.
Using ADC’s need analog reference for operation . This is the voltage to which the Adc compare in analog input voltage and gives equivalent output digital value.
ADC’s measured with bit like 8 bits, 10 bits , 22 bits and something like that.
For a Adc with 5 v as reference with 10 bits output. What it does is it divides  5v by 2^10.
Which means ADC and detect the change in input voltage or signal by 5/2^10. This means about 5 mV.
But in actual its Vref / (2^(n ) -1).
Now,Vref, in many micontroller are generated internally by internal band gap reference , while it can be switched to external pin or to VDD.
Now what we’ve got is Vref should be chosen according to sensor’s output resolution. The less the Vref the more the sensitive is out ADC but also the input to ADC can never be higher than Vref. So with larger Vref resolution get decreased so higher ADC should be used.
In arduino Aref is by default the supply voltage.
It can be changed to INTERNAL reference. Internal reference on ATMEGA 328 and 168 is 1.1 v while in ATMEGA 8 is 2.56 volts. These got 10 bit of SAR ADCs with 6 channels.
Then it can be switched to external pin Aref.
This can be changed with line
analogReference(type);
where type is DEFAULT(5V OR 3.3V),INTERNAL(1,1V ON 168 AND 328 OR 2.56V ON MEGA8), INTERNAL1V1(1.1V ON MEGA328),INTERNAL2V56(2.56 ON MEGA328),EXTERNAL(AREF PIN).
Arduino Due got 32 bit ARM processor and got some more channel’s on ADC. Its running on 3.3 .
In Due analogReadResolution(1 to 32); can change the output resolution it got 12 bit of ADC with output ranging form 0 to 4095. Using parameter >12 make the 0 padding in extra bits.
Here’s the DUE’s analog read resolution page by arduino.

Here’s a quick comparision on ADC and other parameter on arduino boards http://www.djerickson.com/arduino/

No comments:

Post a Comment