Pages: [1]   Go Down
Author Topic: analog input not reading correctly  (Read 104 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 504
Posts: 31327
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: