26 July 2013

Cruscooter and MiniJasonTroller or: How I Learned to Stop Worrying and Love Sensorless Control

Cruscooter was my first-ever foray into the world of Personal Electric Vehicles, and one of the best and most reliable engineering projects I've ever worked on. I've been riding it 3 miles almost every day for a year and a half. The reason you don't hear about it much? It works! It works well! The only maintenance has been waterproofing the batteries, occasionally cleaning up the wiring, and replacing the belt/pulley, which I expect to do to any small vehicle seeing daily use. 

The biggest annoyance, however, has been the hall sensors that the brushless Kelly controller uses to commutate the motor, and my bad design choice of making them the lowest-hanging part of the scooter. Many times I have run over a higher-than-normal bump in the road to find my scooter stationary and the hall sensor board ripped clean off. Rain has also affected my hall sensors significantly, possibly altering the magnetic field it needs to keep pushing that motor. I've had to replace them countless times due to running them into things, and they just cut out whenever I run over a puddle. It's always been unexpected, annoying, and time-wasting. 

It rained yesterday. My scooter jerked, sputtered, and stopped, and I told myself "I give up."

I GIVE UP I GIVE UP I GIVE UP! After a year and a half of continuous use, I just CAN NOT anymore. Kelly, you've been valiant and punchy, with your reasonable 40A peak current output and solid 20A continuous current. You've swerved me away from cars and other dangers at intersections when I'm being a an overzealous scooter-er. You've zoomed me past the archaic manual pedal-bikes that seem to control Boston. But your reliance on sensors has wasted my time for the last time. It's time for simplicity, solid performance, and the possibility of blowing up my controller if I start from a standstill.


 It's time for a Jasontroller! A Mini-Jasontroller to be exact. Charles found these on elifebike.com, and put them through their paces in this post. They are sensorless, meaning they estimate the motor position based on current/backEMF sensing. To start from a no-load dead stop, they kinda gun the 3 phases until it starts moving. Once the motor is moving, there is enough information for the controller to deduce the motor position and keep spinning it, with a feedback controller continually adjusting  based on a motor position estimate. 


 As Charles did with a Jasontroller once, I plan on hacking it to put out more power than it was intended to. Charles got a 350W controller to push about 1800W! I don't plan on going that hard, but it shows that more meager overclocking is certainly doable.
That big wire you see above is  ~10 mOhm shunt resistor. The controller measures the voltage across the shunt resistor (usually really tiny, but significant if the current is high enough) and outputs more current until it has reached the desired sense voltage. By lowering the resistance of this shunt, you can make the controller put out more current than it was intended to. Before we have fun with our guinea pig, let's prepare this sucker of hackery. 


 I gave it a haircut. I made sure to check out what wires I was snipping by checking out this page, and ended up snipping everything but the Power leads, Motor Leads, Throttle leads, Throttle on/off switch, and Three Speed leads. 

The Throttle on-off leads I will snip short, solder to eachother, and keep inside the controller housing. The Three Speed Leads have an orange, yellow, and black wire. With none connected, the controller works in medium speed mode. With the yellow connected to ground, it's in low-speed mode. With the orange lead connected to the black wire, it's in high-speed mode. I removed the yellow wire entirely, cut the black and orange wires short, soldered them to each other, and put the whole thing inside the controller. 

And now, the simplest possible brushless motor controller setup in the world! Only three sets of wires to deal with: Battery In, Throttle in, Motor out. 
That's it! It's never been easier to build a personal electric scooter, especially with controllers like these in existence. 

That's not to say this is all better than my previous setup. The Kelly controller is much more sophisticated, and can put out more current and handle higher motor speeds, than the Jasontroller. I'm improving simplicity and reliability in rain, but trading off some speed and some power. 

No more sensors! In one swift and cathartic movement I snipped the wires leading to the hall effect sensor board. It was like breaking one chain (No offense to the perfectly awesome board! It's just an inherent quality of sensored control to be finnicky on the application side). 

When Charles heard I was going sensorless and planned on hacking my Jasontroller, he gave me some of these really nice 10 mOhm resistors which happened to fit right in the gap between the solder leads of the shunt resistor. 

AWW!

I ended up stacking two of them, to lower the resistance to 1/3 of the original shunt resistance (thus making the controller output 30A instead of 10A). 

And here's the test! I threw it in Cruscooter and took it for a whirl, and it was exactly as prescribed: 30A all the time instead of 40A peak/20A continuous, and the top speed is hard-limited in software due to the high commutation frequency. 

But it works! further Improvements include adding another resistor to make it go 40A, switching to a lower-Kv motor (Mine is currently 190RPM/volt. There are Turnigy SK3s that go down to 149RPM/Volt) and/or increasing the size of the pulley from 14 teeth to 16 or 18, thus lowering the gear ratio and increasing my top speed while sacrificing acceleration. 

Keep on scooter-ing! 

2 comments:

  1. Thank you very much for share your improvements! Your blog is full of knowledge of many topics :)

    ReplyDelete
  2. I have no idea of DIY. Buy a complete new one is my best option. Tks any way.

    ReplyDelete