Steps your mother didn’t teach you..

I tried to keep the electronics, for the mill, nice and simple as I would be building these driver boards on stripboard. Try it sometime. I ASSURE you it’s fun.

Originally, the electronics were for a wave drive configuration (only ever one phase on) but at some point I realised that I could use the same hardware for a full-step drive configuration (two phases always on), with some clever tricks, while still having just the two inputs: step and direction. This has the effect of doubling the torque which lets me run at double the speed without skipping steps. Thumbs up!


The image above shows the three driver boards and an Arduino running grbl for control. Each driver board has three ICs: an up/down counter [4510], a quad 2-input NAND (in a XOR configuration) [4093/4011] and a current driver [ULN2003A]. And below the schematic of the system.


You might see from the image that the Arduino outputs STEP and DIRECTION (as dictated by grbl) but we have four inputs to control on the stepper motor. Therefore a couple of tricks are used:

The first trick is garnered from Ian Harries page on stepper motor controllers and notes that two of the inputs (A and B) are always the inverse of the input opposite (C and D), allowing us to effectively cut our inputs by half. The two inverters can be seen to the right of the image above.

The second trick uses a 2-bit counter and a XOR gate to convert STEP and DIRECTION into these two remaining input patterns. The first input pattern is easy enough as it merely follows the 2nd bit of the counter (A1), however, the second input (B) is out of phase with the first. In order to repeat this sequence out of phase it is simply a case of XORing the first input (A) with the 1st bit of the counter (A0).

Step A1 A0 A B C=(¬A) D=(¬B) (A0 XOR A)=B
0 0 0 0 0 1 1 0
1 0 1 0 1 1 0 1
2 1 0 1 1 0 0 1
3 1 1 1 0 0 1 0

I haven’t included the mapping of the pins here as my configuration is slightly wrong in that the counter resets too early, providing an incorrect duty cycle for some of the steps. Also you’re not limited to the chips I’ve mentioned.

If any clarification is needed, drop me a comment and I’ll do my best to demist either your cloudy mind or my foggy writing.

Happy stepping 🙂

CNC mill SolidWorks model and schematic

Had interest from someone on Flickr about the design of my mill, so I’m uploading the model and schematic which can be viewed for free with eDrawings viewer.

The design has changed a little from this model, but it was never perfect.

I should also mention that I have made a fair amount of progress since last posting but haven’t posted here because.. well.. I’m one of the millions who starts a blog and whines like a little girl when noone visits it (sigh). If only it was more interesting…

Anyway. Enough. If you interested, the files are available below. Message me if you want clarifications and extra details.

Cutting stage schematic, Tool stage schematic, X stage schematic, Y stage schematic, Z stage schematic, Mill model

(I realise a lot of you may just want an image to view instead of SolidWorks files but you just wouldn’t be able to see the detail, otherwise.)