Wednesday, August 22, 2012

The long and (not so) tragic tale of the hub motor

Alright, where to begin... I've spent most of the last week in the EC (my dorm) courtyard working on a variety of large Rush projects (showing the new freshmen what we're about with some large-scale engineering insanity), but I squeezed in a bit of time towards my hub motor because I really wanted to finish it before classes start.

I knocked out the rest of the winding from about 2-3:30am leading up to my 5:30am flight:

Note that my C phases (top right and bottom left, here) look far cleaner, I got better at winding as I went

Then, everything ever arrived! I carefully marked one end of each of my magnets with a Sharpie (it doesn't matter which end, just that I was consistent)

Shipped with plastic spacers so that they're actually, you know, separable...
I also got two 1" thick 4" diameter aluminum rods, a big sheet of 1/4" 1018 alloy steel (high magnetic permeability), a whole bunch of #4 screws and nylocks, and two 1/2" ID 1-1/8" OD sealed bearings. I decided to start with machining the aluminum into my endcaps, because the Edgerton shop happened to be open, and they have Nice Machines.

I started by drilling a 1" hole with the most monstrous thing I've ever seen in a tail stock:



This gave me room to fit in a very large boring bar, so I could take big swaths out of the inside of the part to create the internal features. Here's the part with most of the dimensions rough-cut to about .02" from their final finishes:



To get the feature which holds the bearing in place, I actually had to run the lathe in reverse and work the boring bar across the backside of my part:



And here's the final pass which I did with a much smaller boring bar:



Yay! Now, for the holes which I've been dreading...

Actually, I was very happy to discover that Edgerton's CNC-capable mills have a circular hole pattern function built in, where you just zero the machine on the center of your part, enter in your pattern parameters, and hit go!

Post-magic shot 

After machining both endcaps, I went ahead and Magic'd my can out of my 1/4" steel plate:



I had to file down a couple of the slots to fit magnets better, but overall the can didn't require much finishing on my end. Anyway, with most everything else completed, I decided to move on to wiring connectors onto my stator. I realized that the slot I'd cut into my axle wasn't going to be deep enough to allow 16 gauge wire to pass through, so I had to mill it wider. I just eyeballed this one, since precision isn't a factor and it doesn't need to look pretty.




And with the bearing fit on over the wires:

I had to mash these down with some pliers to get them to lie flush, but they did comply eventually.


Okay, time to actually place magnets! I just used superglue because I didn't want to wait on epoxy to cure, but it still ended up being something of a lengthy process. I started out with the screws in for alignment, but after I'd gotten several of the magnets in they held the can together pretty rigidly.



Some of the way into this process I made a very poor decision and wanted to find out if the clearance between the magnets and the stator was actually large enough to prevent them from scraping.



My shirt got a bit eaten in the process. Oh well, at least the clearance was good! Anyway, here's both halves of the can, which I later stuck together using J-B weld due to its magnetic properties (the steel paste wicks into the gap between the can halves and creates a pathway for the magnetic field between the closest two magnets).



I then bored out the core of one of my scooter wheels (oh yeah, the scooter I bought shipped) to be a good press-fit with the larger center can segments, and pressed it on:



Starting to look like something now. Well, time to actually place the stator into the can! And when I say place, I mean "oh god lower it slowly and not by hand otherwise explosion and death". Here's a picture of my somewhat hilarious looking rig to accomplish this:



I put a bolt on the end of the axle and then chucked it into a drill press to lower it carefully and in control. The strength of the magnets was actually shifting the drill press table, the clamp, and the vise all around in order to force itself into alignment with the stator.

Immediately after dropping the stator into the can, I realized that I hadn't remembered to actually align the holes, and sure enough they were completely off. Well. Time to get creative? I used the dual-vise method (what, you think I have vise-grips that big?) to force the can around and align it with the holes in the cap.

I wish I could tell you this was the lulziest rig I used all night, but sadly...

Alright, almost done! Now to just put the other endcap on and tighten a few screws...



And bolt it to a random plate to actually take it for a spin...

You can see Shane in the background hooking up an airplane ESC to a power supply to drive my motor
And... crap. It just sort of jerks around and it's quite hard to spin by hand. Charles identified the motion as consistent with when he placed one of the magnets backwards in a motor, so I took everything back apart. Yes, that means this again:



I identified the incorrect magnet using one of my spares and checking which had the wrong orientation, and then chiseled it out with a hammer and small flathead screwdriver. I glued in a new magnet, this time in the correct orientation, and placed the stator back into the can. And tried to run it again. And... Crap. Again. This time it would rotate almost a full revolution and then suddenly kick back, as well as still being difficult to rotate by hand. Apparently this was consistent with when Charles wound one half of a phase backwards (i.e. two teeth are wound incorrectly). Evidently he's encountered most of the problems you can find while building hub motors, which is fortunate considering that I'm managing to experience most of them on my first build alone. Well, back to the drill press.

Fortunately, the fix wasn't as terrible as I'd initially anticipated, because I only had to swap the lead of one tooth from star point to input, and the opposite for the other. After that, I got to put the stator back into the can one final time, reassembled everything and tested it out:



Yay! It actually works! Now to mount it in a scooter...

Fortunately, Johnscooter had been lying about rather dejectedly, so I got the honors of dropping my motor into it to ride it around. There was, however, a small problem: my motor is about 1/8" wider than the mount at the back of Johnscooter. Time for the double-clamp-spreader-clamp! Amidst cries of "oh god no" and "that is a terrible idea", this monstrosity happened:



And, well, it actually worked. Here's a final picture of the motor bolted onto the frame:


And a video of me taking it for a quick spin:


Fortunately, the "tokka tokka tokka" noise evidently resolved itself shortly after this was taken. Also note that I'm using a placeholder motor driver here which is outputting about 500W, the final one I'll be using will be capable of something more like 1000W. Overall though, looks good!

Next I'll make a big battery pack, I'm thinking of 3 packs of 12 A123 cells each, which should provide quite a substantial amount of battery life (and at ~40V nominal, no less). I'm also going to be making a full custom scooter frame, hopefully before classes start. It might be a couple weeks until I post again, given that my time is going to get progressively more eaten by Rush, but I promise that as soon as I finish my custom frame I'll write it up!

No comments:

Post a Comment