Tuesday, September 24, 2019

New motor controller

The Firefly's motor controller (pictures below) energizes the motor coils in the right sequence to move the wheel according to the throttles.  It sits in the battery base and appears to be a variant of the S06 controller (schematic here) with second (reverse) throttle input.


For the past 65 km, I've been testing the more advanced Baserunner controller from GRIN and ASI in Canada.
Firefly with Baserunner taped to the side of the 11.6 Ah battery.  The rat's nest of wires near the bottom allows it to function (no speed display, headlight, and brake cut-off though) and the toggle switch between the handlebar and LCD selects forward/reverse direction.

The Baserunner is a lot smoother than the original controller due to its Field-Oriented Control algorithm, which the physicist in me appreciates.  FOC also allows about 15 % higher speed, and the Baserunner can integrate with higher voltage batteries to go even faster.

Other impressions:
  • Makes the motor nearly silent, but the controller emits a slight high pitched whine.
  • Torque-mode control is nice.  
  • While maintaining speed at low torque, there is often a bit of chatter between zero and a little torque.  Perhaps my thumb is unsteady on the throttle.
  • Sometimes the motor stutters when starting to move.
  • Re-engagement is much smoother.  The old controller often gave a nasty kick when re-engaging the throttle after coasting (while still moving), but Baserunner re-engagement is silky smooth.
  • I disabled regenerative braking and just use the mechanical brakes.   The efficiency cost is minimal, and this will be easier on the axle and dropouts, because motor torque reversal is much less frequent.  I dislike how the original controller applies motor braking for every little throttle decrease, because I generally want the Firefly to  pull forward (or push backward) when pressing the throttle and will pull the brake levers to slow down. 
Although the Baserunner has a Z910-type connector that the existing motor plugs into nicely, the rest of the Firefly doesn't connect so easily.  I obtained a special 9-pin JULET connector pigtail (JL-F-Z911AT, Thanks Mr. Wen!) to interface the Firefly signal wiring harness with the Baserunner's modular connectors, but there is only one throttle input and an extra toggle switch is needed to reverse direction (this reverse signal required customization at ebikes.ca because standard Baserunners do not expose it).  The Baserunner also doesn't communicate fully with the handlebar LCD and has no headlight connection or brake cut-off.  I've been customizing a microcontroller to address these shortcomings (and add new features), and will update the blog when there is more.

Update (10/30/2019): The Baserunner expects an extra 4th Hall sensor (that the Firefly motor doesn't have) to output speed information.  I'm moving on, to try a different Field-Oriented Controller (controller & driver).