principle:
In the field of 3D printing, it is often difficult for novices to understand how stepper motors are actually driven. For example, many engineers will ask questions like "My motor is rated at 4.6V, but my printer has a 12/24V power supply. Can I use it?".
This is because most of the electronics we use every day use constant voltage variable current power supplies, and that's what we're used to. A 12V LED strip will be powered by a stable, controlled 12V, and the current draw will increase with the number of diodes (load).
Stepper motors are powered the other way around - the current is constant/controllable (more on this later), and the voltage required varies with the load. This is why 12V power supplies are replaced by 24V or even higher voltage power supplies in 3D printing - because (among other benefits) this way the printer can supply more energy to the motor, achieving higher movement speeds and better dynamics, even though the motor current remains the same.
But a typical power supply provides a constant voltage, how is it converted into a regulated, controlled current? This is the job of a stepper motor driver, such as the TMC2208.
Current regulation is achieved through a technique called PWM (Pulse Width Modulation). The voltage is switched on and off very quickly using MOSFETs so that the current floats at a desired level. But this method of current control does not work with simple resistive loads - current regulation can only be achieved when the drive coil is used in conjunction with a magnet or other coil to rotate the stepper motor.
A coil - an inductor - has an interesting property - it "slows down" the current, adding "inertia" to it. This means that if a voltage is applied, the current through the inductor does not rise immediately, but slowly. The same thing happens when the voltage is cut off - the current does not drop to 0A immediately, but decreases over time.
By the way, LEDs are actually current controlled as well - but for a simple LED strip, a single resistor is enough to regulate the current, so ultimately the LED strip can be thought of as a constant voltage device.
Actual measurement
The described current control method can be clearly seen in actual measurements:
The yellow curve shows the current through the motor coils, the cyan line shows the voltage being switched on/off. This measurement was taken during standby, when the motor is not rotating, but holding its position. The current is almost constant, and the voltage is regularly switched on for short periods of time and then off again. Note that this switching is happening more than 30,000 times per second!
When the motor starts moving, something interesting happens, the shape of the current waveform is no longer flat, it is a sine wave. To make the motor rotate, the current needs to change to change the excitation magnetic field, thus generating movement. This principle applies to all brushless motors. The TMC2208 is used to actively measure and regulate the current, generating a sinusoidal current shape with a set amplitude, and the effective voltage changes accordingly. The rotation speed depends on the frequency of the current sine wave.
Do not worry about fluctuations in the voltage measurement. The amplitude - seen at the bottom of the screen is more or less equal to the supply voltage we use, 32V. The RMS value is an indicator of "how much" effective voltage is delivered to the motor coils. In this case the measured/calculated value is not very precise, but it shows that at this speed we are delivering a voltage less than 40% of the nominal supply voltage.
When we zoom in, we can clearly see the peculiar properties of the inductor mentioned earlier:
When the voltage is turned on, the current rises, but quite slowly compared to how fast the voltage rises/falls. When we turn the voltage off, the current through the coil falls, but still quite slowly. Before it gets too low, the driver turns the power on again and the current rises again.
This is basically how we keep the current at the desired level, also note that the amount of time the MOSFET switch is on (how long the voltage stays on) depends on "where" on the sine wave. When we look at a sine wave we can see areas where it changes slowly (near the top/bottom) and areas where it changes faster (near zero on the Y axis). If we want the current to follow this shape we just need to apply the voltage for longer in the "fast area" of the sine wave!
Small irregularities, deviations from the ideal, smooth sinusoidal shape are called ripple, and are always present when PWM is used to control coil current.
Effect of Motor Load
At this point a very important question arises - what causes the required voltage (the actual power supplied to the motor) to vary with load? That's the BEMF - a property inherent to every motor. I don't want to go into the physical details of this phenomenon in this article - simply put, the motor coils during rotation generate a "back" voltage that opposes the voltage we apply to the motor from the power supply, which is why it is called back EMF. The higher the speed (or load), the higher the BEMF we need to fight.
BEMF is affected by three main factors:
• Motor coil inductance – the smaller the better
• Set the current - the higher the current, the more powerful the motor, but so is the BEMF produced
• Speed/Mechanical Load – Of course, BEMF increases with load. This is how sensorless homing with TrinamicStallGuard works – it measures BEMF!
Practical impact of BEMF:
In the measurement below, we can see the accelerated movement and a close-up of the two areas - low speed/high speed
When the speed is still low, the motor controller still has enough headroom to regulate the current very well, so the sine wave can be considered ideal. But if we zoom in a little later, we can see that the current looks more like a triangle and the applied voltage is not very precise. That's because the controller does not have the voltage headroom to regulate the current correctly, and in fact, although the motor is still running, the sine wave will be distorted.
Now that we understand how to control a stepper motor, we can move on to the next point and answer the last question - what happens when the BEMF is so high that it approaches the supply voltage? You might guess that the motor will start to lose steps - and it does, but not immediately! Honestly, I was amazed at how well the drive and motor could handle extreme speeds. Let's take a look:
This is the current flowing through the motor coils during one complete run using a 24V supply. The printer starts from rest, then accelerates at 9000 mm/s2 to 900 mm/s and finally stops. So, what actually happens? At first, the driver is able to maintain a sine wave, but later, when the BEMF approaches the supply voltage, the waveform deteriorates, as we can see above. But at this point the printer still does not reach the desired speed - soon the back EMF voltage generated by the motor is too high to make it impossible to reach the set current value, it drops until the desired speed is reached, then the amplitude becomes stable, but we no longer see a sine wave - at this point it is closer to a square wave.
These results look bad, but in reality - they turned out fine! The machine ran with this setup for over a year without problems. This is normal in high-speed applications. Of course, the torque is greatly reduced and the accuracy may not be perfect, but after deceleration, the motor returns to nominal torque and the position is accurate. 900mm/s is the maximum speed I considered safe before I started to lose steps.
I also tried to use the raw data from the oscilloscope to calculate and display the average "voltage draw" during operation.
This turned out to be a bit harder than I expected, so the results are only indicative - that's why no numbers are provided. Anyway:
Both graphs show the voltage and current in "Local RMS", which is more or less the average effective value.
We can see that as speed increases, we need to apply more and more voltage until we reach a limit, at which point the current drops a bit. There are two important conclusions to draw from these graphs:
• We can never provide 100% of the supply voltage because we need to vary the current -> we need some time for it to fall.
• At high speeds we cannot provide full power to the motor.
Benefits of Higher Supply Voltage
Some of you may have realized that for most of the measurements I used a 32V, not a 24V power supply. That's true - I upgraded my machine to 32V, which is why I decided to play around with my oscilloscope and compare the two options.
Is it worth it? Definitely!
With the previous settings, the waveform shape looks much better and the current amplitude is about 60% higher than before, which means better stability and higher margin before the motor starts to lose steps. On the other hand, I can print with quite high acceleration, even up to 1200 mm/s, instead of a higher safety margin! Not that it means much for an FDM printer... But I'm very happy with the result.
Summary and suggestions!
Even a few volts difference will improve the operation of our stepper motor drivers or allow us to reach higher speeds. Sometimes higher print speeds can result in reduced print quality, but this is usually not a big deal, at least we can increase the travel speed, which will not only reduce print time, but also help with retraction adjustments.
With all the knowledge we have gained, we can now more confidently choose motors for our machines. So:
Make sure the motor rated inductance and resistance are as low as possible
For a driver like TMC2208 or TMC2130, a motor rated at 1.5-1.7A should be optimal.
For TMC2209, TMC2660 and TMC51X0, a motor rated current of 2.0 – 2.5A is sufficient
Choose the highest possible motor supply voltage, but double check the ratings of your driver and mainboard!
Personally I think that in the next few years we will see more and more 36V and later 48V motherboards for reprap/commercial 3D printers, so our machines get better and better and the speeds we can take advantage of increase. The only downside is that heaters are usually designed for 24V - but maybe that will change too!
Previous article:Machine vision: From 1D to 3D, improving its "vision" to the greatest extent
Next article:Introduction to Sine Wave Control of Brushless DC Motors
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Summary of pointer usage in embedded C language
- A colorimeter instrument based on USB interface
- Low-power electronic load for fast load transient testing
- 【ST NUCLEO-G071RB Review】ADC_DAC posting encountered problems
- MSP430 JTAG pin diagram
- Which is more important, the result or the process?
- IMX6ULL development board [Ultimate] Development board assembly process before use
- [McQueen Trial] Python driver for HCSR04 ultrasonic sensor
- FPGA pipeline design
- 【Qinheng CH582】6 CH582 four low power mode current measurement