Pages: [1]   Go Down
Author Topic: Reading potentiometer from another circuit  (Read 488 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26467
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

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

 
Logged

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

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

Pages: [1]   Go Up
Jump to: