Wednesday, August 8, 2012

Hub motor! (ohgodherewego)

Since clearly I wasn't feeling MITERS-y enough having built just a quadcopter, I opted to tackle a scooter as well. (Okay, that's kind of false, really I've been wanting a faster way around campus for a while and Charles had a super giant BLDC motor stator he threw my way on the cheap).


68mm x 38mm 12 tooth stator in all its massiveness

Also of interest is how I'm building a scooter, which as far as I can tell amounts to approximately the weirdest way that one could possibly conceive of/design a scooter - I'm designing a scooter around a motor which in turn I'm designing around a stator. The only reason for this is that I just happened to acquire a stator before anything else (generally just getting a stator that matches your other constraints is probably a good idea).

If you'd like a crash course in BLDC motors, read the really super handy hub motor Instructable. No, really. Read it. Basically the stator is a big chunk of iron made up of a bunch of thin iron sheets which are then laminated together, and epoxy (that green stuff) is slathered all over the inside. The sheets/lamination allow for a high degree of magnetic permeability in the radial direction and much less in the axial, which helps direct the magnetic fields generated by the coils outward, towards the motor can/permanent magnets (don't worry, I'll show you what these are in a second!) and back inwards towards the next coil.

So, without further ado - the actual motor!

Together and with kinda transparent endcaps
Fancy exploded view!

So, from left to right, we have:
  1. Left endcap
  2. Left bearing
  3. Axle
  4. Tire/wheel
  5. Can
  6. Magnets
  7. Stator (shown with coils)
  8. Right bearing
  9. Right endcap
The endcaps are to be turned from solid aluminum stock, the bearings are 1/4" ID 1-1/8" OD high-load sealed McMaster bearings, the axle was turned from a giant aluminum rod found lying in MITERS scrap, the wheel... well, we'll get to the wheel a bit later, the can is a solid steel tube with channels for screws to pass through, and the magnets are 1-1/2" x 1/2" x 1/8" high strength rare-earth neodymium.

Let's get on with the first machining work for the project, the axle:

Note that this is AFTER a significant portion of material has already been removed

Here you can see a giant chunk of pre-axle aluminum, chucked into one of the super classy lathes at the Edgerton student shop. I did some huge passes until I got close to the flange sticking out of the left end of the axle (rendered above in the exploded view), which serves to easily place the axle into the stator without worrying about positioning it. I then worked the right end of the axle down to the correct sizes, arbitrarily deciding that I'd treat the end currently chucked as the left side. Finally, I drilled out the end with a #7 drill bit (.201") so I could put 1/4"-20 threads in it later.

This thing spawned an incredible amount of aluminum chips

I then flipped the part and chucked the center to finish off the left side as well:



I decided that I didn't want the axle to be press-fit with the stator because then it's less easy to take out/replace and I don't trust press-fits quite as much as axle pins. Thus, of course I had to do it the Classy Way and machine a rounded channel to stick a pin through. I threw the axle on a mill, cut out the channel for the output wires to escape from, and like 8 slooowwww eyeballed passes of a 1/16" ball mill later I had a reasonably good approximation of a 2mm pin channel.

Did I mention how much cutting oil I went through?

And a couple shots of the finished product:

Shiny!

You can't see the pin, but trust me it's there. And yes, it's just the unfluted half of a #47 drill bit. Whoops.

Threads were added to the ends a bit later.

Alright, as for the down-and-dirty motor-y bits: coils are on 3 independent phases - the A, B, and C phases. Each phase, in turn, has two each of both capital and lowercase winds (where capital indicates one chirality and lowercase indicates the opposite), so if you were to write out a typical (dLRK if you know what that means) winding 'scheme' it would look like this: A a b B C c a A B b c C. Note how there's one letter for each tooth, and in my case I used capitals for clockwise and lowercase for counterclockwise. I calculated I'd need about 88 winds per phase to get the amount of torque I want (how? READ IT) and I decided I could probably cram that much 20 gauge wire around each tooth. This was a bit of a mistake, as I discovered when I tried to wind it in series with two strands of 20 gauge and found that I couldn't quite manage to pack it in close enough. After failing at winding this in series, I settled on a parallel winding scheme to make winding the motor physically easier. The capital teeth all connect to a common "star" point and the lowercase teeth each go to their respective letter's output cable. With the parallel approach, instead of 22 turns with two strands of 20 gauge wire it's 44 turns of one strand of 20 gauge, which is a bit physically easier to manage.

As you can see, "a bit" easier still isn't easy

Well, it was a fun several hours of wrestling wire into areas smaller than it wanted to go, and after the experience I have a few pieces of advice for anyone else wanting to do this:

  • MAKE SURE that your iron core is fully epoxied everywhere the magnet wire will be coiled around. If you see a gap then seal it with super glue otherwise you'll be stripping coating off the wire and causing a short
  • Take a small wooden dowel to pack down your windings to create more room. I ended up whittling the end of one down as I went so I had something small and pointy to manipulate the wire with. DON'T use a metal flathead screwdriver/metal anything else to do this, or you WILL strip off your coating and have to restart
  • Measure (multimeter) and make sure your windings aren't shorted to each other/your axle/the stator core as you finish them, so you don't have to redo them later
  • Double (and triple, and quadruple) check your chiralities before you start wrapping! Make sure you stay consistent with direction between your windings
I only got as far as 8 teeth wound (2/3rds done!) before I was somewhat displaced from the area I was winding in. I'm going to finish while I'm at home Friday, I promise! I don't want to let this hang over me when I'm back in Boston starting Saturday.

Anyway, here's where I'm at:

A couple of the teeth look downright disgusting, but if it works, it works!

tl;dr if anyone links me this or this I may get slightly irritated. It's quite possible I'm terrible at the whole patience thing.

Anyway, now that I'm at a bit of a stalled point as far as windings go, I decided to go ahead and order the scooter I want - this one, owing primarily to its 140mm wheels, which are large enough to comfortably accommodate the rather fat stator (and magnets, and can). The current plan is to get the scooter, measure/CAD the handlebar attachment and wheels, and then design my entire frame around the constraints of my hub motor, the front wheel, the handlebar, and the vast amount (well, 30) of the A123 3.3V battery cells I picked up.

I've also decided I'm far too lazy to want to machine all those slots in the steel can, so instead I'm going to opt to kitmotter it and just waterjet a bunch of half-circles complete with screw slots out of 1/4" steel (this will also give me the advantage of being able to include placement slots for the magnets so I don't have to worry about making separate spacer plates for them just to glue them in the correct places). I'm also going to have a fun time of drilling all the through holes in the aluminum endcaps, but frankly that's about the laziest solution I could come up with for holding everything together, so I can live with it.

I'm hoping to tear through the rest of this when I get back on campus, hopefully I can have most everything out of the way prior to REx because my life is going to get completely sucked away by EC stuff for about a week.

No comments:

Post a Comment