3D printer stepper motor driver
3D Printer Stepper Motors & Stepper Drivers
Sort byRelevanceBestsellersCustomer ReviewsPrice, Low to HighPrice, High to LowNew arrivalsHighest Discount
-
- High-quality
- Different versions available
- Upgrade option
-
- Removable cable
- High torque
- Original Bond Tech
-
- Better heat dissipation
- Self-adhesive backing
-
- Original spare part
- From Creality 3D
-
- Original spare part
- By Anycubic
-
- Original spare part
-
- Fixed cable
- High torque
- Original Bond Tech
-
- 2-in-1 driver and heatsink
- Quiet movements
- Very durable
-
- Planetary gear
- High torque
- Original Bond Tech
-
- Original spare part
- For E3D Hemera XS
- Including drive gear
-
- Original spare part
-
- Adapter for increased compatibility
-
- Original spare parts
-
- Original spare part
- For E3D Hemera
- Including drive gear
-
- Original spare part
- From Artillery
-
- Original spare part
- From Artillery
All prices incl. VAT.
Best Stepper Motor Drivers In 2022
- Last Updated: December 16, 2022
- Jackson O'Connell
Ever wonder why your 3D printer is so loud (or quiet)? Besides the fans, most of the noise from your printer actually comes from the motors.
Yep, that’s right! Every time the stepper motors on your 3D printer move, the shaft (rod) inside rotates every so slightly and vibrates. The more the vibrations, the louder your 3D printer is…and the less sleep you get.
Stepper motor drivers play a key role in controlling these vibrations and reducing the noise levels from your printer. These small electronic circuits may not look like much, but upgrading them will work miracles. Moreover, not only will better drivers quiet your printer better but they can also improve the movement and accuracy of the motors on your machine.
If you’re looking to upgrade your drivers, a set of TMC2209s will certainly improve your printing experience. But if you’ve got some extra money in your 3D printing jar this week or want to use beefier motors, the TMC5160 is a great choice for you.
If you want to learn more about stepper motor drivers and find some of the best options on the market, look no further! In the sections below, we’ve done just that!
Enjoy!
Creality TMC2225
Get Discount Now
Check Latest Price
BIGTREETECH TMC2209
Check Latest Price
BIGTREETECH TMC5160
Check Latest Price
Table of Contents
- Best Stepper Motor Drivers At A Glance
- What Are Stepper Motor Drivers?
- Why Do You Need a Stepper Motor Driver?
- Why Upgrade Your Stepper Motor Drivers?
- What to Look For in Choosing a Stepper Motor Driver?
- Microsteps
- Noise
- Features
- Power Rating
- Heat Sink
- Price
- Product Reviews
- 1. BIGTREETECH TMC2209 (Best Choice)
- 2. BIQU A4988 (Best Budget)
- 3. BIGTREETECH TMC5160 (Premium Choice)
- 4. Creality TMC2225 (Best Value)
- 5. BIGTREETECH TMC2208
- 6. Songhe DRV8825
- Conclusion
Best Stepper Motor Drivers At A Glance
1. BIGTREETECH TMC2209 (Best Choice)
2. BIQU A4988 (Best Budget)
3. BIGTREETECH TMC5160 (Premium Choice)
4. Creality TMC2225 (Best Value)
5. BIGTREETECH TMC2208
6. Songhe DRV8825
What Are Stepper Motor Drivers?
So, what is a stepper motor driver? Stepper motor drivers are small but complex, circuit boards that go on the motherboard of a microcontroller, like the controller board on your 3D printer, CNC mill, or lathe.
The main purpose of a stepper motor driver is to regulate the power directed to the connected motor on the controller board. To better understand how stepper motor drivers work, though, we have to first cover the thing they work around: stepper motors.
Stepper motors are a specific type of rotating motor that moves in steps (hence the name). This is done by powering small electromagnetic coils inside the motor and having the central shaft spin based on which coils are powered. The distance the shaft rotates when the next coil is powered is called a single step.
However, when a stepper motor is tasked with moving with such precision, as is required on a 3D printer, a single step just isn’t small enough. That’s why there’s a special process called microstepping.
Microstepping is the process of giving power to two consecutive electromagnetic coils in a stepper motor. The result is that the shaft will basically make a half step rotation.
But the fan doesn’t stop at ½. Stepper motors can make a quarter, eighth, sixteenth, and so on steps. Today, it’s not uncommon for 3D printer stepper motors to be able to make 1/256 steps.
But microstepping is only possible with good stepper motor drivers. That’s because these small devices are the ones that take the power supplied by the motherboard to the motor port and push it to a specific coil, or multiple coils. The better your stepper motor driver, the more power it can handle, the better it can distribute it, and the lower microstepping fractions you’ll be able to achieve.
If you think that’s complicated, you’re right. But you don’t have to worry about all of this sciency stuff, because we’ve already put in the research to find the best stepper motor driver for you.
Why Do You Need a Stepper Motor Driver?
So, what’s to prevent you from just not using a stepper motor driver? Well, first off, the motherboard simply won’t be able to power the stepper motor in a way where the shaft turns.
However, let’s say, for the sake of the argument, that it was able to spin the stepper motor shaft. In this unlikely scenario, the motor would still only be able to move in single, whole steps. And, unless the electromagnetic coils are separated with such little space that the motor can turn in spaces of 0. 005-0.01 mm, then the motor wouldn’t be accurate enough to go on a 3D printer.
So, why do we need stepper motor drivers? Because they power the stepper motor and make it accurate enough to print high-quality models.
Why Upgrade Your Stepper Motor Drivers?
As we mentioned, stepper motor drivers impact both the noise levels of your printer as well as its print quality. Better drivers can make a world of difference in prints, yielding sharper corners, smoother walls, and other improvements.
Upgrading your drivers to newer options is a great way to improve your printing experience. Additionally, some of the newer and more advanced firmware features that further improve print quality, such as linear advance and sensorless homing, require newer stepper motor drivers. So you will only have access to them if you upgrade.
Of course, we can’t forget to mention that you can’t just rip out the driver from any 3D printer board. Most 3D printer boards that come with a printer have integrated stepper motor drivers. This means, the driver is built into the controller board and can’t be detached.
However, you can easily remove and replace your stepper motor drivers on 3D printer controller boards that have open-ended driver ports. That’s because all drivers meant for 3D printing follow the same pinouts so the ports are universal.
If you don’t have a 3D printer motherboard with open-ended driver ports, you can still upgrade your drivers in two ways. The first is to buy another controller board with better integrated drivers. Alternatively, you can purchase a motherboard with open-ended driver ports and buy the drivers separately and install them.
Check out our reviews of the best controller boards for 3D printers here.
What to Look For in Choosing a Stepper Motor Driver?
There are many stepper motor drivers on the market today. However, it takes a lot of work to develop new drivers as the internal specifics of each one is pretty complex. As such, most of the available drivers that are meant for 3D printers are made by the same manufacturers.
Despite the very obvious oligopoly in the market, there are still a few specifics that you should look for in drivers.
Microsteps
First off, the microstepping abilities of the driver are perhaps the most relevant feature for 3D printing. The higher the denominator of the microstepping fraction, the more accurate your motors will be, and the better your prints.
Noise
Secondly, the noise output of the drivers is worth looking at. While this isn’t always a published number, checking community experiences with the drivers and their noise can help.
Features
Next, you should look at the available features of the driver. While we can’t cover them in detail because they are too complex, the more special running modes a driver has, the better because you can use the drivers in more ways. Some examples of these modes include StealthChop, SpreadCycle.
Power Rating
The power rating of the driver is also very important. Not all drivers can handle as much power as others, so, if you’re using more power-heavy motors like the beefy NEMA-17s, then look for a high-rated stepper motor driver.
You can find the Power Rating (P) by multiplying the Voltage (V) by the Current (I).
The formula is P = V x I.
Heat Sink
As we mentioned, only a few companies develop drivers, but there are many sellers of these products. When looking for stepper motor drivers, look for some of the accessories that the seller might throw in, like heat sinks, which will increase the performance and longevity of the drivers.
Price
Lastly, don’t forget about the price. Drivers should be pretty inexpensive, constant anywhere from $10-40 for a pack of four. Remember that four drivers is enough as this will cover the X, Y, Z, and extruder motors on your printer.
Product Reviews
Now that you know about stepper motor drivers, why they’re necessary, why you might want to upgrade, and what to consider when looking for drivers, let’s get into the actual products. In the following sections, we’ve gone over what we believe to be the best stepper motor drivers for your 3D printer. We’ve included a diverse selection of drivers, including higher-end options, budget choices, and everything in between.
1. BIGTREETECH TMC2209 (Best Choice)Our first stepper motor driver is the TMC2209, arguably the best driver overall when considering the different features, price, and silencing ability. For reference, TMC2209 drivers are the same ones used in the BigTreeTech SKR E3 V1.1, and they are perfect for lowering the volume of your printer’s stepper motors.
Additionally, the TMC2209s are known to be compatible with Marlin firmware’s linear advance feature, which improves the extrusion of your printer. So, if you use some 2209s on your 3D printer controller board, you can get sharper corners on prints, more dimensionally accurate models, and other benefits through the linear advance feature.
The microstepping on the 2209s goes up to 1/256, meaning you can get super accurate when it comes to motion control on your printer.
Sensorless homing is also possible on the TMC2209s, so you can actually move the motors without using any endstops as long as you configure the firmware properly. As such, you can lower the cost of a printer you’re building if you use these sub-$10 drivers instead of purchasing a set of endstops. The downside of this feature is that the drivers run a little hot, but the CoolStep mode that’s compatible with the driver is a possible solution to lowering the temperature.
Overall, if I had to actually choose just one set of drivers to use on all of my 3D printers, I would 100% go with the TMC2209s. Their low price combined with their incredible quieting abilities and other features makes the decision a no-brainer.
- Good bang for your buck
- 1/256 microstepping
- Very quiet
- Compatible with many special modes
- Works with Marlin’s linear advance feature
- Somewhat expensive
- Known to run a bit hot
Check Latest Price
2. BIQU A4988 (Best Budget)If you’re on a tight budget and just need basically any stepper motor driver, the A4988 will do what’s necessary.
I want to make it clear that these drivers will do almost nothing to quiet your printer’s motors and that you will hear your printer from a different room. However, they are super inexpensive, widely available, and are a reliable option.
These old’ reliable drivers were developed by Allegro MicroSystems and are very capable with 8-bit 3D printer motherboards. With these drivers on your board, you can get 1/16 microstepping which is by no means good. However, it’s better than no microstepping I guess.
As for their compatible modes, there aren’t really any, mainly because they are very outdated. As such, it’s not unlikely that consistent use of 1/16 microstepping will run these drivers very hot because there is no cooling mode, like CoolStep to help with this issue.
But, as I said, these drivers are very reliable and still do the most basic function of allowing the stepper motors to work. So you might want them if you’re going for a cheap 3D printer build or don’t care how noisy the machine is.
- Very inexpensive
- Reliable and very compatible
- Widely available
- Only capable of 1/16 microstepping
- Very noisy
- Runs hot
Check Latest Price
3. BIGTREETECH TMC5160 (Premium Choice)On the opposite end of the spectrum, the TMC5160 driver is one of the most expensive stepper motor drivers you can get for a 3D printer. However, they have some epic features that might make them worth the price, which is why I’ve given them the title of “Best Premium Choice”.
First off, TMC5160 drivers will run you just above $15 a pop, so the drivers will likely cost more than your typical 4-motor motherboard. However, basically all TMC special modes, like CoolStep, StealthChop, MicroPlyer, SpreadCycle, stall detection, and passive braking work with these drivers. These modes are very present in the backend of a 3D printer, but I promise you they mean something and aren’t just random terms.
Furthermore, the 5160s allow for sensorless homing so you don’t even need to use endstops on a printer. 1/256 microstepping is also possible with these drivers and they make your motors quiet…like super duper quiet.
And, the best part is that, even when you maximize the use of these drivers, they don’t run too hot so they shouldn’t fail on you.
The drivers also have a high current rating, meaning they can support high-torque and power-intensive stepper motors. This makes them a great option for those using the beefy NEMA-17 motors on the more professional and industrial 3D printers.
While you probably will never need all that the TMC5160 offers, if you want the best of the best stepper motor drivers, then this one’s for you!
- Good bang for your buck
- 1/256 microstepping
- Pretty quiet
- Doesn’t work with linear advance (standalone mode)
Check Latest Price
4. Creality TMC2225 (Best Value)TMC2225s are a great middle-ground choice. For reference, these drivers can be found in the Creality V4. 2.7 “silent” board, and they live up to their name, providing a super quiet printing experience.
The drivers are pretty inexpensive, costing under $20 for 5, which is why I think they’re a reasonable investment for those looking for very precise motor movement and low noise levels. You can get as low as 1/256 microstepping with the 2225s, meaning very accurate prints are possible. However, make sure to be careful when using this level of microstepping as the drivers are known to get hot.
A downside of the 2225s is that they operate in standalone mode, meaning you can’t use linear advance with Marlin firmware because it doesn’t support this model of driver. The current rating for these drivers is pretty mediocre so don’t expect to be running a beefy motor off of this driver super well, but it should work.
Personally, I think the TMC2225’s are pretty underrated considering they do a great job at lowering the noise of your printer’s motors while not costing that much. So, if you’re looking for a good bang for your buck, consider the TMC2225.
- Good bang for your buck
- 1/256 microstepping
- Pretty quiet
- Doesn’t work with linear advance (standalone mode)
Get Discount Now
Check Latest Price
5. BIGTREETECH TMC2208The TMC2208 drivers are like the less cool version of the TMC2209 drivers. Unlike the 2209s, TMC2208s aren’t great for linear advances because their support in Marlin firmware is limited. The drivers are slightly less expensive than the 2209s, though and still do a pretty good job at keeping the noise output of the motors down.
The TMC2208s can operate in a few different special modes, like MicroPlyer, which allows for 1/256 microstepping. This is super useful for achieving accurate prints, but it’s known that the 2208s run pretty hot in this mode, so be careful.
Some other operation modes/features for the drivers include UART (more diagnostics for the motors), StealthChop2, and SpreadCycle.
The TMC2208s are, in my opinion, a decent set of drivers that do a good job at quieting the printer and allowing for accurate motor movements. However, if I’m being honest, for an extra few bucks you can get yourself a set of TMC2209s which are better in basically every way. But, if the TMC2209s aren’t available or you really care about a few bucks, then the TMC2208s will work excellent for you!
- Fairly inexpensive
- 1/256 microstepping
- Capable of UART communication mode
- Pretty quiet
- Replaced by the 2209s which are similarly priced
- Known to run hot in MicroPlyer mode
- Not good for linear advance
Check Latest Price
6. Songhe DRV8825Our last driver is the DRV8825, developed by Texas Instruments. While not very popular, the DRV8825 are very inexpensive, making them a great option for those building low-cost printers.
The drivers are capable of 1/32 microstepping. Although this level of microstepping isn’t impressive, it’s not terrible considering the low price and the age of the drivers (they’re not cutting-edge).
Sadly, the drivers don’t do a great job at lowering the noise levels of your motors and it’s also reported that they often result in artifacting on the exterior surface of prints. However, they do have a high current load rating, so you should be able to use more powerful motors with the drivers without worrying.
While I can’t say that the DRV8825 drivers are the “best” at anything, they are another budget option that I think are one of the best in the “least expensive” category.
- 1/32 microstepping (it isn’t terrible)
- Very inexpensive
- High current load rating
- Known for artifacting on the surface of prints
- Old and not cutting-edge
- Unpopular manufacturer (no special modes)
- Not very quiet
Check Latest Price
Conclusion
Although different stepper motor drivers don’t look all that different, they can massively change the performance and usability of your 3D printer. Upgrading your drivers will not only quiet your printer more but also improve the accuracy and quality of your prints.
If you’re in the market for some new drivers, I have to first recommend the TMC2209s. These drivers are a great overall pick, costing not too much money while providing almost any feature you want.
If you’re on the more professional side, the TMC5160s might be more up your alley as they really are the best on the market and have a high current rating. Just make sure they fit in your budget! Finally, if your looking for a steal and don’t care too much about how loud or accurate your printer is, the A4988 or DRV8825s should be a good fit!
Driver for 3D printer
For the correct operation of any 3D printer, you need a special device that will be responsible for controlling the stepper motor. Incorrect installation or malfunction will result in printing problems or damage to the printer itself.
What is a 3D printer driver?
The 3D printer driver is a device whose main function is to control the kinetic movement of the printer's stepper motors. The driver sends commands to the microcontroller that describe the movement of the shaft - the number of steps and direction, at the output receiving a sequence of signals specified in a certain way for the motor winding. The driver in this process is responsible for converting one signal to another. nine0003
Manufacturers offer many models of 3D printing drivers that vary greatly in quality. Top models are able to maintain high output currents while maintaining an acceptable operating temperature, and are able to control the motor so that it does not make excessive noise, does not overheat, and the print head moves smoothly, without jerks and accelerations.
Drivers are used everywhere where stepper motors are used: in all CNC machines, actuators, 3D printers, laser engravers, etc.
Modern 3D printers use kinematics and a control method, which consists in the sequential transmission of the coordinates specified for the movement of the hotend. Methods is the generally accepted standard for controlling all devices equipped with a CNC unit. Data transfer is carried out in a specially developed programming language called G-code.
Control boards and drivers are responsible for the physical movement according to the given code.
Boards, in turn, are divided into two types based on their capacity:
- 8-bit.
- 32-bit.
The first 3D printers were designed using the self-replicating mechanism used to quickly reproduce REPRAP prototypes and were based on one of the most common boards used in robotics, the Arduino. To develop the firmware of devices in these cases, a special environment was used - the Arduino IDE. In the future, in order to expand its capabilities, the RAMPS expansion board was additionally developed, which allows you to effectively control the rotation of stepper motors and take into account the zero position using limit switches. nine0029 Additionally, drivers were developed to control stepper motors that could be combined with these boards (Pololu drivers).
To date, the installation of such a driver is required for each stepper motor of a printing device controlled by the Arduino + RAMPS bundle. RAMPS is able to work effectively when connected to up to five stepper motors.
Other All-in-one boards are equipped with special pads for Pololu drivers, which are widely used among users. nine0003
Many drivers have been developed that are compatible with the boards used in modern 3D printers. The most popular include:
- Driver A4988. The manufacturer produces the device in green and red colors, the maximum divider step is 1/16.
- There are purple and blue devices on the market. The main drawback of the model is the lack of a well-thought-out hold mode, which causes the device to get very hot. Such a chip is recommended to be installed only in conjunction with a powerful heatsink that can compensate for excessive heating. The maximum divider step is 1/32. nine0024
- The original driver is made in Germany and the USA, but it is easy to buy a similar one made in China on the market. Copies differ from the original only in the accompanying piping - resistors, capacitors, etc., therefore, when using non-original devices, it may be difficult to select the voltage to power stepper motors. The device is characterized by quiet operation, background noise and engine sounds are minimized by manufacturers. The driver is equipped with its own chip, which is able to interpolate a 1/16 divisor to 1/256 without creating additional load on the processor. nine0024
- Made in China by Makerbase. A distinctive feature of the driver is the wide possibility of adjusting the microstep divider - from full to 1/128. There is no internal share in this driver model. The device is intended for installation on 32-bit boards only.
- Manufactured by Panucatt Devices. The driver is able to support microstepping from full to 1/32 and has well-thought-out protection against excessive voltage and high temperatures. Two model options are available: in the standard version, the voltage adjustment pin pad is shorted, so voltage adjustment can be made by the user in a manual setting format using a screwdriver and a multimeter. In the version with digital adjustment, debugging is performed at the software level and can only be supported by its own controllers - Azteeg X3, X3 PRO and X5 mini V3. nine0024
- This model is also manufactured by Panucatt Devices. The driver is equipped with a sensor that protects it from overheating and high voltage and also comes in two versions - standard and digital. The device is based on the THB6128 chip. Designed for installation on eight-bit boards.
- A new version of the driver from Trinamic and Watterott. A special board via the UART interface is responsible for dividing the microstep. The built-in board allows you to connect the driver to a computer using a USB cable and configure it using your own software. nine0024
Installing and configuring the driver for the 3D printer
For the correct operation of the 3D printer, before starting it for the first time, it is necessary to install and configure the drivers.
IMPORTANT! Before debugging, it is recommended to temporarily disable the anti-virus programs installed on the computer. This will help to avoid false triggering on files downloaded from external devices or the Internet.
The installation process takes place in several stages:
- Start the installation by downloading the driver file and running it. To do this, you will need to log in with an administrator account and run a file called "exe file". Next, following the instructions of the installer, complete the process and connect the 3D printer to your computer using a USB cable. The program will automatically find the device and assign it a COM port.
- Next, you need to download and install a program called Repetier Host. Once the download is complete, launch the program file and wait for the download to complete. After the installation is completed, along with the program, all the necessary accompanying programs will be launched, including slicer programs. During installation, it is recommended to uncheck the box next to the item about installing the Server utility, since it will not be required for further work and will take up device resources unreasonably. nine0024
- The next step is setting up the settings for the personal computer. During this, a corrected interface in Russian will also be configured, the necessary scripts and an active link to the help section. At this point, the Magnum 3D and Magnum 3D Vase slicing profiles will be rewritten, so any changes made by the user should be renamed before starting the process. Otherwise, they will not be saved after reinstalling the program.
- After the installation is completed and the settings are set, you should run the Repetier-Host program and select the COM port to which the printer was connected. This step is mandatory because the installer automatically assigns COM3 to the device, which can interfere with further debugging. nine0024
- Next, following the instructions of the program, you need to update the downloaded scripts and restart the computer.
- During the reboot, you will need to press the F8 button and select the "Disable Driver Enforcement Signing" option.
- After downloading, you will need to do the following: open the Start menu, open the Settings tab, go to the Update and Security section and select Recovery. Then, going to the tab "Special boot options", you must select the item "Restart now". nine0024
- When the process is completed (the reboot should go through in normal mode), you should open the "Diagnostics" tab, go to the "Advanced Options" section, select the "Boot Options" item and restart the computer again. When the device reboots, a menu will appear on the screen with a choice of parameters that will be used by the system in the future.
IMPORTANT! In order to install an unsigned driver, you must disable automatic digital signature verification by selecting the appropriate item in the menu and pressing the F7 button. nine0003
There is an alternative method for installing the driver for 3D printers. It is used if the system to which you plan to connect is 64-bit. In this case, the instructions above will not work.
In this case, when connecting the CNC device to the computer for the first time, for an unrecognized USB Serial device, you must select the driver yourself by opening the Modems section and selecting Compaq, and then Ricochet Wireless USB Modem devices. nine0003
Errors and how to avoid them
During the driver installation process, some errors may occur that prevent the process from completing.
The most common reasons for their occurrence include:
- Technical malfunction of the device. Even if the driver is detected by the system when connected to a computer, if it malfunctions, the installation will not be able to proceed correctly.
- Faulty installation program. The installer may have been corrupted during download or may have been infected with malicious code. The cause of errors may also be the absence of one or more files in the archive. nine0024
- The driver version does not match the installed device. Most often, such a problem is encountered by those users who install a driver downloaded from third-party sites, and not the one that came with the device when purchased. The error may be caused by the fact that the driver version does not match the specific device or operating system version installed on the computer.
- An attempt to install a new driver over the previously installed one will also cause an error. To fix the error, uninstall the old version of the program, and then start the installation again with a new file. nine0024
- The user is trying to install unlicensed software. If the downloaded driver does not have a special certificate that allows the operating system to recognize it, then the computer, when trying to install it, will give a corresponding error when the file is first launched.
Correct operation of a 3D printer is impossible without installing drivers - devices responsible for the movements of stepper motors. Their market for 3D printing is huge, so each user can choose the device that suits him. nine0003
- March 14, 2021
- 2212
Get expert advice
3D printing for the newest. From A to Z. Steppers, drivers and some magnetic field.
In continuation of the previous post for novice users of 3D printers.
This time I will talk about control boards, common drivers for stepper motors and a little theory about their work. Unfortunately, the post has a limit - 65535 characters, and I no longer fit into them to describe the common control boards in more detail, so they will be in the next post, just like the analysis of firmware, positive aspects and disadvantages. nine0003
Existing 3D printers have grown out of large machines, from which they borrowed kinematics and a control method, which consists in sequentially transmitting coordinates to move the hot end. This peculiar method is the generally accepted standard for the control of CNC (Computer Numerical Control) machine tools. This programming language is called G-code. The language is peculiar, and there is no need to learn it, the translation of the model from a graphical view into machine code for moving the hot end along the axes and feeding plastic is carried out in slicer programs. I will describe them a little later, but for now I want to return to the physical part of the printers and consider what can be used to correctly turn stepper motors and get a finished model. nine0003
1. Control boards and how they operate.
For a simplified understanding of the board, it is worth dividing it into 2 categories according to their capacity. There are 8-bit and 32-bit. The first 3D printers based on REPRAP ( Replicating Rapid Prototyper - a self-replicating mechanism for rapid prototyping) were based on a common robotics board aimed at non-professional users - Arduino. To create the firmware, we use our own free development environment - the Arduino IDE. nine0003
Arduino and Arduino-compatible boards are designed to be expandable as needed by adding new components to the device. As the most powerful, the Arduino Mega 2560 board with an 8-bit processor was taken.
To expand its capabilities, that is, control the heating of a hot table (Heat bed), hot end (Hot end), control the rotation of stepper motors, take into account the zero position using limit switches and other things, an expansion board RAMPS (RepRap Arduino Mega Pololu Shield) was developed . nine0003
Also, drivers compatible with this board (Pololu drivers) were developed to control stepper motors.
Which are inserted into the slots on the board. That is, for each stepper motor connected to the Arduino + RAMPS bundle, a driver is needed. RAMPS supports up to 5 stepper motors.
To control a stepper motor, it is necessary to adjust the motor supply voltage with a trimmer resistor. The setting is made with a multimeter in the DC voltage measurement mode. One probe touches the ground (the extreme contact on the driver labeled GND or the negative wire from the power supply), while the other touches the tuning resistor. nine0003
Next, you need to calculate the required voltage using the formula, based on the current for which the motor is designed.
Vref - voltage measurement pin for setting the current according to the formula.
Current Limit - stepper motor current.
Vref formula for A4988 varies from value of current sense resistors. These are the two black rectangles on the driver board. Usually signed R050 or R100.
Vref = Current Limit * 8 * (RS)
RS = 0.100
Vref = Current Limit * 8 * 0.100 = Current Limit / 1.25
RS = 0.050
Vref = Current Limit * 8 * 0. 050 = Current Limit / 2.5
For example for 17HS4401 : : 6 \u003d 1.7 / 2.5 \u003d 0.68V
And by rotating the resistor we achieve this figure on the multimeter display. An important addition, in order to adjust the voltage, you must turn off the printer, and turn it on to measure.
Formulas for other types of drivers can be found in this article. nine0003
Other All-in-one boards (all on one board, without such layered designs) have similar pads under the already common Pololu drivers.
Also, to select the operating mode of the stepper motor, jumpers are made between the pads for installing stepper motors, by closing which we select one or another operating mode.
There are only 5 operating modes for the stepper motor with A4988 drivers: full step, 1/2 step, 1/4 step, 1/8 step and 1/16. nine0003
Jumpers total 3: MS0, MS1, MS2. Low - no jumper, high - installed.
It turns out that when there is not a single jumper, the motor rotates without dividing the step into microsteps, and when all 3 are installed - by 1/16.
The splitting of a step into microsteps is done for the sole purpose of increasing the accuracy of movement. That is, using a 1/4 step split, we will not be able to stop in the middle between 2 and 3 microsteps. At 1/16 this is possible.
There are many drivers available that are compatible with boards used in 3D printers. Small list:
1 ) A4988.
Available in green or red.
Maximum divisor 1/16.
2 ) DRV8825.
Available in both purple and blue. Due to the lack of a normal hold mode (in a static position, but with the rotor fixed, this mode usually consumes less energy than rotation) gets very hot. Therefore, it is recommended to install a good heatsink on the chip.
Maximum divisor 1/32. nine0003
3 ) TMC2100.
There is both the original, available in stores in Germany and the US, and many Chinese copies.
The chip is the same, made in Germany, but the binding (resistors, capacitors ...) each Chinese sculpts in his own way, so it becomes difficult to select the voltage to power the stepper motor. This driver is positioned as quiet, in which the noise and squeak of engines is minimized.
Noise comparison between A4988 and TMC2100. nine0003
But as expected, something must be sacrificed in return. It gets very hot, and when overheated, skipping steps begin and movements along the axes may be incorrect.
For the first time, the cube became a snot caterpillar for me.
As a result, you need good cooling (some Chinese neglect metallization to remove heat, since the chip is located 'on the belly') and very precise voltage regulation. There are also small tricks - it seems to have fine-tuned it, it prints small details for a month without congresses, and you put the detail for a day or two, and somewhere at the end of the print you will get a 0. 5 mm microcongress. nine0003
The driver has its own chip that interpolates the 1/16 divider to 1/256 with no load on the processor, and ensures very quiet operation.
4 ) LV8729
The most common driver is made by the Chinese company Makerbase (MKS).
Drivers feature a wide range of microstep divider adjustments. From full to 1/128. There is no internal divider, like the TMS2100.
Use with 1/64 and 1/128 with 8-bit electronics (based on AtMega 2560) is not recommended, as it requires a lot of CPU resources. Designed for installation in 32-bit boards. nine0003
5 ) SD5984.
Panucatt Devices drivers. Sold only there, the Chinese do not make such. They also support step splitting from full to 1/32. There is protection against high current and overheating. As you noticed in the photo, there are 2 'extra' pins - the drivers support voltage regulation from the outside, that is, in the firmware of the board. Which makes it very convenient to control and adjust the voltage.
Available in 2 versions:
1) Standard version. The platform for voltage adjustment pins is shorted, and voltage adjustment is possible as in all other drivers - by hand, in the sense of a screwdriver and a multimeter. Supported by all boards. nine0003
2) Digital adjustment. Pins are available and adjustment is done programmatically. Supported only by native controllers: Azteeg X3, X3 PRO and X5 mini V3.
6 ) SD6128
Drivers also manufactured by Panucatt Devices.
Unlike the SD6128, they have a step split up to 1/256. Also, there is protection against overheating and high current. Similarly, it is present in 2 versions: with manual voltage adjustment, and with support for software adjustment. Software adjustment is only available for Azteeg X3, X3 PRO and X5 mini V3 boards. nine0003
The driver is based on the THB6128 chip. The driver works in both 3.3V (32-bit boards) and 5V (8-bit boards). The divider is installed in the same way, with jumpers, in accordance with the table from the pdf description.
For installation in 8-bit boards, it is not recommended to use dividers higher than 1/64 due to possible processor overload.
7 ) SD8825.
Panucatt Devices' own version, similar to the usual DRV8825, with the only difference that there are 2 pins for voltage control on the driver. Adjustment is available only on boards of our own production: Azteeg X3, X3 PRO and X5 mini V3. nine0003
Divider 1/32.
8 ) TMC2130.
I have already described my experience of using and buying. I repeat, if there is a desire to get confused using SPI on the board, and try to adjust the voltage - please. The widespread firmware for 8-bit Marlin boards has already added a library for this driver and auto-regulation of its voltage (the current is added until an overheating error appears, then it decreases step by step, in 50mA steps), but so far there are sensible mentions of installing and I did not see the Pololu driver setup. The only implementation that deserves attention is the implementation of Joseph Pryusha, on the new MK3. In his new EINSY RAMBO board, the driver data is already soldered into the board, and the firmware supports voltage regulation. One of the advantages of this driver is the control of the moment on the motor rotor, that is, at the moment the stopper carriage touches, the moment on the rotor shaft increases sharply, and the board understands that the carriage has reached its maximum and there is no point in trying to move it further. Therefore, there are no limit switches. nine0003
The board, similarly to the TMC2100, has an internal divisor from 1/16 to 1/256. Switching between dividers is done by software, via the SPI interface.
Quite a lot of Chinese clones have appeared, in which the SPI interface is soldered, and the operation is completely similar to the TMC2100. According to a representative of Watterott, there is no difference between the TMC2100 and TMC2130 with soldered SPI.
9 ) TMC2208
New drivers from Trinamic and Watterott. The microstep division configuration is carried out via the UART interface, with such a board. nine0003
The board provides the connection of the driver through this interface via a cable to the computer's USB. Next, with the help of its own utility, the parameters are configured.
After configuring the firmware, the board can be disconnected from the driver.
Chinese clones of this board have already appeared.
I got myself one. I can draw the only conclusion - Chinese clones are much more capricious and more difficult to adjust the voltage than the originals. There were BigtreeTech TMC2100 and Makerbase TMC2100 and these blkbox TMC2208, and of course the original TMC2100. Set up the Chinese, what would be straight
, I couldn't miss a single step in long enough printing. For that, the original in 5 minutes and everything is ok.
The chip has the same divisor from 1/16 to 1/256 as all other TMC2100,2130.
10 ) RAPS128
It is difficult to say who repeated whom if all stereotypes are removed. German drivers based on THB6128 (like the Panucatt Divices SD6128, according to Wiki REPRAP.org and the manufacturer's website. Judging by the description on the website of the store where they are sold, the Germans do not hesitate to install LV8729V, like the Chinese MKS LV8729.
The driver has a divisor from full step to 1/128. For 8-bit boards, it is not recommended to set the divisor above 1/32.
Very noticeable, not 1, but 2 potentiometers stand out.
The left one is for setting the voltage, and the right one is responsible for adjusting the current slope. The manufacturer recommends keeping the position of this potentiometer somewhere in the middle, from 1. 1 to 3V. In the datasheet for any driver there are tabular values \u200b\u200bfor setting the current decay.
A small digression.
I will present a small squeeze of this article , to understand the principles of operation of stepper motors and the difficulties of controlling them.
Stepper motor. How does it work and why does it need a current drop?
A stepper motor is an electromechanical device that converts electrical impulses into discrete mechanical movements.
However, stepper motors have many useful features, and most importantly - they are cheap. nine0003
Why is a stepper motor good?
- the angle of rotation of the rotor is determined by the number of pulses that are applied to the motor;
- motor provides full torque in hold mode;
- precise positioning and repeatability. Good stepper motors have an accuracy of 3-5% of the step size. This error does not accumulate from step to step;
- quick start/stop/reverse capability;
- brushless reliability, stepper motor life is actually determined by bearing life; nine0024
- one-to-one dependence of the position on the input pulses provides positioning without feedback;
- the possibility of obtaining very low rotational speeds for a load attached directly to the motor shaft without an intermediate gearbox;
- quite a wide range of speeds can be covered, the speed is proportional to the frequency of the input pulses;
But not all is well...
- Stepper motors have a resonance phenomenon; nine0024
- possible loss of position due to lack of feedback;
- power consumption does not decrease even without load;
- difficult to work at high speeds;
- low power density;
- relatively complex control scheme;
There are three main types of stepper motors:
- variable reluctance motors
- permanent magnet motors
- hybrid motors
You can even feel the type of motor by touch: when the shaft of a de-energized permanent magnet motor (or a hybrid one) rotates, a variable resistance to rotation is felt, the motor rotates as if by clicking. At the same time, the shaft of a de-energized variable reluctance motor rotates freely. Hybrid motors are a further development of permanent magnet motors and do not differ from them in the way they are controlled. You can also determine the type of motor by the configuration of the windings. Variable reluctance motors usually have three (rarely four) windings with one common terminal. Permanent magnet motors most often have two independent windings. These windings may have taps from the middle. Sometimes permanent magnet motors have 4 separate windings. nine0003
In a stepper motor, the torque is generated by the magnetic fluxes of the stator and rotor, which are appropriately oriented relative to each other. The stator is made of high permeability material and has multiple poles. A pole can be defined as a certain area of a magnetized body where the magnetic field is concentrated. The poles have both a stator and a rotor. To reduce eddy current losses, the magnetic circuits are assembled from separate plates, similar to the core of a transformer. The torque is proportional to the magnitude of the magnetic field, which is proportional to the current in the winding and the number of turns. Thus, the torque depends on the parameters of the windings. If at least one winding of the stepper motor is energized, the rotor assumes a certain position. It will be in this position until the external applied moment exceeds a certain value, called the holding moment. After that, the rotor will turn and will try to take one of the following equilibrium positions. nine0003
We are interested in the hybrid motors most commonly used in 3D printers.
Hybrid motors combine the best features of variable reluctance and permanent magnet motors. The rotor of a hybrid engine has teeth arranged in an axial direction.
The rotor is divided into two parts with a permanent magnet in between. Thus, the teeth of the upper half of the rotor are the north poles, and the teeth of the lower half are the south poles. In addition, the upper and lower halves of the rotor are rotated relative to each other by half the pitch angle of the teeth. The number of pairs of rotor poles is equal to the number of teeth on one of its halves. The toothed pole pieces of the rotor, like the stator, are assembled from separate plates to reduce eddy current losses. The hybrid motor stator is also toothed, providing a large number of equivalent poles, as opposed to the main poles where the windings are located. Usually 4 main poles are used for 3.6 deg. motors and 8 main poles for 1.8- and 0.9deg. engines. The teeth of the rotor provide less resistance to the magnetic circuit at certain positions of the rotor, which improves static and dynamic torque. This is ensured by the appropriate arrangement of the teeth, when part of the rotor teeth is strictly opposite the stator teeth, and part is between them.
The rotor of a conventional 3D printer motor has 100 poles (50 pairs), the motor has 2 phases, so the total number of poles is 200, and the pitch, respectively, is 1. 8 deg.
As you can see in the picture, the air gaps at the upper and lower pole pieces of the rotor are different. This is achieved by turning the pole pieces by half the pitch of the teeth. Therefore, there is another magnetic circuit that contains minimal air gaps and, as a result, has a minimal magnetic resistance. Another part of the flow closes along this circuit (shown in the figure by a dashed white line), which creates the moment. Part of the chain lies in a plane perpendicular to the figure, therefore it is not shown. In the same plane, the magnetic flux of the stator coil is created. In a hybrid engine, this flow is partially closed by the rotor pole pieces, and the permanent magnet “sees” it weakly. Therefore, unlike DC motors, the hybrid motor magnet cannot be demagnetized at any winding current. nine0003
The gap between the teeth of the rotor and the stator is very small - typically 0.1 mm. This requires high precision during assembly, so the stepper motor should not be disassembled for the sake of satisfying curiosity, otherwise its service life may end there.
To prevent the magnetic flux from closing through the shaft, which passes inside the magnet, it is made of non-magnetic steel grades. They are usually very brittle, so a shaft, especially a small diameter, should be handled with care. nine0003
To obtain large torques, both the field created by the stator and the field of the permanent magnet must be increased. This requires a larger rotor diameter, which worsens the ratio of torque to moment of inertia. Therefore, powerful stepper motors are sometimes structurally made from several sections in the form of a whatnot. Torque and moment of inertia increase in proportion to the number of sections, and their ratio does not deteriorate.
Hybrid engines are divided into 2 types. Depending on the configuration of the windings, the motors are divided into bipolar and unipolar. A bipolar motor (in the figure below under the letter a) has one winding in each phase, which must be reversed by the driver in order to change the direction of the magnetic field. In total, the bipolar motor has two windings and, accordingly, four outputs. nine0003
The unipolar motor (b) also has one winding in each phase, but a tap is made from the middle of the winding. This makes it possible to change the direction of the magnetic field created by the winding by simply switching the halves of the winding. The middle terminals of the windings can be combined inside the motor, so such a motor can have 5 or 6 terminals. Sometimes unipolar motors have separate 4 windings, for this reason they are mistakenly called 4-phase motors. Each winding has separate leads, so there are 8 (c) leads in total. With an appropriate connection of the windings, such a motor can be used as a unipolar or bipolar. A unipolar motor with two windings and taps can also be used in bipolar mode if the taps are left unconnected. In any case, the winding current should be chosen so as not to exceed the maximum power dissipation. nine0003
So which one is better?
When comparing bipolar and unipolar motors, the former has a higher power density. For the same size, bipolar motors provide more torque.
The torque generated by the stepper motor is proportional to the magnitude of the magnetic field generated by the stator windings. The most important is the limitation on motor heating due to ohmic losses in the windings. Just this fact demonstrates one of the advantages of bipolar motors. In a unipolar motor, only half of the windings are used at any given time. The other half simply takes up space in the core window, which forces the windings to be made with smaller diameter wire. At the same time, all windings are always working in a bipolar motor, i.e. their use is optimal. In such a motor, the cross section of the individual windings is twice as large, and the ohmic resistance is, accordingly, half as much. This makes it possible to increase the current by the root of two times with the same losses, which gives a gain in torque of about 40%. If increased torque is not required, a unipolar motor allows you to reduce the size or simply work with less loss. In practice, however, unipolar motors are often used, since they require much simpler winding control circuits. nine0003
How to control a stepper motor?
There are several ways to control a stepper motor. I will not paint everything, since they refer to full-step or half-step modes of operation. We are interested in the microstep mode. With this control method, the current in the phases must be changed in small steps, thus ensuring the splitting of a half step into even smaller microsteps (An important resource is the processor frequency, i.e. with what frequency it can send a STEP signal to move the driver). When two phases are switched on at the same time, but their currents are not equal, then the equilibrium position of the rotor will not lie in the middle of the step, but in a different place, determined by the ratio of the phase currents. By changing the ratio, it is possible to provide a certain number of microsteps within one step. To implement the microstep mode, more complex drivers are required that allow you to set the current in the windings with the required ratio. The half-stepping mode is a special case of the microstepping mode, but it does not require the formation of a stepped coil supply current, therefore it is often implemented. nine0003
Microstepping is achieved by making the stator field turn more smoothly than full or half stepping. The result is less vibration and virtually silent operation down to zero frequency. A smaller pitch angle can provide more accurate positioning. There are many different microstepping modes, with step sizes ranging from 1/3 of a full step to 1/512. The stepper motor is a synchronous motor. This means that the equilibrium position of the stationary rotor coincides with the direction of the stator magnetic field. When the stator field rotates, the rotor also rotates, trying to take a new equilibrium position. nine0003
In order to obtain the desired direction of the magnetic field, it is necessary to choose not only the correct direction of the currents in the coils, but also the correct ratio of these currents.
The displacement of the balance point of the rotor indicates that the rotor can be fixed in any arbitrary position. To do this, you just need to correctly set the ratio of currents in the phases. It is this fact that is used in the implementation of the microstep mode.
Microstepping results in a smoother rotor at low frequencies. To achieve high speeds in the microstep mode, a high repetition rate of microsteps is required, which cannot always be provided by the control microcontroller. It is because of this that the transition from 8-bit electronics to 32-bit occurs, since delta printers use the movement of 3 motors at once to move along one axis. nine0003
With each step, the rotor does not immediately stop in the new equilibrium position, but performs damped oscillations around the equilibrium position. The settling time depends on the characteristics of the load and the driver circuit. Generally, fluctuations are undesirable. You can get rid of this phenomenon using microstepping mode. Below are shown the movements of the rotor when operating in full stepping and microstepping modes.
It can be seen that spikes and fluctuations are observed in the full-step mode, while they are absent in the microstep mode. However, even in this mode, the rotor position graph differs from a straight line. This error is explained by the geometry error of the motor parts and can be reduced by performing calibration and subsequent compensation by adjusting the phase currents. nine0003
When the rotor rotates, the motor has dead zones that limit positioning accuracy.
The figure shows the dependence of torque on the angle of rotation of the rotor.
The presence of dead zones is very important for microstepping. If, for example, there are dead zones with a value of d, then a microstep of less than d will not move the rotor at all.
When the motor is running under load, there is always some shift between the angular position of the rotor and the orientation of the stator magnetic field. Especially unfavorable is the situation when the motor starts to decelerate and the load torque is reversed. It should be noted that lag or lead refers only to the position, not to the speed. In any case, as long as the motor is not out of sync, this lag or lead cannot exceed two full steps. This is a very pleasant fact. nine0003
Each time the stepper motor takes a step, the rotor rotates S radians. In this case, the minimum moment occurs when the rotor is between adjacent equilibrium positions.
This torque is called the operating torque, it means what is the largest torque that the motor can overcome when rotating at low speed. If the motor is stepping with two energized windings, then the operating torque is equal to the holding torque for one energized winding.
The drive parameters depend on the characteristics of the load. In addition to friction, a real load has inertia. Inertia prevents speed change and requires high acceleration and deceleration torques from the motor, limiting maximum acceleration. On the other hand, increasing the load inertia increases the speed stability. nine0003
When designing stepper motor drivers, it must be taken into account that the motor windings are inductive. This inductance determines the rise and fall time of the current. Therefore, if a square wave voltage is applied to the winding, the current waveform will not be square wave. At low speeds (a), the rise and fall times of the current do not have much effect on the torque, but at high speeds the torque drops. This is due to the fact that at high speeds, the current in the motor windings does not have time to reach the nominal value (b). nine0003
In order for the torque to drop as little as possible, it is necessary to ensure a high rate of current rise in the motor windings, which is achieved by using special power circuits.
The behavior of the torque with an increase in the switching frequency of the phases is approximately the following: starting from a certain cutoff frequency, the torque monotonically decreases. Typically, two torque versus speed curves are given for a stepper motor.
The inner curve (start curve) shows at what maximum friction torque for a given speed the stepper motor can start. This curve intersects the velocity axis at a point called the maximum start frequency or throttle response frequency. It defines the maximum speed at which an unloaded motor can start. nine0003
The outer curve (acceleration curve) indicates at what maximum friction torque for a given speed the stepper motor is able to maintain rotation without skipping steps. This curve intersects the velocity axis at the point of maximum acceleration frequency. It shows the maximum speed for a given motor without load. The region that lies between the curves is called the acceleration region.
In order to operate at high speed from the acceleration area, it is necessary to start at low speed from the start area and then accelerate. When stopping, you need to act in the reverse order: first perform braking, and only after entering the start area, you can stop the supply of control pulses. Otherwise there will be a loss of synchronism and the position of the rotor will be lost. nine0003
It should be noted that the continuous operation of the stepper motor at high speed is not always possible due to the heating of the rotor.
When accelerating or decelerating, it is important to correctly select the rate of change of speed and maximum acceleration. The acceleration should be the smaller, the higher the inertia of the load. The criterion for the correct choice of the acceleration mode is the acceleration to the desired speed for a specific load in the minimum time. Most often, acceleration and deceleration with constant acceleration are used. nine0003
The implementation of the law, according to which the motor will be accelerated or decelerated, is usually performed by the program control microcontroller, since it is the microcontroller that is usually the source of the clock frequency for the stepper motor driver. To generate a clock frequency, it is convenient to use a hardware timer, which is included in the same Arduino processor - Atmega2560. When the motor rotates at a constant speed, it is enough to load the timer with a constant value of the step repetition period (step duration). If the engine is accelerating or decelerating, this period changes with each new step. When accelerating or decelerating at constant acceleration, the frequency of repetition of steps should change linearly, respectively, the value of the period that must be loaded into the timer should change according to the hyperbolic law. nine0003
Resonance
Stepper motors have an unwanted effect called resonance. The effect manifests itself in the form of a sudden drop in torque at certain speeds. This can result in skipped steps and loss of synchronization. The effect is manifested if the step frequency coincides with the natural resonant frequency of the motor rotor.
When the motor takes a step, the rotor does not immediately settle into a new position, but makes damped oscillations. The fact is that the system rotor - magnetic field - stator works like a spring pendulum, the oscillation frequency of which depends on the moment of inertia of the rotor (plus the load) and the magnitude of the magnetic field. nine0003
The resonant frequency is determined by the moment of inertia of the motor rotor itself and the moment of inertia of the load on the motor shaft. Therefore, the rotor resonant frequency of an unloaded motor, which is given among the parameters, is of little practical value, since any load connected to the motor will change this frequency.
When non-micro stepping is used, the main cause of oscillation is the intermittent rotation of the rotor. When a step is taken, some energy is imparted to the rotor by impetus. This impulse excites oscillations. The energy that is imparted to the rotor in half step mode is about 30% of the energy of a full step. Therefore, in the half-step mode, the oscillation amplitude is much smaller. In microstepping mode with 1/32 of the main step, only about 0.1% of the energy of a full step is reported at each microstep. Therefore, in the microstep mode, the resonance phenomenon is almost imperceptible. nine0003
Current reversal methods
Stepper motor operation requires reversal of the magnetic field direction independently for each phase. Changing the direction of the magnetic field can be done in different ways. In unipolar motors, the windings are center tapped or there are two separate windings for each phase. The direction of the magnetic field is changed by switching half windings or whole windings. In this case, only two simple switches A and B are required for each phase. nine0003
In bipolar motors, the direction is changed by reversing the polarity of the winding leads. Polarity reversal requires a full H-bridge (figure below). Key management should be carried out by a logic circuit that implements the desired operation algorithm. It is assumed that the power supply of the circuits has a nominal voltage for the motor windings.
After the inductor is disconnected from the power supply, the current cannot stop immediately. There is an EMF (electromotive force) of self-induction, which has the direction opposite to the power source. nine0003
To adjust the torque, you need to adjust the current in the windings. In any case, the current must be limited so as not to exceed the power dissipation on the ohmic resistance of the windings. Moreover, in the half-stepping mode, it is required to provide zero current in the windings at certain moments, and in the microstepping mode, it is generally required to set different current values.
When operating at high speeds, it is required to increase the rate of current rise in the windings, which is possible by increasing the power supply voltage. In this case, the maximum winding current must be limited by a resistor. nine0003
Another method of stabilizing the current in the motor windings is key (PWM) regulation. This allows the use of simple and cheap unregulated power supplies.
The voltage drop across this resistor depends on the current in the winding. When the current reaches the set value, the key turns off, causing the current to drop. When the current drops to the lower threshold, the key turns on again. This process is repeated periodically, keeping the average current constant.