Before wiring anything, you need to understand how your bike's resistance buttons work. This guide walks through the investigation process.
- Unplug the bike from mains power before opening the console
- Take photos at every step so you can reassemble correctly
- Use a multimeter set to the correct range — start with voltage, not current
- Don't short unknown circuits — measure first
- Phillips/flathead screwdrivers
- Multimeter (essential)
- Phone camera for documentation photos
- Locate the console/display unit on your bike
- Remove screws holding the console cover (usually on the back)
- Carefully separate the cover — watch for ribbon cables
- Photograph the PCB, noting the button locations
- Identify the +/- resistance button solder pads or ribbon cable contacts
- Photo of console PCB (front)
- Photo of console PCB (back/solder side)
- Photo of button mechanism (membrane, tactile switch, etc.)
- Photo of any ribbon cables connecting buttons to main board
- Markings on the PCB near buttons (component labels, trace routing)
- Flat flexible sheet with printed contacts
- Pressing flexes the membrane to complete a circuit
- Usually connected via a ribbon cable to the main PCB
- Key measurement point: Where the ribbon cable meets the PCB
- Small through-hole or SMD component on the PCB
- Has 2 or 4 pins
- Key measurement point: Across the button pins
- No physical switch — detects finger proximity
- Harder to simulate — may require a different approach
- Look for exposed copper pads with no mechanical switch
- Power the bike ON (be careful with exposed PCB)
- Set multimeter to DC voltage, 20V range
- Measure across the button contacts (both sides) with button NOT pressed
- Note the voltage: _____ V
- Measure again while pressing the button
- Note the voltage while pressed: _____ V
| Scenario | Open voltage | Pressed voltage | What it means |
|---|---|---|---|
| Pull-up | 3.3V or 5V | 0V | Button pulls to ground — relay can short this |
| Pull-down | 0V | 3.3V or 5V | Button pulls to VCC — relay can short this |
| Matrix | Varies | Varies | Part of a scanning matrix — more complex |
| Analog | Varies | Varies | Analog resistance ladder — need specific resistance |
- Power the bike OFF
- Set multimeter to continuity/beep mode
- Place probes across button contacts
- Press the button — should beep (closed circuit)
- Release — should not beep (open circuit)
- Set multimeter to mA DC range
- Place in series with button (one probe on each contact)
- Press the button
- Note current draw: _____ mA
Expected: Usually < 1mA for digital button inputs. If you see > 10mA, the button may be driving something directly (unusual).
The button simply connects two points when pressed. A relay contact in parallel achieves the same thing.
BEFORE (button only):
PCB ──── Button ──── PCB
(pad A) (pad B)
AFTER (relay added in parallel):
PCB ──── Button ──── PCB
(pad A) ║ ║ (pad B)
║ ║
╚═ Relay ═╝
(N.O.)
Wire the relay's Normally Open (N.O.) contacts to pad A and pad B. When the relay energizes, it shorts the same two points the button does.
If buttons are part of a scanning matrix or analog ladder, you'll need to identify the specific signals. See troubleshooting.md for guidance.
Fill in this template for your bike:
# Bike Investigation Results
bike_model: "Drax Recumbent 2017"
date_investigated: "YYYY-MM-DD"
buttons:
type: "membrane" # membrane, tactile, capacitive
mechanism: "pull-up to ground" # pull-up to ground, pull-down to vcc, matrix, analog
resistance_up:
open_voltage_v: null # Voltage with button NOT pressed
pressed_voltage_v: null # Voltage with button pressed
current_ma: null # Current when pressed (if measured)
pad_a_location: "" # Description or photo reference
pad_b_location: "" # Description or photo reference
resistance_down:
open_voltage_v: null
pressed_voltage_v: null
current_ma: null
pad_a_location: ""
pad_b_location: ""
isolation_needed: true # true if bike circuit > 3.3V or unknown
wire_length_cm: null # Distance from console to where RPi will sit
notes: ""You could potentially use GPIO directly with an optocoupler (no relay needed). However, a relay is still recommended for safety.
Use opto-isolated relay module. Standard 5V relay modules from Arduino suppliers work fine.
Use relay module AND additional optocoupler isolation. Better safe than sorry.
- Plan the cable path from RPi to bike console
- Use shielded wire if running alongside power cables
- Keep wire lengths reasonable (< 2m ideally)
- Consider strain relief at both ends
Once you've completed this investigation:
- Update
config/local.yamlwith your findings - Proceed to schematics/relay-circuit.md for wiring instructions
- Run
python scripts/test_buttons.pyto verify relay operation