Go Down

Topic: Reading potentiometer from another circuit (Read 584 times) previous topic - next topic

srrichie

Hi guys,
I've spent the last 5 hours wondering how could solve my problem, hope someone can help me.
I've opened a gamepad controller (steering wheel + pedals), and I would like to read the values of the pedals in my Arduino. They obviously are simple potentiometers powered on by USB.
The question is.... I can read with my multimeter 2.2 Volt output from one potentiometer when the pedal is not pressed. When pressed voltage goes to 0.
I've connected one pin of the pot. to my AREF pin, and the other to an analog pin. I can read values from 10/15 to 1023, but they are behaving quite weirdly. I mean that the analogRead is always almost at 10, I press the pedal and it's not incrementing, then if i keep on pressing it it suddenly jumps to 1023.
Are the connection ok? Is there something that I'm missing? (<- Sure )
Thx guys


RuggedCircuits

Quote
I've connected one pin of the pot. to my AREF pin, and the other to an analog pin.


Errr...this doesn't sound right. I'd leave the AREF pin alone. If it's "powered on by USB" then reading the values relative to the Arduino's 5V reference should be good enough.

You also have to be specific regarding which pins of the pot you're hooking up where. Do you have a diagram you could maybe post?

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

CrossRoads

Connect to an analog input Pin (A0 to A5) and not the Aref pin - Aref sets the 'sensitivity' of the bits: when Aref is at 5V, 1 bit change in value is ~4.89mV.
Thus you should see a digital reading of ~(2.2/5)*1023 = 450
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

retrolefty

RC is correct. You need to leave arduino Aref pin disconnected. You need two wires from your pedal circuit, a ground reference wire from the pedal to arduino ground, and a wire from the pedal wiper terminal to a arduino analog input pin. This is all conditional that the wiper to reference terminal of the pedel is always within 0-+5vdc only.

Lefty


srrichie

Thx guys,
I was trying to use the AREF pin because it seemed to me that the voltage in which the pedal is operating is not 5 V. When I opened the pedals part, the first stuff I did was testing the voltage of one of the pot. pedals, and I found this 0/2.2 V. I tested the voltage between Vin and the central pin of the pot, that are actually the only pins cabled in the controller (this thing get me very confused)
Sorry guys, I know that this sound confused but I'm getting very tired, here it's almost 3 AM.
Hope you could help me more...

Go Up