Stepper motor rated current - Page 1
Forum section: electronics / beginners

author: tony359
author_rank: Frequent Contributor
timestamp: October 03, 2020, 09:01:18 pm
content: Hi all,I'm just playing with a stepper motor I found and I was learning about using it. I bought an L298N driver and I could successfully connect it to my Arduino.The motor I have is a Lin Engineering 4209S-01P-03RO which is rated 1.33A. From the datasheet I found the nominal voltage is 24VDC.https://lin-web.s3.amazonaws.com/downloads/products/hybrid-stepper-motors/4209/WO-4209S-01S/WO-4209S-01S%20Datasheet.pdfHowever when I try to drive it, my bench PSU has to limit the current output as the motor draws more than 4A when still - also the L298N gets very hot of course. When running, the current goes down but - and this is where I am not sure about - I thought stepper motors were supposed to be energised even when not moving to hold position and I thought 1.33A was the current drawn by the coils when voltage is applied continuously. If simply I apply 24V to one of the coils of the motor my PSU just bottoms up to 4A.What am I doing wrong?Thank you!

author: ataradov
author_rank: Super Contributor
timestamp: October 03, 2020, 09:32:19 pm
content: If you are driving it at full rated current (as most people do), then you have to limit the voltage. In this case you can basically ignore the rated voltage.If you are just statically driving the windings, then you have to limit the current according to the resistance of the windings and your voltage.Current is more important here as it provides for higher torque. The practical voltage ends up being just a few volts.

author: tony359
author_rank: Frequent Contributor
timestamp: October 03, 2020, 09:53:48 pm
content: Thanks. That is interesting. I thought it was like driving a resistor and that there would be a set amount of current for a given voltage no matter what. I can set the current limit on my PSU so I guess I can set it to 1.33A and forget - and as you say the voltage drops to very little when stationary. I'll set the voltage to 24V max anyways.What I didn't have a bench PSU with convenient limiters? What would be the best choice to power those motors?

author: Yansi
author_rank: Super Contributor
timestamp: October 03, 2020, 10:28:55 pm
content: Stepper motors shall be driven with a constant current sources, not constant voltage.At stand-still, the voltage developped across the winding is only equal the I*R, but in motion the back-EMF voltage is added on top. That is why you need a constant current source, able to supply much higher than standstill voltage. Otherwise you can't turn the stepper faster than snailspeed, without loosing all torque.

author: Yansi
author_rank: Super Contributor
timestamp: October 03, 2020, 10:35:46 pm
content: Quote from: tony359 on October 03, 2020, 09:01:18 pmGet an L297N to pair with your L298N. Or get a modern stepper controller chips, such as Allegro A4954 or whatever. L298 is an old piece of shit into which they even couldn't integrate freewheeling diodes so you need to supply 8 of them per chip.

author: tony359
author_rank: Frequent Contributor
timestamp: October 03, 2020, 11:20:58 pm
content: Oh, thanks. I see the L297N has a current limiter built in?

author: rstofer
author_rank: Super Contributor
timestamp: October 04, 2020, 12:08:17 am
content: Google for ‘Jones on steppers’

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 04, 2020, 12:36:26 am
content: Where does it say it's a 24V motor?The specifications do not say so. They do however give maximum current, 0.67A, and resistance, 9.6 ohms. The DC voltage for holding would seem to be 6.4V (closer to 8-9V with your L298 -- notice the high plus low saturation voltage spec on it).You can use that voltage perfectly fine here -- if you don't mind that the top speed is pretty shite.The only place they mention voltage is in a typical application, the performance curve -- it's important they give this, because torque drops off ~proportionally to frequency, due to winding inductance. To put some current into an inductor, you must supply voltage for some time: V = L dI/dt. As dt goes down (frequency/RPM goes up), V must go up, to keep the same dI in the same L. If V is limited (due to supply voltage, and winding resistance), then dI falls, and torque with it.They also give the current limit (0.67A), because the way this is typically done is a current-limiting PWM control. Winding voltage is switched up and down at a fairly high rate (typically 10s kHz), so as to keep current between thresholds (a simple hysteretic control suffices). This is what the L297 does (read the datasheet carefully, diagrams and operation are explained), among other things.So, a higher supply voltage allows more torque at higher speeds. The winding voltage is I * (Rdc + 2 L F), so past where 2LF > Rdc, you need more than 6V to maintain torque, and to go faster, you need proportionally more voltage.You can recreate the L297's functionality with the help of the Arduino's analog comparator, but it's not going to be great (the propagation delay is long, and the threshold isn't terribly accurate). Might also not be able to do it purely in Arduino, on account of all the overhead in those function calls. This isn't exactly beginner stuff though. Perhaps someone else has done it, and you can find a sketch and wiring diagram for it?Tim

author: rstofer
author_rank: Super Contributor
timestamp: October 04, 2020, 01:53:20 am
content: I mentioned "Jones On Steppers" above - I have no idea how to copy and paste links with an iPad. Here's the link:http://homepage.divms.uiowa.edu/~jones/step/When you actually use stepper motors, you find that the applied voltage will be several times the motor rating and PWM will be used to control the current. The reason is that motors are inductive and it's not possible to get current to flow in the next winding choice in any reasonable time period. So, to get any kind of rotational speed, you need to force rated current in at the beginning of a step and the way to do this, given inductance, is to use a much higher voltage and control the resulting current.See Figure 4.2 in the above web page for a pictorial of the current versus applied voltage at the leading edge of the step.You might want to look at these stepper drivers:https://www.pololu.com/category/120/stepper-motor-drivers

author: Siwastaja
author_rank: Super Contributor
timestamp: October 04, 2020, 06:22:03 am
content: Motors should be driven with actively fedback current, i.e., a constant current driver, because motors need more and more voltage at increasing speeds to maintain current; and current is what controls torque.Any proper stepper driver IC does this for you, but not L298N, which is just the transistor power stage; you can add current sensing and feedback if you want to; or use a more intergrated, modern single-chip solution.Control only based on voltage is possible; you just adjust voltage down until the holding current at 0 rpm is roughly correct. The downside is, once the motor speed (and thus, back-EMF) goes up, the current goes down, and you get full torque only at very low speeds. Current control basically gives you full torque at any rpm. Another downside to voltage-based control is, current isn't controlled very well because it's defined by the coil resistance, which isn't a very well controlled parameter, and varies with temperature. The higher efficiency (lower resistance windings) the motor is, the harder it gets without actual control.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 04, 2020, 12:48:20 pm
content: Driving stepper motors at full current is a bit outdated, and with modern electronics also not necessary any more.There is no reason whatoever that full FOC conrol could not be used.(F.O.C. = Field Oriented Control) It basically means that the current through the coils is handled in such a way that there is always a (near) 90 gegree phase difference between the magnetic field of the motor and the magnetic field of the stator. This gives the highes efficiency for the motor.This results in a (often) much lower motor current, and less noise and vibrarions.Allegro uses similar techniques in some of it's stepper motor drivers.The L298 should have been obsolete long ago. It's a design from the '70ies or '80ies or so.For starters you can have a look at projects such as "ananasstepper" and "mechaduino".

author: mawyatt
author_rank: Super Contributor
timestamp: October 04, 2020, 02:04:24 pm
content: I've done quite a bit of precision stepper motor and controller work for sub-micron positioning setups for stacking macro photography (see the Multi Axis Stepper controller image). Here's a few links to some older work, there's much more over at this site, recently involving piezo electric setups to achieve ~ nanometer types levels.https://www.photomacrography.net/forum/viewtopic.php?f=25&t=39473&hilit=Trinamic+Controller&start=15https://www.photomacrography.net/forum/viewtopic.php?f=25&t=39396&hilit=Trinamic+ControllerThe Lin NEMA 17 motor you have is a very good motor and has 400 steps per rotation (0.9 degree) vs the usual 200 steps in lesser motors. 4 wire dual coil motors like the Lin are designed to have the coils operated 90 degrees apart (Sine & Cosine), so when the rotator is turning the coils are being driven as Sine and Cosine waveforms. When the motor is stationary and not under micro-stepping (a method to achieve fractional cog steps) the holding currents are static, when in motion the currents are dynamic.The motor coils are intended to be current driven, and most modern control schemes use a kind of PWM with a recovery diode to keep the average coil current flowing but not dissipate the supply voltage times coil current power, similar in operation to a SMPS. These controllers are usually configured as an "H" bridge so the coil current can flow with either direction from a single supply voltage. The bridge is briefly pulsed and the coil current rises until a limit, then the bridge is switched to allow the current to flow back to the power supply until a lower limit, and the cycle repeats, so a triangular on top of a larger average type coil current waveform is created (see Sine and Cosine current image). During rotation these coil currents vary as Sine and Cosine waveforms (see motor run and stop motor current image).Long ago we developed a Hall Effect sensor to monitor Stepper Motor currents, this was used to achieve optimum performance (tuning motor control parameters) in the intended application, positioning a camera/lens assembly utilizing a linear rail.https://www.photomacrography.net/forum/viewtopic.php?f=25&t=39689&hilit=WaveformsHope this helps,Best,

author: tony359
author_rank: Frequent Contributor
timestamp: October 04, 2020, 02:35:52 pm
content: Thank you all for the very informative comments.As a beginner when it comes to these things I incorrectly assumed that driving a stepper was like driving a resistor. Of course it's not that easy.I ended up on the L298N as I found that on a few project pages online. I understand very clearly that more modern ICs deal with steppers in a much more sophisticated - and interesting - way.T3sl4co1l - Ah, I thought that that 24VDC was the rated voltage. Thanks for the explanation!I think I am going to order a TB67S249FTG - it seems a nice little board and should have plenty of power for my Lin stepper.https://www.pololu.com/product/2973Thanks all for your time!

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 04, 2020, 02:41:33 pm
content: Go to your favourite search engine and type in "Arduino CNC shield"You will find adapter PCB's which fit on a "regular" arduino (I hate that pinout) and which also have room for 3 to 5 stepper motor controller boards.The layout of these stepper motor boards is pretty much standardised, so you can experiment with different IC's and look at their differences.

author: Yansi
author_rank: Super Contributor
timestamp: October 04, 2020, 02:50:12 pm
content: Quote from: Doctorandus_P on October 04, 2020, 12:48:20 pmFOC for stepper motors? Since when? I may have slept under a rock for a while. Please give examples where it is used. I fail to find useful examples of this technology.

author: tony359
author_rank: Frequent Contributor
timestamp: October 04, 2020, 03:00:00 pm
content: Quote from: Doctorandus_P on October 04, 2020, 02:41:33 pmVery interesting! Thanks!

author: mawyatt
author_rank: Super Contributor
timestamp: October 04, 2020, 03:13:40 pm
content: Quote from: tony359 on October 04, 2020, 02:35:52 pmPololu is a great resource for stepper motor controllers, I started out using their USB boards. Later I got to a point where we needed better performance than their controllers could deliver (more complex motor control and optimization) and began the development of the Trinimac controllers.BTW stay away from the TI based controllers, they have some very bad micro-stepping characteristics.Best

author: tony359
author_rank: Frequent Contributor
timestamp: October 09, 2020, 07:29:10 pm
content: I've received the Pololu board and indeed it's a much better driver! I was a bit puzzled yesterday as I set the max current as per instructions and the motor ended up very hot. Only then I realised the 1.33A rated current is for BOTH phases! I somehow managed not to burn it by operating it at twice the current! I fixed that today and it purrs like a kitten.Cheers everybody for your help!

author: rstofer
author_rank: Super Contributor
timestamp: October 09, 2020, 08:40:51 pm
content: The thing about steppers is that they aren't as simple as some references would have you believe. Current control is required because the motor will almost always run at a multiple of nameplate voltage. The idea that you can hang a couple of MOSFETs on a uC's pins is just wrong.Glad it worked out for you!

author: Hellmut1956
author_rank: Contributor
timestamp: February 13, 2021, 05:13:52 am
content: Sadly too little knowledge exists about stepper motors. Let me begin just by stating that I have been aggressively attacked about what I wrote about stepper motors. I had to state a paragraph from the Trinamic website,FAQ:Why do I need to use a stepper motor supply voltage higher than the rated phase voltage?Stepper motors have a rated phase voltage and rated phase current. A typical stepper motor might have a rated voltage of 2.5 Volts and a maximum current of 2.8 Amps, for example. This basically means if you hook it up to 2.5 Volts it will draw 2.8 Amps. If you try to run it at a higher voltage it will draw more current and get excessively hot.But stepper motors are usually not hooked up straight to a voltage source. Instead, a stepper driver circuit is used that regulates the current.If you hook it up to 24V, for example, the motor would try to draw more current, but the stepper motor driver will not allow that to happen. That's because the driver circuit uses its high-frequency PWM and comparator algorithm to limit the average current to the desired maximum value. This is typically configurable in one way or the other.Stepper motors are designed to work this way and it is safe to run the motors at up to 20 times the rated voltage. You will actually get much better performance (max speed and dynamic behavior) by running at a higher voltage than the rated voltage.EndLet me start by stating that the torque a stepper motor offers is dependant on the amount of current flowing through its coils. Now let me refer to the text from the site of Trinamic:... it is safe to run the motors at up to 20 times the rated voltage...Let me continue telling you that I started playing with stepper motors nearly 8 years ago and I started using a stepper driver board based on the pair of devices L297/L298. I was unable to get the stepper motor I used to do a single step, it just vibrated. Let me continue telling you its nominal values being the voltage 3.6 VDC and the current 2.8 A. I started to question my ability to deal with a stepper motor. Then, on a trade show here in Germany the guys from Trinamic gave me as a present the"stepRocker" board. Together with their IDE that is available for free at [url_https://www.trinamic.com/support/software/tmcl-ide/]their website I did start doing extensive experiments to learn about the features of their stepper motor drivers reveal about the nature of stepper motors. I must point out that I am exclusively referring to dual-phase stepper motors in general and using hybrid stepper motors.These days you do not have to spend money on expensive boards, but you can benefit from the inexpensiveSilentStepMotorsTMCxxxxboards. Here I have given you the link to eBay as an example. A normal microcontroller can feed the driver to set it up and to run it.If you have the choice between 2 motors that offer the same torque, select the one with the lowest nominal voltage. This one will have the ability to benefit the most from using such a modern stepper motor driver. Why? Because you will try to apply to the stepper motor via the stepper motor driver board the highest voltage you have available. As it was correctly stated above, the nominal voltage is the one that will have the nominal current flow through the coils. Stepper motor driver setup tells the driver IC the nominal value of the current and using pulse width modulation, PWM, it will limit the current that flows through the coils to its nominal value by setting the duty cycle to such a value that only the nominal current will flow.It is important to understand the concept of the induced voltage. A voltage is induced in a coil when the voltage applied to it changes. The magnitude of this inverse polarity depends on the frequency of such a change. In a stepper motor, the voltage applied changes from step to step and will do this at the frequency at which it is supposed to do its steps. So the resulting voltage effective on the coils is the sum of the applied voltage + (-induced voltage):Veff = Vappl. + (-induced voltage)This is why stepper motors are a bad choice when a high rotating speed is desired. Now analyzing the equation you get that when the effective voltage drops to its nominal value, the current will flow with its nominal value, which means the duty cycle of the PWM is 100%. So using an as high as possible voltage applied to the stepper motor the effective nominal voltage will take place at a much higher step frequency. This means that only then the torque available will drop when the step frequency is further incremented. This is of course an approximation only as mechanical and electrical side effects have a minor influence.When you study the different modes available to drive the stepper motor with the Trinamic drivers you will learn more about stepper motors. One side effect is, that the Trinamic driver can increase the current flowing through the coils for a brief time by up to 20% above its nominal value to catch peak torque requirements of the application. The heating of the stepper motor is what limits the time such an increase of the current is allowed. But this also means that you do not have to choose a stepper motor to cover peak short-term torque requirements. This can only be accomplished thanks that the applied voltage is higher than its nominal value. But the same is used by the Trinamic driver to reduce the power consumption of a stepper motor and so to lower the temperature to which the stepper motor is exposed. The Trinamic driver can sense the torque load of the stepper motor and reduce the current, again playing with the duty cycle of its PWM, so that the stepper motor just generates the required torque plus a safety margin you define. This same method is used for its stallGuard feature that allows to operate the stepper motor without a sensor to report when a limit is reached. This for example enables the control of the stepper motor to stop when an unexpected object limits the movement. On the Trinamic website, but also on the Trinamic YouTube channel, you can see fascinating examples of those and other techniques the Trinamic driver offers. I want to finish this technical information by referring to 2 more helpful features. One is its ability to accelerate and descelerate the stepper motor offering an S-Shape ramp as opposed to a linear ramp. The S-Shape ramp has a benefit in that it enables higher step frequencies before the stepper motor blocks and then only vibrates. This is due to its effect to help the stepper motor to keep its internal electrical operation more stable. These resonances in a stepper motor are responsible for being noisy at certain step frequencies and silent on others and for the stability of its operation allowing for higher step frequencies.I had been so fascinated about the SilentStepSticks that I decided to purchase its then latest version, the SilenStepStick TMC5160hv which, according to its datasheet can oüperate with up to 60 VDC and 20 A. So for a 3D printer, I have recently purchased those SilentStepSticks TMC5160hv would make it possible to add a 48 VDC power supply to my 3D printer for those stepper motors in charge of the X, Y, and Z axes and for the heating of its plate and the extruder. 3D printing is a dance with mutually affecting elements and parameters. So when replacing the NEMA8 stepper motors that came for the 3 axes with such that have the length 3x, the stepper motors would not limit the speed of my printing.