Copyright © Parallax Inc.
Gimbal Joystick with Adapter (#27808)
v1.2 11/13/2019 Page 7 of 9
RCTIME Circuit
Lacking an analog-to-digital converter, it is still possible to measure the joystick position by timing the
discharge of a capacitor. Here’s the circuit, which is applicable to the BASIC Stamp family of products:
Horizontal 5K Pot
Vertical 5K Pot
GRN
BRN
ORG
YEL
BLU
BLK
Quad-Bearing Gimbal Joystick
0.1uF
0.1uF
220R
220R
Horizontal
Vertical
To measure each wiper position, the attached microcontroller will charge that wiper’s capacitor by
outputting a high on the associated pin. Then it will tri-state the pin and let the cap discharge through
the potentiometer to ground and time how long it takes for the voltage to go below the micro’s input
logic threshold. The higher the resistance being measured, the longer the discharge time will be.
BASIC Stamp Example
The wiring diagram below is compatible with the BASIC Stamp Board of Education or HomeWork Board.
Connect the joystick, the two resistors, and the two capacitors to the breadboard as shown below.