Saturday, October 3, 2020

5000 km (crash)


The past two km chiliads (since 3000 km) were notable for two accidents, keeping the rate at a stubborn one per 1000 km.  First, a minor low-speed tip-over that occurred while playing tag with a relative on roller skates.  Some people take pride in playing hard.  The second was more troubling:

Near the top speed (23 km/h), I lost steering control and crashed diagonally into a curb, causing the wheelchair to flip. I think the left Firefly attachment had separated from the wheelchair, and the right clamp by itself was too weak (picture below), causing the loss of steering. 

I don't know why the left connection let go.  Perhaps I forgot to flip the quick-release lever or the pins weren't fully seated or resonance caused the mechanism to disengage. Just before the crash, I rode over a rumble strip whose vibrations must have caused the final separation. It would be wise to check for any self-loosening in the future and maybe add latch retainers.

Fortunately, the bruising and road-rash are temporary.  I replaced the trashed right-side attachment clamp, but my wheelchair is crooked now, with the right frame leg bent back by about half an inch and downward by a quarter inch.  Considering my usual routes, the consequences of veering sideways uncontrollably could have been a lot more serious.





On a positive note, the QIND Q-211 tire continues to last beyond 2400 km with no visible cords. The front axle has stayed tight since switching to the VESC controller nearly 700 km ago, despite heavy use of regen-braking.


Saturday, August 29, 2020

VESC (motor controller)

In a new attempt at Field Oriented Control, a VESC (Vedder Electronic Speed Controller) drove the Firefly's motor wheel for the past 500 3000 or so km.  As before, wiring up the new controller took some effort, but this one is more satisfactory.

Positive:
  • Software and firmware are open source.  It was easy to add automatic "cruise control" that saves thumb strength.  After 7 seconds of holding the right throttle high, it stays high until brake is applied.  The system is experiment-friendly.
  • The right throttle drives forward.  The left throttle brakes and drives backward. [customized code from district9prawn].  Now there is a good balance between left and right thumbs.
  • Custom features can be programmed such as a limp-home mode in case of throttle / brake-sensor failure.  Safety checks (i.e. full engagement of the attachment clamps) can also be requested through the phone app before enabling higher speeds (some programming required).
  • Torque-control is sweet.  No more annoying braking due to minor unintentional throttle movements.
  • FOC is super smooth.
  • No violent synchronization jerk when reengaging the throttle after coasting.  This may stop has stopped self-loosening of the axle nuts.
  • The phone app logs data from the controller, inertial unit, and phone GPS (10 Hz rate).
Notable:
  • Parameter settings and speed display are through Bluetooth and a phone app (screenshot below).  This allows for nice graphics and on-the-fly adjustment, but sunlight readability is low. The controller also runs fine without the phone. 
  • The VESC 6 is spec'd for 60 V max, which doesn't allow for common 48 V (13S) e-bike batteries.
    Update: A 48 V (13S) battery does work.
  • No headlight connection.  I had already been using a Cateye AMPP800 that is brighter than the stock headlight (which I removed).
  • The VESC firmware code is complex and only sparsely documented.
Issues to be addressed:
  • Weatherproofing.  As is, the controller is unlikely to survive a rainstorm and needs a protective enclosure.
  • At above-normal speed (e.g. descending a hill), the motor brake can kick in very hard, possibly blowing the battery fuse and causing other damage.  I can probably avoid this by modifying the firmware.  For now I have to avoid the motor brake when coasting fast downhill.
  • No odometer.  This is important for periodic maintenance.  I keeping a spreadsheet that adds up individual trip distances added this feature to the code.  


The VESC (which has threaded mounting holes) attaches to the battery base via two M5 screws after drilling matching holes in the base's metal bottom plate.  After a bunch of wire splices, the motor connects to the Z910 cable and the Firefly signal harness to a hard-to-find 9-pin JULET connector (JL-F-Z911AT, Thanks Mr. Wen!).  By keeping the original JULET connectors, I can easily swap back the stock controller which sits in a different battery base.  For VESC, the battery connects through yellow anti-spark XT90 connectors (I still got occasional sparks).  On top is the Bluetooth comm unit with dangling gray antenna.

 


October 16, 2020 Update:

A sturdy clear lid with overhang now protects from rain and shows LED status.  The other main ingredients were an L-bracket that clamps to the VESC via the threaded M5 holes (lucky fit), and longer M6 screw for the fork.  Some cable junctions and the Bluetooth module can still get wet, but at least the main controller is shielded.  As they say, the perfect is the enemy of the good.







Wednesday, August 19, 2020

Disc brake

Alas, sometimes we must stop.  The disc brake has good strength, but often caused strong brake judder that seemed to get amplified by a resonance.  At times, it felt like riding a washing machine full of bricks during spin cycle.
😰
A long-ago attempt at improvement involved swapping the stock brake caliper with an Avid BB7 MTB, but that just made the brake noisier.  Women would turn because they thought someone was whistling at them, but it was just brake squeal. 
😗
More recently, I replaced the brake rotor (140 mm diameter) with a $10 "ZENO" part.  This rotor, together with new "Resin Organic Semi-Metal Brake Pads" make the brake smooth and quiet.  After installation, I bedded-in the new pads and disc.  Now there's no more judder or brake squeal!
😇
The original disc was a little warped, and I suspect it had periodic variations in braking friction that got amplified in a flexing resonance.  The resonance seemed to get worse with front tire deflation.

