pF: hub motor complete, mostly

Lots of stuff happened between that and the last post, here’s what:

Last time we finished machining the rotor mostly, so now onto the stator. I confess that it crossed my mind to put the stator adapter in a mill, indicate its center, and CNC the screw hole pattern. But who am I kidding, clamping it and transferring the hole pattern with a hand drill is way easier. I’m getting too caught up in CNC these days…

clamping and transfer drilling the old fashioned way

the low head socket screws are great for keeping things compact. There's only a few thousandths clearance between the screw heads and the bearing.

Now for actually winding the motor.  This is the place to go to figure out the right winding pattern. So with 20 magnet poles and 18 teeth, the pattern I used was AaABbBCcCAaABbBCcC, where capital letters denote one direction of winding, and lowercase the other. I found it really helpful to just write this pattern directly on the stator and to have little arrows indicating which direction to wind.

oh gosh, so much winding

At about this point I realized the fork on the bike frame was actually too narrow for the whole motor-wheel assembly. But I didn’t want to do too much work to making things fit. I decided the easiest thing would be to cut most of the way through both sides of the fork so that they could bend out. Then I could just weld the seam shut.

shoulders of the fork are bandsawed, a threaded rod spreads the fork wider.

left one is welded, right one is welded and sanded a bit.

I should have used a bit more filler rod, because after I sanded down the bead, there are still some grooves on either side of the weld, but it should hold. If you look carefully you can also see the kink that has resulted from bending the fork.

The drop outs were originally designed for an 8mm axle, but the stock bearing in the wheel is 10mm. So I used a 10mm axle, which actually worked out quite well. I milled flats on the ends of the shaft so that the dropouts grip them like a wrench on a boat. Then the ends are tapped so that a screw clamps the axle to the dropout.

To mill the flats correctly, I help the axle in some square aluminum blocks.

axle with clamp-on blocks for machining

assembled stator.

I guess you can’t see well in this picture, but there is a groove in the aluminum stator adapter that makes room for the red, yellow, and blue wires to feed out of the motor.

Now for assembling the rotor and stator, which is terrifying because of how strong the magnets are. Its also a pain to the center the magnet ring with the stator, since alignment is an unstable equilibrium. After pinching my fingers multiple times, here is what I came up with:

pull on the clear plastic strips and hope for the best!

I clamp the stator in a vice and pre-align two of the screws before the rotor and stator are matched together. The screws I use are just long enough to do this. The two clear plastic strips keep the magnets from pulling too hard while I am aligning the screws. Then you hope for the best as you yank out the plastic strips, kind of like pulling the table cloth out from under a glass. This mostly works out, but sometimes things are pulled together crooked and the magnet ring gets caught. Usually pushing it in the right direction will cause it to snap very forcefully in place. Be careful where you place your fingers!

So then I have the pleasure of assembling everything together only to find out that something was rubbing pretty badly. After wheeling it around for a bit and forcing the wheel to turn through the friction, I opened it up and looked for signs of wear.

Sure enough, a terrible and unexpected problem. Actually, it wasn’t that bad, but it could have been avoided. Two of the magnets where epoxied in crooked. Below you can see that when one of the caliper jaws is flush with the face of the magnet, the other jaw does not line up with the motor can.

oops, crooked magnet...

hmm, so how does one shape magnets anyway? Turns out you treat them like chunks of ceramic. I simply used a Dremel and one of those diamond cylinder grinding tools. The process is made extra fun by the fact that the tool is magnetic, so don’t be alarmed if you have to do this and the tool get sucked into the magnet. Also, be sure to use some kind of coolant when you do this, you don’t want to demagnetize anything. It really only took a minute of grinding (and 10 min to get out as much of the dust as possible), and after that everything fit.

high spots on magnets ground down

assembled and mounted

Now the motor is not completed yet, but ready for a test run. I will still need to add sensors later and get a controller, but for now I will just borrow from Charles and Shane of course. And as of tonight, it does work!! I’ll get the video up soon.

One thought on “pF: hub motor complete, mostly

  1. The next time you do this, try using spacing shims (like you have shown) and wooden wedge shims to center the rotor to the stator. It’s a pretty low-tech way of aligning them, but it works like a charm.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s