Pages: [1]   Go Down
Author Topic: I think my ADC friend, anything else to test before replacing the chip?  (Read 945 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Board: Arduino Uno

I suspect the ADC on my Arduino has fried. When I call analogRead() on any of the pins (tried 3,4,5) and print the value to the serial port I read a value that starts at 300 and drops until it stabilizes around 250, similar to what you see for a floating pin. Here is the pertinent part of the code I am using for testing.

Code:
void loop()
{
  val = analogRead(5); 
  Serial.println(val);
}

The output on the serial monitor looks something like:

Quote
300
295
290
284
...
256
255
256
255

I have the wiper of a pot connected to pin 5 and have used a volt meter to make sure the pot is not faulty.

At this point I'm assuming the ADC is friend and I need a new chip. Is there anything else worth looking into before I place the order?

Thanks.

- Matt

Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2573
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the value of the pot?
« Last Edit: August 31, 2011, 08:18:42 am by Magician » Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6141
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What does the volt meter read when you are making your measurements?

What is returned when you connect the analog input directly to 5v or GND?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well before tossing the chip, disconnect your wiring to analog pin 5 and wire it to ground and see what value you get back, should be 0 counts. Then wire the pin to +5vdc, it should then read 1023 counts. If that works post your wiring drawing and include component values and we shall have a look.

Lefty

Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
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

The output on the serial monitor looks something like:

Quote
300
295
290
284
...
256
255
256
255

I have the wiper of a pot connected to pin 5 and have used a volt meter to make sure the pot is not faulty.

That's entirely normal if you are using a high-value pot, e.g. 1Mohm. You should not see that effect if the pot is ~10Kohm or lower.
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.

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

I'm quite embarrassed to admit it, but this turned out to be a case of "tinkering late at night after a long day in the office" and can be chalked up to a simple oversight. I managed to plug into D5 instead of A5, arg......

Thanks to all who replied, and I sincerely apologize for wasting space on the board. As penance I will try to drop by more often to give input on any questions I can help with.

- Matt
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm quite embarrassed to admit it, but this turned out to be a case of "tinkering late at night after a long day in the office" and can be chalked up to a simple oversight. I managed to plug into D5 instead of A5, arg......

Thanks to all who replied, and I sincerely apologize for wasting space on the board. As penance I will try to drop by more often to give input on any questions I can help with.

- Matt

No problem, brain farts are allowed and happen to all of us from time to time.  smiley-wink

In the Air Force we would call such problem sources as "A short between the headsets"
Logged

Pages: [1]   Go Up
Jump to: