Extension board · Sensors and inputs
A console-style thumb joystick on a chainable analogue board: two potentiometers give the X and Y position as voltages, and pressing the stick closes a switch. The controller firmware can act on the switch today; reading the two axes needs a driver that does not exist yet.
| Purpose | Jogging two machine axes by hand, menu navigation, pointing a camera or small robot |
| Joystick | Alps Alpine RKJXV1224005: two linear 10 kΩ (±30 %) potentiometers and a push switch |
| Outputs | X and Y analogue voltages through a 1 kΩ and 10 nF filter each; switch active low with a 10 kΩ pull-up |
| Supply | 3.3 V from the socket. 5 V only passes through to the chain socket |
| Sockets | Two 10-contact Gadgeteer type A sockets (Samtec SHF-105, 1.27 mm): input and chain |
| Test points | Six on the underside: 3.3 V, ground, 5 V, X, Y and switch |
| Size | 50 × 40 mm, four M3 mounting holes |
| Works with | Smoothieboard V2 Prime, header GH: switch through the button box module; no firmware driver for the axes |
| Licence | Open hardware, CERN-OHL-S-2.0 |
Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.
The numbers on the drawing match the list below it. The board is shown from the component side.
1Input socket A IN (J1) — The type A socket to the controller. Contact 3 is X, 4 is Y and 6 is the switch.
2Chain socket A CHAIN (J2) — Passes the unused contacts to a further board. The three contacts this board uses are cut off from it by open solder links.
3Thumb joystick (RV1) — Two potentiometers and a push switch in one metal-framed body. The cap is not part of the joystick part number: choose one for its 4 mm shaft.
4Wiper resistors (R1, R2) — 1 kΩ in series with the X and Y wipers. They also limit the current if a controller pin is driven by mistake.
5Axis filter capacitors (C1, C2) — 10 nF to ground on the X and Y outputs, to remove high-frequency noise.
6Switch network (R3, R4, C3) — 10 kΩ pull-up, 1 kΩ series resistor and 100 nF capacitor: a clean active-low signal.
7Supply capacitors (C4, C5) — 100 nF and 10 µF on the 3.3 V rail that feeds both potentiometers.
8Chain links (JP3, JP4, JP6) — Open as delivered. Closing one hands that contact to the chain socket.
9Mounting hole — One of four M3 holes in the corners, not connected to ground.
The Gadgeteer socket numbers contacts 1 to 10; check numbering with the power removed before wiring by hand.
| Contact | Signal | Use | Prime header GH |
|---|---|---|---|
| 1 | 3.3 V | Feeds the potentiometers and pull-up | 3.3 V |
| 2 | 5 V | Passed to the chain socket only | 5 V |
| 3 | X_OUT | X axis voltage | PC3 (ADC1_5) |
| 4 | Y_OUT | Y axis voltage | PA3 (ADC1_6) |
| 5 | Passed through | Not used here | PC2 (ADC1_4) |
| 6 | SW_OUT | Switch, low when pressed | PF2 |
| 7, 8, 9 | Passed through | Not used here | PI10, PH7, PB12 |
| 10 | GND | Ground | GND |
Contacts keep their numbers. Contacts 1, 2, 5, 7, 8, 9 and 10 are joined straight to J1.
| Contact | On J2 |
|---|---|
| 1, 2, 10 | 3.3 V, 5 V and ground, always connected |
| 3, 4 | Only with JP3 or JP4 closed |
| 6 | Only with JP6 closed |
| 5, 7, 8, 9 | Always passed through |
Use the four M3 holes with insulating spacers, and leave room for the cap to tilt 23 degrees in every direction.
Plug J1 into header GH. Never connect the element supply or a signal to 5 V.
Power up and measure between ground and test points X and Y with the stick released.
By the joystick data sheet each axis rests between 41 % and 59 % of 3.3 V, about 1.35 to 1.95 V; at full tilt it goes below 26 % or above 74 %.
Use the button box entry in the next section, restart, and press the stick while watching a terminal.
The configured command should run once per press. Which direction raises X or Y is not given by the files: note it on your board and swap it in your own code if needed.
| You want | Module | Example |
|---|---|---|
| Act on a press of the stick | Button box | The entry below |
| Read the X and Y position | None | No firmware module reads a joystick |
| Jog axes with the stick | None | No analogue jogging exists |
Add this to config.ini. PF2! inverts the pin, so the button counts as pressed when the board pulls it low. Replace the echo command with the command you want to run.
[button box]
stick.enable = true
stick.pin = PF2!
stick.press = echo joystick pressed
The syntax follows the SmoothieV2 button box module and its sample configuration. SmoothieV2 names the analogue inputs on PC3 and PA3 ADC1_5 and ADC1_6, but has no module that turns them into jogging or menu movement.
Each axis is a voltage divider across the socket’s 3.3 V. Because the controller’s converter measures against the same supply, a slightly high or low rail does not move the reading: the output is a fraction of the supply. The data sheet asks for a load above 1 MΩ on the wiper, so the board adds no resistor to ground. Releasing the stick springs it to centre, but the centre voltage varies from part to part, so software needs a calibration step and a dead band.
The switch line is held at 3.3 V by 10 kΩ and pulled down through 1 kΩ when pressed, which gives about 0.3 V. The 1 kΩ also limits the capacitor’s discharge through the contact.
Three links keep the joystick’s own signals off the chain. Leave them open while the joystick is in use: another device on the same contact would corrupt the reading.
| Link | What it does | As delivered |
|---|---|---|
| JP3 | Joins J1 contact 3 (X) to J2 contact 3 | Open |
| JP4 | Joins J1 contact 4 (Y) to J2 contact 4 | Open |
| JP6 | Joins J1 contact 6 (switch) to J2 contact 6 | Open |
A second board plugged into A CHAIN can use contacts 5, 7, 8 and 9. Contacts 3, 4 and 6 belong to the joystick. The chain does not create new controller pins.
| Contact | Signal | On A CHAIN |
|---|---|---|
| 1, 2 | 3.3 V, 5 V | Passed on |
| 3, 4 | X, Y | Stopped by open links |
| 5 | Free analogue input | Passed on |
| 6 | Switch | Stopped by an open link |
| 7, 8, 9 | Free | Passed on |
| 10 | GND | Passed on |
| Symptom | Likely cause | What to check |
|---|---|---|
| Both axes read near zero | No 3.3 V | Test point 3.3 V; cable seating and orientation |
| Centre is not half the supply | Normal part spread (41 to 59 %) | Calibrate the centre with the stick released and use a dead band |
| An axis moves the wrong way | Direction is not fixed by the design files | Invert it in your software |
| X and Y are exchanged | Axis assignment taken from the part drawing | Swap them in your software |
| Switch never triggers | Wrong pin or missing inversion | Use PF2! and check test point SW goes to about 0.3 V when pressed |
| Switch is always active | Pin not inverted | Add ! after the pin name |
The board has no indicator lights; the underside test points show every signal.
Still stuck? Read how to ask for help or see the general troubleshooting guide.
| File | What it is |
|---|---|
| Schematic (PDF) | The circuit diagram |
| Parts list (CSV) | Every component with its value, footprint and part number where one is chosen |
| Board drawing (PNG) | The top view used on this page |
| 3D view, top (PNG) | Rendered from the design files; the joystick body is an approximate model |
| 3D view, angled (PNG) | Rendered from the design files; the joystick body is an approximate model |
For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side. Keep metal hardware under the board clear of the joystick’s soldered tails.
| Hole | X (mm) | Y (mm) | Diameter | Use |
|---|---|---|---|---|
| 1 | 5.00 | 5.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 2 | 45.00 | 5.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 3 | 5.00 | 35.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 4 | 45.00 | 35.00 | 3.2 mm, not plated | Mounting, M3 screw |
Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.
| Parameter | Applies to | Lower | Nominal | Upper | Basis |
|---|---|---|---|---|---|
| Supply voltage | J1 contact 1 | — | 3.3 V | 5 V | Alps data sheet element maximum 5 V DC; the board is designed for 3.3 V |
| Element resistance | RV1 | 7 kΩ | 10 kΩ | 13 kΩ | Alps data sheet |
| Supply current, stick released | 3.3 V | — | 0.66 mA | 0.94 mA | Calculated; upper at −30 % element resistance |
| Extra current while pressed | 3.3 V | — | 0.30 mA | — | Calculated |
| Centre output | Contacts 3, 4 | 41 % | 50 % | 59 % | Alps data sheet, share of supply |
| Full-tilt output | Contacts 3, 4 | 26 % or lower | — | 74 % or higher | Alps data sheet, share of supply |
| Operating angle | Stick | — | 23° | — | Alps data sheet |
| Axis settling to 0.1 % | Contacts 3, 4 | — | 0.24 ms | — | Simulated, no controller load |
| Switch low level | Contact 6 | — | 0.30 V | — | Simulated |
| Wiper load | Contacts 3, 4 | 1 MΩ | — | — | Alps data sheet recommendation |
| Part | Limit | Use on this board |
|---|---|---|
| Joystick elements | 5 V DC | 3.3 V |
| Push switch contact | 50 mA | About 3 mA discharge peak (calculated) |
| Filter capacitors | 50 V | 3.3 V |
| Series resistors on a wrongly driven pin | 3.3 mA at 3.3 V | Calculated limit set by 1 kΩ |
The wiper filter and the switch network were simulated with ngspice. The wiper case uses the middle of a 10 kΩ element, which gives the highest source resistance.
| Result | Simulated value | Limit | Outcome |
|---|---|---|---|
| Centre output at 3.3 V, 10 k element, no load | 1.65 V | 1.64 V to 1.66 V | Within |
| Settling to 0.1 % after a step | 242 µs | at most 1 ms | Within |
| Switch output when pressed | 300 mV | at most 500 mV | Within |
| Switch output 5.9 ms after release | 3.29 V | 3.2 V to 3.31 V | Within |
Not simulated: stick travel, wiper noise and contact bounce (the manufacturer gives no model), the controller’s sampling load, ground offsets, electrostatic discharge and temperature.
The first page of the joystick’s manufacturer specification. Click the page to open the PDF. The copy is the series specification and drawing; match the variant you buy against the drawing.
See all boards on the extension boards page.