[En-Nut-Discussion] Analog inputs
Ole Reinhardt
ole.reinhardt at kernelconcepts.de
Thu Mar 22 11:40:42 CET 2007
Hi,
> let's suppose that i have a constant vlotage source e.g. 0.8V
>
> 1) If I do not apply any voltage reference I suppose that the measured
> range is 0-5 V. Is it correct?
That depends on the reference Source you habe set in your software. The
reference could be set to AVCC, AREF, internal 2,56V. Maximim input
voltage is 5V. The measurement range depends on the reference voltage.
Value 1023 always corresponds to the reference voltage.
So if you do not apply anything you can still switch between AVCC and
internal 2,56V reference. AFAIK AVCC is default.
> 2) If I want to measure a different range how can I do it? Is the
> analog reference a shift for the 0 value? So if I Apply 1V to the
> reference voltage do I measue ona a -1 to 4 V scale? If I want to
> measure a range from -0.5 to 1 V do I have to amplify the signal to
> 0-5 or do I have any smarter way?
No, the maximum input is always 5V. Maximum measurement voltage is
always the reference voltage. Minumum input / measurement voltage is 0V.
If you want to measure a different voltage you have to convert the
measurement range with some operational amplifiers.
You will need:
- Voltage follower (1:1 translation from german Spannungsfolger) to have
a high impedance input.
- A new voltag reference for the amplifier. (Can be done with another
opamp).
- a differential amplifier (reference voltagt to you voltage to shift
the 0 point).
- an inverting amplifier to scale the output to the correct range for
the atmega.
All in all you'll need four OpAmps. Normaly they are included in one
package (lm324 for example).
http://en.wikipedia.org/wiki/Operational_amplifier
http://web.telia.com/~u85920178/begin/opamp00.htm
http://ourworld.compuserve.com/homepages/Bill_Bowden/opamp.htm
Hope this will help you.
Best regards,
Ole Reinhardt
--
kernel concepts GbR Tel: +49-271-771091-14
Inh. Faerber & Kirchner Fax: +49-271-771091-19
Sieghütter Hauptweg 48 Mobil: +49-177-7420433
D-57072 Siegen UstID: DE 205 648 898
More information about the En-Nut-Discussion
mailing list