I am very inexperienced in electronics, so far I have just done real simple stuff with an arduino. I have a Nema17 (driven through a L293D) stepper motor which has a rated voltage of 12V and current of 0.4A. Now, my understanding of current and voltage is that the current solely depends on the voltage of the power supply and resistance of the motor. Therefore the motor draws a certain amount for a specific voltage. Now, when I connect my power supply to my circuit I only get to 0.4A or anywhere near that by setting to voltage to about 20V which exceeds the 12V rated voltage of the motor. Am I simply understanding this in a wrong way or do I somehow need to convert the voltage to 12V without the current being affected?
-
Is your power supply limited in the current it can supply? – Andy aka Dec 18 '16 at 16:52
2 Answers
Welcome to Stack Exchange!
One thing you'll discover as you grow in your electronics powers is that very few things in life are truly linear. In high school, we teach kids Ohm's law:
$$V=IR$$
And that if you change the voltage while holding the resistance constant, you'll get a linear increase in current. If you actually sit down and do this in a lab, you'll notice that as you increase the voltage, the power being dissipated in the resistor causes it to heat up, and a hot resistor has a different resistance than a cold resistor.
You may have also noticed that there is often a limit on the current that a power supply can sink (as suggested by @Andy_aka). An Arduino, for example, may only be able to sink/source 40mA of current. So even if you have a 5V pin with a 10 Ohm resistor, you might expect 100mA of current, but would only observe the 40 mA cap your Arduino can supply. In this case, the true voltage that would be coming out of the arduino would be $V = IR$ or, 400 mV.
Finally, if your stepper motor has any mechanical resistance, this will increase the amount of power (P = IV) needed to rotate. Perhaps your stepper motor is trying to move something with a lot of mass?

- 228
- 2
- 8
-
I like to speculate but this is a step too far. Why not wait for a response rather than leaving an answer so early on. – Andy aka Dec 18 '16 at 17:38
You're kind of putting 20V across your motor, less the voltage drop of the H-bridge in the L293D. This is a crude form of stepper motor control.
A typical stepper motor driver isn't a linear power supply. It's more like a switching power supply that uses pulse width modulation (PWM) to give you an average current. Your motor is rated at 0.4A and you typically have to configure your stepper motor driver to limit the current to this amount. Every commercial stepper motor driver I've seen has this capability.
When a motor is at rest, the only thing limiting current inside the motor is the resistance of the winding. If you just connect a constant voltage source across that you'll get very high current. Using ohm's law with 12V and 0.4A gives you a 30 ohm resistance. Since you're just applying voltage across the coil rather than pulse width modulating it, then you should measure a 30 ohm resistance in your motor coil.
The voltage limit of a stepper motor typically comes from two things: the insulation of the windings and the maximum speed. In your case they're limiting it to 12V so you don't develop too much current.
You see, as the speed of the motor increases, it also acts like a generator. Think of there being a little voltage source inside the motor that counteracts the voltage being applied, and this voltage source is proportional to motor speed. As the motor speeds up, this "internal back EMF" voltage builds up, and this actually limits the amount of current you can apply with a given external voltage. Current is proportional to torque, so eventually you reach a point where the generated torque is less than the load torque and you can't accelerate the motor anymore. That's why external supply voltage of a stepper motor determines your maximum speed. A stepper motor might be rated for a maximum voltage because the bearings, etc., can't survive any higher speed than you can achieve with that voltage (I'm not sure about this).
Stepper motor controllers are also rated for different voltages, so in a way your stepper motor controller limits how fast you can run your stepper motor (it's not just how fast it can step, but how much voltage it can apply to still develop the needed torque to counter the back EMF at that speed). If your motor's insulation can handle, e.g. 50V, and you buy a real stepper motor controller and use a 48V power supply, and run the motor at a higher speed (if that's something you need). The controller will make sure you don't deliver too much current at low speed.

- 111
- 5
-
I measured the resistance of the coils before. Its about 30ohms. The l293d can also output mich higher currents than 0.4V depending on the input. – l'arbre Dec 18 '16 at 21:03
-
@Addi - that's a good point. Since you're not using a true stepper motor controller, you're depending on the winding resistance to regulate current. That's why it's rated at 12V, so that you don't over-current the motor. So, what the voltage drop of the H-bridge? Subtract that from your 20V, or just measure the voltage across your motor coil to see what the actual voltage across the motor is. I've updated my answer a bit - I hadn't read your question quite well enough. – Scott Whitlock Dec 18 '16 at 22:15