Stepper Motors Part 2

Hopefully some of you are still with me, and you haven’t blown up your supply, switching device or coil.

Before we continue I’d like to ask a question; what current can your supply handle? Let’s take a brief look at Ohm’s Law, or at least the mathematical equation describing Ohm’s Law. The equation V=IR is incredibly important in electronics, and so you should have it burned into the back of your skull. Assuming a 5V supply (not uncommon), and a coil resistance of 1.6ohms (again, not unheard of) – this gives a current of 3.125 Amps PER COIL. Please also bear in mind that by using the Full Stepping method we would be drawing 6.25 Amps and you could be facing some current issues. I was using an old PC power supply as they have reasonably hefty current ratings, and although the 5V rail was fine, running off the 12V kept tripping the thermal fuse when trying to switch just a single coil.

Stepping a single step is easy enough, but you will invariably try to spin your stepper fast. You will hit a certain point where the stepper just stalls and lets out a whine (corresponding to the switching frequency). This is not necessarily a limitation of the motor, but of your driver circuitry. You have reached a point where you can’t energise the coils quickly enough, but there is a solution. By increasing the drive voltage it is possible to decrease the time taken for the current to saturate the coil, and so increase your switching speed. We have already ascertained that an increased voltage leads to an increased current and a blown supply, so we must find a way to increase voltage and keep current the same. There are a number of ways to do this, but I am going to cover the two simplest; linear resistive current limiting, and a chopper drive circuit.

Linear resistive current limiting is far simpler than it sounds. In fact, it is just adding a resistor in series with each coil. Similar to a current limiting resistor when driving an LED, this resistor limits the current going through the coil. Most motor manufacturers actively encouraged this technique up to the mid-80’s, but it has fallen out of fashion – either way this is probably the easiest and cheapest method available. The major disadvantage of this method is that the current is getting dumped in this resistor, and so the resistor will get HOT. This is NOT a job for the 1/4W resistor.

The chopper drive circuit uses PWM to limit the current in the coil. Either this can be open-loop control where the electronics has no knowledge of the current levels, and the duty cycle is determined either  through experimentation or calculation. Alternatively, closed-loop control can be implemented through the use of more complex electronics measuring coil current. The disadvantage of this method is based purely around the PWM frequency. Higher frequencies will cause RF issues, and lower frequencies (i.e. audio frequencies) the motor will literally “squeel”.

Next article I will be dealing with actual schematics, and including some code used to step the motor using a PIC18F.

6 thoughts on “Stepper Motors Part 2

  1. Dan

    This is an awesome explanation for steppers. I have been trying to find a place that explains steppers and stepper contol for the past year. Do you plan on posting about the software required for control?

    1. admin Post author

      Dan, don’t worry. I have got code PIC code ready to be used, but I wanted to have a go at using the parallel port too.
      I need to get some other work done, but my next article should be up mid-week.

  2. tony

    I want to take out 2 stepper motors from a printer and control them on an arduino uno i just got. i’m going to take apart the printer tonight. thank you for writing this. do you have any tips you could email me please

    1. admin Post author

      I’m a little bit late posting my next article, but hopefully that will answer most of your questions. Reading through Part1 will give you most of the theory you will need.
      As far as power goes, you wont be able to use the Uno rails as I doubt the regulator will be hefty enough. My advice is to use an old PC power suppy as the 5V rail generally is quite lumpy.

  3. Pingback: Excuses | Sleep is overrated…

Leave a Reply to admin Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>