Stepper motor driver. Protection and current limiting.

Hey,

I am quite new to the whole microprocessor idea with some general tinkering knowledge (GCSE Electonics...).

I am trying to get an A4988 driver to work "well" with a Nema 17 stepper motor in 1/16 steps.

I have had one running, but believe I somehow manage to break the driver, so ordered a few more.

The particular driver is here: http://www.ebay.co.uk/itm/190972210407?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

And the Nema 17 here: http://www.ebay.co.uk/itm/231015892470?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I understand I have to limit the current to the motor somewhat when I want to run off a 3 cell LiPo by using the included on driver potentiometer. I understand that the max current of the driver is lower than that of the stepper.

The board however, was connected directly to the stepper with no "protection" as it were. I assume that is where I went wrong and managed to fry it with ENR (or voltage spike etc.).

Should I use say a 5v UBEC on the 3 cell LiPo and limit the current on the coils to 0.8A instead of the 12.6v-10v 3 cell voltage? Is there a way I can dampen the power supply against spikes or should the UBEC provide enough protection from spikes? Should I use an optoisolator or transitor between arduino and the driver?

Thanks for any help!

These devices have internal protection and are meant to connect directly to the motor. 3 Li-poly cells are well within the specified voltage range for the device.

How long did you run before failure? Did the motor operate correctly before failure? How hot was the motor at failure? Did you change any wiring? The device has thermal protection and will usually only be destroyed by a dead-short or incorrect wiring such as reversing polarity to the battery.

The current limiting pot is very useful for preventing overheating and inproving efficiency.

Joe

I think I did unplug the motor cable while it was powered up. That may have caused the damage?

Either way, the motor was working and not hot before. After, it kinda just jiggled between 2 positions like it had lost its mind. It seems regular but I hadnt changed any code and I played with the pot again with no luck...

Unplugging a powered up stepper motor causes a massive inductive spike, its a no-no.

You should consider a fuse for your LiPo, they are capable of fiercely large currents if accidentally shorted.

To get anywhere near the current setting that motor wants I'd consider a small fan to cool the A4988.

I understand I have to limit the current to the motor somewhat when I want to run off a 3 cell LiPo by using the included on driver potentiometer.

You MUST adjust the potentiometer on the driver board to limit current. That is how you control drive current to the stepper when using an A4988 based board.

Look up "a4988 current adjust" on Google. You'll need to figure out what part values are on the board you bought. As most of them are built, the total adjustment from min to max current is over a very small portion of the trim pot adjustment. There are websites describing what and how to modify the board so the adjustment is spread out over more of the trim pot rotation.

There are some difficulties using 1/16th microstepping in setting the current. I have some limits in what I can look up at the moment, but I do recall there are some helpful videos on You Tube.

Oh, and never -NEVER- disconnect or connect motors or steppers while the circuit is powered. NEVER.

You should consider a fuse for your LiPo, they are capable of fiercely large currents if
accidentally shorted.

I agree strongly. You can also use “protected cells” which have current limiting or builtin fuses.
I once shorted a 3 cell RC-type LiPo and witnessed a very impressive display of sparks. A prolonged short can cause the battery to ignite. Lithium fires make a great fireworks display - provided you view them from a safe distance.