Pages: [1]   Go Down
Author Topic: Is it possible to saturate analog inputs?  (Read 307 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got a Mega1280 board, and I've set the reference voltage to 1.1
I've got an input on analog pin 5 that is within range.
My code reads the pin every second or so.

On the serial monitor, I get a reading every second for the first 5 or 10 seconds and then it's just 0 forever after.

Do I need to take into account something like letting the analog input reset, or read slower? I have the feeling I'm "overwhelming" the input...?

Cheers
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're using the AREF input as your reference, you need to declare it in your setup.

The analog inputs get "saturated" at +5v which will read as 1024 when you read the analog in.

Hope maybe this helps.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I'm using this:

  analogReference(INTERNAL1V1);
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That should be OK. Check that you have nothing connected to the Aref pin, and post your code. What is driving the analog input?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: [1]   Go Up
Jump to: