Go Down

Topic: analog input not reading correctly (Read 229 times) previous topic - next topic

imsmooth

I am reading from analog pin 0. When I feed 5v in from the source voltage I get 1023 read within my code. I can take a simple resistive voltage divider and correctly read the voltage with the ADC.

Now, I take an opamp output of 4.7 volts and feed it in directly. I read 4.7 volts on the physical pin, but I am getting way too low a value within the code. In fact, I am reading a value less than 0.5v if I convert the adc value back to a voltage. Is there a problem taking the output of the opamp? Should I use a voltage follower? Should I put a capacitor in there. This is some circuit issue, but I am unsure which way to go.

Grumpy_Mike

It sounds like a problem of grounds.
Post a schematic of what you have and how it is powered.

imsmooth

It has something to do with the opamp I'm using. I'm using a low-offset LC6064 which works great for my circuit specs, but doesn't seem to work well for the ADC. When I swap a MC3403 the ADC works fine.

I have to look at the specs on these chips.

imsmooth

figured it out.
it has to do with the source impedance and the adc capacitor charge time.

Go Up