Sunday, August 23, 2009

It Coexists.


I guess I'm not very good at this whole "documentation of incremental progress" thing, but anyway the B.W.D. Scooter is done and it's probably time to write up my build report. (The official documentation is now on the web, in our usual single-obnoxiously-long-page format.) This is merely my personal take on the project.

If you remember, this is round three of the Edgerton Center Summer Engineering Workshop, a unique educational program in which I get told what we are to build by a group of insane high school students. (To be fair, most of them aren't really in high school anymore, they're all off to college now to actually learn.) So maybe it's not an educational program; maybe it's more of an ad-hoc group with similar interests in things that move. Either way, good luck finding a better project team anywhere.

Oh, right, the scooter. Well, I wanted to build The Magscooter, a scooter that uses the Magmotor S28-150, a three horsepower motor famous for its utter combat-robot-propelling power in a light-weight package. Imagine that belt-driving a Razor scooter wheel. It would be the definition of overkill, and we could have built it in a matter of weeks. Except I was told that not only is that a lame idea, but also that I am unimaginative, boring, and risk-averse. So the idea for the B.W.D. scooter was born. The Summer Engineering Workshop crew decided to rip off Charles Guan and create a scooter with not one but two integrated wheel-hub-motor-things.

Wheel-hub-motor-thing. (Charles Guan's Project RazEr)

It turns out that it isn't all that hard to build a motor. To get it inside the wheel, the name of the game is brushless. The stator, with coils of copper magnet wire, sits stationary inside the wheel. The rotor, with permanent magnets, spins around it, held in place by side plates with bearings. This "outrunner" configuration is common in computer fans, hard drives, and model airplane propeller drives. There is also a lot of online documentation on how to re-wind or otherwise build custom BLDC motors.

Except...what do fans, hard-drives, and airplane props have in common? They see their highest load at high speed. Direct-drive BLDC motors that spin up to N,000 RPM make total sense for these applications. A scooter (or other electric vehicle), on the other hand, needs low-end torque, and a lot of it. And with hub motors, there is no gear reduction.

Turns out there are two keys to getting low-end torque from a motor. One is good control, which I already spent some time ranting about. The other is squeezing as much Lorentz force (F=ILB) as possible out of the motor geometry. (Ok, it's not really Lorentz force when you have steel carrying flux...but whatever.) It boils down to a good deal of current (I), a relatively wide motor (L), and many large, strong magnets (B). We started with the magnets, opting for the 12-slot/14-pole "LRK" style that Charles used. That gives plenty of surface area for mangetic interaction, and has the added benefit of reduced cogging torque because of the fractional slot:pole ratio, something we might have learned if we had paid more attention in Monaco. (Seriously...there was actually a keynote presentation about it.) Armed with the basic idea, we generated a design:

Don't you wish your CAD software could do that? (Render credit: Max H.)

Wow that looks really hard to make...even with six abrasive waterjets. But what we lack in Charles' extreme fabrication skillz, we make up for in the ability to get other people to give us nice things for free. Like, for example, laser-cut M19 steel laminations:

Stators not to be used as ninja stars.

These parts were generously donated by Proto Laminations, a company that specializes in producting low-quantity prototype motor laminations from electrical steel. The purpose for lamination is to reduce the circular eddy current that can flow in the steel as a result of the changing magnetic field. For us, the added benefit was the ability to design the motor exactly as we wanted. The biggest design feature this allowed were the small indents on the rotor for placing rectangular magnets. This saved us countless hours of aligning and gluing them in place.

That's not to say we didn't get to use the waterjet at all. Turns out winding magnet wire around sharp steel corners is not the ideal way to make a motor. Covering said corners with electrical tape also doesn't help much when you have to keep a lot of tension on the wire just to keep it wound tightly. Red fiberglass and abrasive waterjet to the rescue:

Who says you can't cut fiberglass on the waterjet?

These slightly oversized stator replicas prevent the wire from digging into the steel corners. They also look sick, and match our color scheme. But wait, they're inside the motor, right? So nobody will see them. Unless of course we already had planned to make the motor sides transparent. Seems stupid, right? Why waste all that flux out the sides and risk the entire structural integrity of the wheel for the ability to see inside? You'll see...

But first, the windings. How did we know how many windings to put? Too few and your torque will suffer...too many and the back EMF generated will limit your top speed. Too thin and the motor won't be able to carry enough current. Too thick and winding them will be very difficult. There are four ways to deal with this question, and we did all four:

  1. Copy someone else. Charles put 25 turns per tooth. We decided to wind every other tooth...so we should have a bit more.
  2. Try to do math. Well, we tried.
  3. Simulate. FEMM to the rescue. Pretty...
  4. Just freaking build one. The only real unknown is the "geometry factor" that is defined by the shape of the motor and the placement of the magnets. Motors are forgiving. The chance of making one that just completely doesn't work at all is very slim. So we built one with a low number of turns, 30, and then measured its performance. Turns out it was not far from where we predicted, but we wanted a bit more torque and less speed. So, with the geometry factor solved for, all we had to do was adjust the number of turns accordingly and we would know exactly the specs of the second motor. Single iteration; the high torque motor got 45 turns.
So now we have these two motors that are identical except for the number of turns per phase. Lots of interesting possibilities now. Do you run both at the same time? One for acceleration and one for top speed? How do you manage the transition? What's more efficient? Well...questions for later. For now, we put the high torque one in the back and the high speed one in the front and just send the same throttle signal to both. The torque adds and the speed averages out.

We made these?


Here's where anyone familiar with motors will criticize: Wow, even the high torque motor (left) isn't even half-full of windings. That could get so much more power with every tooth wound or with thicker wire. You try hand-winding a motor. But otherwise, I agree, it just looks weird. Most motors are packed full of copper wire. These could probably be two-horsepower motors if the winding density was better. But the math, simulation, and actual real-life test drives all confirm that these have plenty of torque for a scooter and they operate fairly efficiently, so the battery will last a good ways. Remember, more windings = more power, but the power still has to come from the batteries.

As for the efficiency hit, well I though this would be a problem too but it turns out that at low current (and by low I mean 20A), copper losses are small and interesting things start to happen to the efficiency curves. The benefits of brushless, low-speed, low-friction operation start to make even these hand-built motors seem like good alternatives to things like the Magmotor.

Well now that doesn't seem bad at all.

Okay, so the sparse windings don't really hurt much. What about the flux that leaks out those plastic sides? That must not be good. Well...since the stator is only 1" wide, centered in the rotor, I'd guess that the flux that counts is in that 1" band, where it is still quite straight. The flux leaking out the sides wouldn't be doing much other than short-circuiting to the other side of the magnet, even if the sides were steel. Not convinced? Still think something is being wasted? Okay, let's capture it and use it as a signal for the motor controller.

External hall-effect sensors!?!???


Yes, I wish we could say we planned this the whole way. Actually, we were originally going to use an optical encoder track. (Because the motor is brushless, the controller needs some way of knowing where the rotor is to control which coils are active.) But after noticing that the wheels had a tendency to pick up loose hardware off the floor, we though that perhaps there might be enough of a field coming through the sides to use hall-effect sensors. Many brushless motor have embedded sensors, but having them on the outside is actually extremely useful. You can find the right position very easily by rotating them with respect to the stator while testing the motor. You can also make minor tweaks to the torque/speed characteristic by rotating them.

So with the motors taken care of, we had to actually build the scooter itself in just about three weeks. Not a problem. Since there's no gearing or anything, it's really just a matter of making a frame with some forks to hold the two wheels. The deck is some folded 1/16" sheet aluminum. The rear fork is pretty straightforward:

Bandsaw clamp forks.


The front was a bit trickier, since we decided to work with the existing Razor scooter handlebar. Since the wheel is significantly wider and larger in diameter than the original wheel, we had to add an offset fork:


Front fork and steamroller wheel.


That's it right? Oh wait the batteries! We acquired a pack of A123 26650 cells, totaling 33V and 4.4Ah. Interestingly, when laid flat, they have only about 30% more energy by volume than a lead-acid pack. But they weigh a good deal less and most importantly they can source immense amounts of power for their size thanks to extremely low internal resistance. Cramming them in the deck was interesting...

Batteries in all the available space under the deck.


One thing we do pretty well is make things look good. That's where the carbon fiber deck and red LED trim lights come in:

And there you have it...

So that's it. It's not without its flaws. The urethane is being held on by "Plastic Steel Steel Weld Epoxy," which didn't last long. (The rear wheel tread came off once already.) The front of the deck needs reinforcement. And the whole thing is in serious need of some more nylon lock nuts. The vibrations are killer, especially in the ongoing roadwork nightmare that is Cambridge. But overall, it is functional and fun to ride. It's lightest and most compact of our fleet (yes, it's a fleet now), so it will probably see the light of day a lot more.

What have I learned? Motors are forgiving. Controllers are not, but if you overdesign them they might survive. Vibration sucks. Vehicles that carry seven times their own weight are awesome. Scooters are fun to ride. Make two of everything. Most importantly, probably, do something fun with a good team and you really can't go wrong.