Reading pot with different voltage using the Arduino Uno

Hi,

I'm using an Arduino for hacking an infrared rc remote of a helicopter.
I've got a problem with reading the value of a joystick-potentiometer used to control it:
I'm trying to get the position of a joystick on a rc remote of a little helicopter. The pinout of the pot is quite like this one:

But the voltage of the pot that you have at vin is much different than the one used in the Arduino (Arduino:5V; RC Remote: less than 0.1V).
Can the Arduino read such low values?

Thanks and sorry for poor English :blush:,
morymac

Look here: analogReference() - Arduino Reference for info on using the external analog reference. I don.t know if you can set it that low and still be accurate.

Charlie

The minimum Analog Reference is 1V. You can use the internal 1.1V reference and get close to 1 mV resolution. That would give you 100 steps between 0V and 0.1V. I hope that is good enough.

It is my understanding through reading the analogReference page that the internal 1.1V ref is only available on Mega. The page says that the EXTERNAL ref can be 0-5V. My question is that if the ref is set too low what kind of resolution and accuracy can one expect.

On the Arduino UNO the 1.1V internal reference is just called "INTERNAL".

The datasheet for the ATmega168/328 shows the minimum Vref as 1.0V so I think the Arduino documentation showing the range as 0V to 5V is wrong. The correct range is 1.0V to AVcc (5V).

Another thing to note is the built-in '1.1V' reference have a range from 1.0V to 1.2V so don't take that 1.1V as absolute.

Thanks, John, for the clarification.

Charlie

Well, I've just tried that out with this code:

void setup(){
pinMode(A0,INPUT);
Serial.begin(9600);
analogReference(INTERNAL);
}

void loop(){
int sensorValue = analogRead(A0);
Serial.println(sensorValue, DEC);
delay(1000);
}

But the results that I get out of that are quite confusing.
When the A0 pin isn't connected to the pot itself, the serial monitor shows me values between 736 and 1023 for like 10 seconds. After I connected the wire it sinks down to 0 where it stay till I unconnect the cable again.

Thinking about the pinout of the pot put up another question. Where would you connect the A0 cable?

Back side, i think the bigger two pins are just for keeping the pot on the board, two of the three pins in the row are soldered together.

Front side

Thanks,
morymac

Looks like it's using the pot as a variable resistor and using that and R16 as a voltage divider. The connection between the two should have a voltage that changes with pot position. Be sure that Arduino Ground is connected to the controller ground.

Thanks for your reply. That should solve my problem (gonna try that out now). To which GND on the controller should I connect? To the one of the pot or to the 9V Battery holder?

Thanks!
morymac

morymac:
Thanks for your reply. That should solve my problem (gonna try that out now). To which GND on the controller should I connect? To the one of the pot or to the 9V Battery holder?

Whatever ground the controller chip uses. Often that will be the negative side of the battery but it's fairly easy to find the ground traces because they tend to be large and used in lots of places.

Wohoo! That works! Thank you all! I'm gonna post the result of all of that here.