Thursday, June 4, 2020

Field weakening

The Firefly's wheel speed is limited by the voltage produced as the permanent magnets move across the motor coils (Faraday's law of induction).  The faster it spins, the larger is the induced voltage, which eventually equals what the battery can produce.  Then current and torque drop to zero, and the maximum speed has been reached.  For this reason, a fully charged battery with higher voltage can go faster than a depleted one.

I have been experimenting with Field-Oriented Control which, among other advantages, can use the motor coils to generate fields that counteract the fields of the spinning permanent magnets.  The technique is known as Field Weakening.


My tests with TI boards (LAUNCHXL-F28069M and BOOSTXL-8323RS) show a speed-up of up to 38 % compared to the original motor controller.



Original data where Kv0 = 10.46 rpm/V is the measured speed of the original controller:

VsupplyIsupply
(A)
Speed
(rpm)
Kv
(rpm/V)
Kv/Kv0Field
weakening
(A)
32.230.9135010.861.0380
32.230.97371.111.511.1002.5
32.231.24394.612.241.1705
32.231.67422.213.11.2527.5
32.231.75431.613.391.2808
32.231.944113.681.3088.5
32.232.3546614.461.3829.0
The data were taken on a stationary test stand, where the wheel just spins in air.  It's not ready for vehicle testing yet.


Monday, May 18, 2020

Attaching the Firefly

I consider the Firefly's levered attachment mechanism a marvel of mechanical engineering, but it took a while to find a way to engage it without assistance.  Here are my steps, which use the front and rear brakes simultaneously to hold the wheelchair front up without needing to constantly push.  This makes it easier to flip the attachment levers.
  1. Roll up to the Firefly, which is standing upright in a corner with its parking brake set.
  2. Grab the handlebar and release the parking brake.
  3. Roll the Firefly back towards the chair while centering the attachment hooks on the pins. 
  4. When the hooks are well-centered, which takes some experience, engage rear wheel locks.
  5. Push handlebar forward all the way to lift front casters into the air* and further engage the hooks.
  6. Squeeze the Firefly brake.  If the brakes are tight enough, the wheelchair and Firefly will hold the raised-front position, even if you stop pushing the bars.  If the front of the wheelchair doesn't stay up, tighten the front or rear brakes, or inflate rear tires.
  7. With the right hand squeezing the front brake, use the left hand to flip the left attachment lever forward.
  8. Set the parking brake, switch hands, and flip the right attachment lever.
  9. Release the brakes and push the handlebar forward to make the attachment pins seat all the way into the hooks.
*Sometimes, the wheelchair front does not lift very far in Step 5, and I have to recenter the the front wheel/hooks and try again.

These steps apply to the 4-pin attachment mechanism (two on each side of the wheelchair).  They can be adapted to a Firefly without parking brake.

Thursday, April 23, 2020

3000 km, KT-LCD3 display, etc.

Spring flowers are blooming, the sun is shining, and I've started putting distance onto the Firefly again.  It's important to get outside, despite the many warnings about COVID-19 from politicians and public health busybodies.  Their science is tentative and fraught with conflicts of interest, and their claims - hypocritical as they may be - of valuing safety above all else do not reflect my values.  Fear, i.e. focusing on worst-case-scenarios, is a choice that I reject.  Life is for living.

I'm using a new KT-LCD3 display, which works as a drop-in replacement for the original KT-LCD5 after setting the various parameters.  The LCD3 shows power in Watts, which maxxes out at about 550 W for me.  I really wanted to know the maximum power.  The display also shows ambient and motor temperature, but unfortunately the motor field does not measure anything, and the ambient value is inaccurate.

Update: After this post I reverted to the original LCD5 display and spooled the LCD3 odometer distance onto it, using the documented communications protocol.



Together, the old (2730.5 km) and new (273.6 km) odometers add to 3004.1 km and 286.1 hours for the following statistics:
  • 2 years ownership
  • Several hundred trips enabled by the Firefly
  • Scores of friendly compliments
  • 10.5 km/h (average speed)
  • 3 worn out front tires (current one seems like a winner)
  • 2 significant mechanical issue:
    • Loose axle nut
    • Shims for the wheelchair frame attachment are slippery.  If used, inspect regularly and check bolts for tightness.
  • 3 tip-over accidents (sideways)
    • Turning onto an uphill ramp.  Too much speed and off-camber.  Kind bystanders tipped me back up.
    • Riding up a steep and narrow temporary ramp, losing traction near the top, fishtailing backwards, and tipping over the side.  Relying on momentum rather than traction to get up steep slopes is dangerous.  The result of not reaching the top can be an extended loss of control, because sliding friction is less than static friction.  Rear wheel braking could help, because the rear wheels have a lot more traction (but engaging them while moving backwards could make the vehicle flip).  Reversing up steep slopes can be safer.
    • While going around an illegally parked truck.  Always cross drop-offs at a perpendicular angle, even when annoyed.
  • 1 empty battery (later replaced with a larger one)
  • 1 flat rear tire (from a thumb tack)
  • 1 flat front tire
  • 0 collisions
Tip-over accidents are a recurring theme, because any safety gains due to skill and experience seem to be cancelled out by higher speed and reduced caution.