May 30, 2017

Toolpost Spindle, Part 2

I've mostly finished the toolpost spindle.

I found the perfect spindle motor on All Electronics, of all places, for $17.  It's a very cute brushless inrunner.  I dyno-ed it at 500 watts peak output at 48V, running of a 17A sensorless e-bike motor controller.  I forgot to take a picture of the inside, but the rotor has a thin steel sleeve around it, so the magnets won't fly off the rotor at high speed.  So I'm not worried about running it at 48V, even though it's nominally a 24V or so motor.

Unfortunately, none of my motor controllers are quite the right for this thing.  I wanted ~48 V, 10-20 amps, with hall sensor position feedback, and closed-loop speed control.  Fortunately, Charles and Bayley recently acquired a massive pile of mostly-not-working hoverboards.  The motor controllers in hoverboards pretty much exactly fit the bill.  They even do closed loop speed control with hall feedback!  I did a little investigation, and it seems like they run ST's motor library, doing dual-FOC on an STM32F103.  At low, speeds, they block-commutate, and at high speeds the phase currents become sinusoidal once they can interpolate between hall edges.

Phase current at low speed, scoped with the LEM-Stick:

Phase current at higher speed:

Fortunately, other people have figured out the serial protocol the hoverboard controllers use, so it was fairly straightforward to get it spinning the motor.

Unfotunately, the hall effect sensors in the All Electronics motor had very advanced timing, in the wrong direction for my application.  I opened up the motor, broke the glue holding down the hall sensor PCB, and reversed the timing:

I CNC milled an aluminum connector housing, for a DB25 connector.  Each phase has 6 parallel pins, plus 5 pins for hall sensors:  The steel front plate was made with a Bridgeport and hand files to match the motor curvature.  The 2-stepped HTD pulley was done on the CNC mill.

I made a height adjuster out of a chunk of steel.  I still need to make a nice thumbwheel for it.

I shoved a Nucleo and the hoverboard controller into the shell of an old G5 Mac Mini.  The power button on the left also came from a hoverboard, and I found an appropriately labeled knob to stick on the speed potentiometer:

Here it is mounted on the toolpost.  The spacing between the two pulleys is fixed, and I was able to choose the two sets of pulleys to have almost exactly the same center distances and belt lengths, so there's no need for a belt tensioner:

I've used it for a few jobs so far., including in-place drilling a bolt patterns into a big pulley and hub I turned, and also for deburring some internal ring gears:

No comments:

Post a Comment