© Zach Smith
Business |
TV: Stepper motor driver test fixture design
These days I’m spending my time exploring the manufacturing landscape of Shenzhen in preparation for HAXLR8R 2013, future hardware startups, and just to grow my skills in general.
Motor drivers have been an ongoing passion in my life for a number of years, and I have a new design I’ve been working on based on the venerable Pololu driver. I’m getting 50 prototypes made by a local pcb assembly shop and I want to make sure they deliver quality prototypes. To that end, I’ve designed a test fixture to verify each board.
This sort of test is called a functional test, because it tests the actual functioning of the board as if it were being used in its intended application. For a motor driver, that means driving a motor and verifying that it did that correctly.
Design Goals
Here are a few of my design goals with the fixture:
- Fully test each board in a simple and automated fashion.
- Make the test fixture easy to use and easy to understand.
- Document it so that others can learn from and expand on my work.
- Release it open source (BSD) so others can use it to make better things.
- 1 rotation / Mode: full step / Direction: forward
- 1 rotation / Mode: full step / Direction: reverse
- 1 rotation / Mode: 1/2 step / Direction: forward
- 1 rotation / Mode: 1/2 step / Direction: reverse
- 1 rotation / Mode: 1/4 step / Direction: forward
- 1 rotation / Mode: 1/4 step / Direction: reverse
- 1 rotation / Mode: 1/16 step / Direction: forward
- 1 rotation / Mode: 1/16 step / Direction: reverse
- Add current measurement to the VCC and VMOTOR power supplies. I want to know how much current is being drawn at various points during operation. For example when the board first starts up, I would like to be able to detect a short and turn it off. I would likely use something like the ACS712 chip.
- Add relays to VCC and VMOTOR supplies. In combination with the current measurement chip, this would allow me to detect shorts. It would also build more safety into the device since plugging and unplugging the driver would happen with the power off.
- Add a digipot to change the VREF settings. Right now this functionality is not begin tested, and its a pretty critical part of the board design. With the current measurement stuff added in, it should be pretty straightforward to verify it too.
- Move the connectors to the bottom of the board to keep things tidy. I’d like all the wires to be on the inside of the test fixture if possible.
- Move the stepper driver socket to the middle of the board. Right now it is a bit tucked away in with the other components. It makes routing a bit trickier, but it would really make it easier to use for the operator.
- Move the 4th hole outside the Arduino. I made a mistake of putting one of the mounting holes over the Arduino. PCB space isn’t a huge premium, so I should have made the PCB bigger to accommodate it.
- Use blue LED for “testing” mode. Just because it will look cooler. Also, the 10mm LED footprints I used have bad pin spacing. Oops.
- I used through hole parts because I thought “Oh, I’m only doing 1 of these.” It turns out that makes things harder to source, especially since I really only have SMT components in my workshop. Thru-hole, not even once. =)
- The board itself has one major flaw: it is not polarized! This means the board could be inserted backwards and damaged. This is a design flaw with the original Pololu design, and I haven’t yet figured out a way to route around it and still maintain compatibility. I’m not sure how to modify the test fixture to prevent this either. This will be solved the good old fashioned way: good instructions, operator training, and paying attention.