jgraber
February 13, 2012, 6:27pm
1
Locked official answers forum q:
https://vexforum.com/showpost.php?p=260101&postcount=1
RoboDesigners , Senior Member, VEX # 2190
Potentiometer reading effectsdigital ports
Error description:
I am noticing that the value of a potentiometer is directly affecting the value of the digital ports on the Cortex.
The potentiometer I have on the arm reads values in the 150 range when it is all the way down, I then raise the arm ~1/16", and the potentiometer reading jumps to 1500, and then is continuous to ~3000.
When the pot is in the 150 range, the digital ports do not respond–the encoders do not read any change, and the LEDs plugged into the digital ports do not activate. When I raise the arm, though, all the digital out ports work fine.
See this video for a visual description of the problem: [http://youtu.be/Y3AhsfisCzM
I’m having trouble understanding why this is happening. Any help would be greatly appreciated.
Thanks!
//Andrew
Specs:
Cortex Microcontroller using VEXnet
Programmed in ROBOTC v3.05
Sensors of interest:
LEDs on digital out ports (multiple)
Potentiometer on analog in port.
Computer OS (shouldn’t matter, but including anyway): Windows Vista
](http://youtu.be/Y3AhsfisCzM )
#1 , is the potentiometer plugged in backwards?
#2 , the potentiometer has a range of only 240 degrees, and it doesn’t work well near the ends of the range. Rotate the body of the potentiometer so that the range of motion you use is in the center of the range of good readings.
Something told me I should have put the thread here…
Checked just now-no.
jgraber:
#2 , the potentiometer has a range of only 240 degrees, and it doesn’t work well near the ends of the range. Rotate the body of the potentiometer so that the range of motion you use is in the center of the range of good readings.
I will try that.
I’m still puzzled on why the pot should effect the digital ports, though…
//Andrew
jgraber
February 13, 2012, 6:38pm
3
If your pot is not plugged in backwards now,
then try plugging it in backwards anyway…
Power and ground are common across the whole group of digital pins.
The pot has the signal wiper sweeping from 5v to gnd across a resistor from power to ground. If its plugged in backwards, I think it one end of range will short 5v to ground. While the bus is protected from damage, the ports aren’t isolated from each other, so shorting the bus will prevent everything else on the bus from working.
Thank you for explaining that… it’s starting to make sense. (I’m going to experiment tomorrow… too late for robots tonight for me…)
Thanks
//Andrew