Pages: [1]   Go Down
Author Topic: Analog probe being pulled up by separate potentiometer.  (Read 807 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I built a lovely little EMF detector using this as a starting point:

http://blog.makezine.com/archive/2009/05/making-the-arduino-emf-detector.html

The probe is connected to A5 with the resistor connected to ground on the Analog pin side of my protoshield.  I've now connected a potentiometer (which will eventually control some things but does nothing for now) to A1 with its ground pin connected to the same ground rail as the A5 probe.  If I connect the pot to the board but pretend it doesn't exist in my sketch, the EMF probe on A5 returns its appropriate readings:

Quote
Probe: 147
Probe: 293
Probe: 585
Probe: 293
Probe: 74

However, if I make variables for the pot:

Code:
int potPin = 1;
int potVal = 0;

and then take a reading:

Code:
potVal = analogRead(potPin);

As I turn up the pot, the probe quickly maxes out:

Quote
Pot: 0   Probe: 147
Pot: 24   Probe: 439
Pot: 52   Probe: 1023
Pot: 76   Probe: 1023
Pot: 100   Probe: 1023

and stays at maximum until I turn the pot back down to almost zero.  There's obviously some sort of interference between the two.  I think it's a software problem because the interference only appears when the Arduino (Uno SMD) begins to read the pot, but I'm at a loss about what to do or where to look. Any guidance anyone here can offer is immensely appreciated.
« Last Edit: February 07, 2011, 09:12:54 pm by Brychanus » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll see what I can do regarding the diagram, but I've never done one so it'll have to learn the software.  If anyone else has any thoughts in the mean time, I'd appreciate it.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 604
Posts: 33432
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but I've never done one so it'll have to learn the software
No we need a schematic not a physical layout thing. You draw those with a pen and paper and then photograph it.

That said your problem is that your EMF sensor has too higher input impedance to charge the input capacitor at the front of the A/D's sample and hold circuit.
One solution is to take two readings of the sensor in succession and throw away the first and only use the second. If that dosn't solve it then put a delay between the two readings.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent! Taking two readings with a delay(15) between them gave me a probe reading that's not influenced by the potentiometer.  Thank you very much!
Logged

Pages: [1]   Go Up
Jump to: