The cargo bike's lowest assist level is still too fast for genuinely slow riding. The fix isn't a software tweak to the controller — it's GearSense talking to the throttle line directly. That single decision shapes everything about Mark III: how it's wired, how it's powered, and what it can become next.
Why throttle injection
The cargo bike runs a Bafang-family setup — a GD06 display, paired with one of the generic "DC MOTO/JN" style controllers that ship under that display. Assist is selected via the display's five PAS levels, and even PAS 1 delivers more speed than is wanted for slow, careful riding — around pedestrians, in tight spaces, on the cargo runs where control matters more than speed.
The controller's PAS curves and assist levels are a fixed lookup table — there's no way to ask for "a little less than PAS 1." But GearSense already knows the rider's cadence and the detected gear. If it can write directly to the throttle line, it can compute its own desired output and bypass the PAS table entirely. That's Phase 3, and it's the reason Mark III will exist.
A hardware-agnostic, two-tier plan
Client bikes will have wildly different controllers, so the injection approach is split into two tiers — deliberately ordered so the universal case ships first.
Works on any controller with a conventional Hall-effect throttle input — the large majority of budget hub-motor kits, including this cargo bike. GearSense's DAC output replaces the throttle signal. This is the Mark III target.
For CAN/UART controllers (Bafang CAN, KT/Lishui, open-firmware BBS02/BBSHD via bbs-fw). GearSense commands power/speed digitally and reads the controller's own PAS/wheel sensors over the same link — a future "clean install" tier, not being built now.
The same protocol knowledge that lets GearSense write commands on Tier 2 also lets it read the controller's existing sensors, which would eventually mean GearSense needs no sensor wiring of its own on compatible bikes. Noted for the roadmap; Tier 1 comes first.
What's actually on the throttle line
Before any injection circuitry can be designed, the existing throttle line needed to be characterised. Three wires, measured at the connector:
The power decision: no LiPo
Mark II ran on a LiPo. Mark III won't. Line A — the same ~4.65V rail that will eventually carry the injected throttle signal — is also the power source, stepped up through a small MT3608-based boost converter to roughly 5.0–5.2V for the ESP32's onboard regulator.
The step-up is necessary, not optional: AMS1117-style regulators need roughly 4.4–4.6V minimum input due to their 1.1–1.3V dropout. 4.65V direct is too marginal once the display, BLE, and WiFi are all drawing current at once. A 2A-rated (1A continuous recommended) MT3608 module, ~93–97% efficient, is on order and arrives Monday, June 15. One-time calibration: bench-power the module at ~4.65V and trim its onboard pot until VOUT reads 5.0–5.2V — output must exceed input for the MT3608 to regulate — verified with a multimeter before it ever sees the ESP32.
Two measurements stand between here and a soldering iron
-
01
ESP32 current draw under realistic load Bench-test at ~5V with display, BLE, and WiFi all active, and read current directly. This is the number that decides whether the throttle rail can actually supply GearSense — blocking for the power-source decision, though the MT3608's 1A continuous rating is likely generous headroom.
-
02
Throttle rail stability under load Multimeter on the rail during a ride, with the ESP32 connected and drawing current, checking for sag. A handheld oscilloscope is available to additionally check for switching-noise ripple that might affect the boost converter's input.
The build plan
Mark III is, first and foremost, a rewire — and it directly addresses the connector/magnet issue diagnosed in the previous post. New M6/M8 waterproof connectors (2/3/4-pin) and 10m runs of 2-wire and 3-wire cable, matching the cargo bike's existing connectors, are already in hand.
-
01
Rewire PAS and wheel sensors Proper waterproof connectors and better mounting — the suspected root cause of the Mark II wheel-sensor fault.
-
02
Run the throttle line now, use it later Signal and ground routed to GPIO17 and GND via the Y-connectors, left disconnected. Trivial to splice in once the boost converter and level-shift circuit for Phase 3 are finalised.
-
03
Boost converter inline on the power line Once calibrated, the MT3608 module sits inline on the power line, replacing the LiPo entirely.
Loading…