Connecting the output of an op amp to analog in of atmega168

Status
Not open for further replies.

danjel

Member
On one of the analog inputs of an Atmega168 I have a series of two inverting op amps (first one reduces gain by 2, second one re-inverts signal. Using this configuration so that the first opamp can have a +5V connected to it in order to shift a bipolar source signal up). I am using TL072 amps connected to +/-12v

The output of the opamps is connected directly to clamping diodes so that the final output is limited to the range of 0-5V.

For the most part this is working but occasionally I am getting readings with higher than normal noise flutuations (at specific input voltages). I am concerned about how I have connected the opamp to the analog input pins and wonder if I need a current limiting resistor (200r ?) and perhaps even a capacitor to ground?

The signals I am reading at this input are relatively slow changing.
 
It may be also do to power supply instability..

If you signal is slow changing, i don't see why you should get any fluctuation.

you can try to feed the ATMEGA analog input with a voltage reference (zenner + resistor) and see if the reading is stable.

One last advice for the road, always skip the first 1 or 2 readings from the ADCs of the ATMEGAs! they are not reliable enough ( i read it somewhere on the datasheet)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…