A Better DIY Power Feed for X2 Mini Mill

Wednesday, January 18, 2012
Power Feed Prototype on a Bread Board

Power feed is generally pretty useful, and a Mini Mill model can be had for about $150 from LittleMachineShop.com, but as usual, I want more than an off-the-shelf model could provide. I'm making some part for my CNC router and will have to do repeated passes to a specific position. Initially I was going to rig-up some sort of adjustable limit switch, but after some experiments discovered that they are not very repeatable (at the leas the ones I had). A stepper motor, on the other hand, could be programmed to stop after a predefined number of steps. I didn't want to do a full CNC conversion, so I decided to go with a simple microcontroller-driven driver that would let me set 0-position and then jog the table to that position multiple times.

NEMA32 Stepper Motor and Driver

Two evenings later i ended up with a working prototype (shown in the first picture). At the core of the power feed is Texas Instruments MSP430 microcontroller (MSP430F2132), NEMA 32 stepper motor and an inexpensive stepper driver off eBay. So far I think the whole things costs about $80-$90 (without enclosure, hardware etc.)

Although the prototype works slightly different (I didn't have the right switches), in the final version the potentiometer will set the speed (the MCU reads the value and maps it to a specific step frequency); the large black switch starts the movement in the direction it was pressed. Short press will start "auto jog" and holding it for more than about 1 second will go into manual mode (i.e. the table stops when the switch is released). The little red button is used to stop the table (if pressed briefly) or to set the "home" position when held for more than 1 second.

I've tested the current version on the mill and it worked pretty good at low speeds but the motor missed a steps at a anything larger than 200 RPM. This gives me speeds of up to 10 IPM (I have 20 TPI screws), but I imagine that with at better driver the stepper will do much better. This weekend I am planning to make the motor mount/enclosure and build a more permanent circuit on a proto board. I will post the schematic and the source code on the final design is debugged.


  1. It looks like there is no readily available MSP430F2132 breakout board (I've used SparkFun's SSOP to DIP Adapter, but that involves fine-pitch SMD soldering). It won't kill me to rewrite the firmware for Arduino Nano or Arduino Pro Mini. If there is interest in the project and you guys (and girls) think that Arduino is preferable, please let me know. I will post Arduino code and instructions.


  2. Yuri, this is so really cool! I'd love Aurduino code when you get a chance.

  3. Thank you :)
    I've been moving to the new place, so my "lab" is still in boxes. I will start posting the progress starting next week (probably).


  4. Yuriy, is this project still on the radar. oLooks like something I could do to one of my machines. Can id be tied to the DRO?


    1. Frank,
      Yes and yes. I have the parts sitting in the box but haven't gotten to building it yet.
      One *minor* problem is that by the time I got a Gecko driver and a stepper the cost got pretty close to what an off-the-shelf power feed would cost...

      Thank you

  5. Yuriy - wonder if you've gone any further with this.

    I'm looking to do some lathe lead screw control with an arduino/stepper and this would be a nice 'preview' for getting into stepper control. Also - do you need such a large motor? Wouldn't a NEMA 23 stepper be adequate?

  6. Hi, would it be possible to get a copy of this code? It would be very helpful. Thanks