hello everyone, i’m tom and today we’regoing to do some tuning. particularly, of the stepper drivers. but instead of showingyou some magical procedures that work for some mystical reason, i’ll also try to explainwhy and how those things work. so to get started, what is a stepper motor?well, most of all, it is a brushless, synchronous dc motor - the same basic type that is usedin rc cars, planes, quadcopters and full-size
dual print head 3d printer, electric cars. and just like most other electricmotors, they rely on magnetic repulsion and attraction in the right spots to generatetorque on the output shaft. if these motors only used permanent magnet, they would bestuck in a single position and if you tried to rotate them, they would generate / opposingtorque to return to that position. now, because
one half of the magnets in actual # motorsare electromagnets, we can control which ones attract and which ones repulse the magnetson the rotor. in our case, those are the ones that are standing still in the casing of themotor. when you apply more current to these electromagnets, they generate a stronger magneticfield and consequentially, also / more torque. if the current through the coils changes polarity,it also inverts the magnetic field, so the spots that used to attract / now repulse eachother. now, if the coils get energized and de-energized in the right sequence, that onespot the rotor wants to rest in / starts moving / and the rotor starts turning to align withthat spot again. regular brushless dc motors have a layout and accompanying electronicsthat are geared towards efficiency and often
towards higher speeds, while # steppers areoptimized for high torque and accurate positioning. still, the only way they position their shaftis by generating torque through magnetic fields, and the closer the rotor gets to its restingposition, the smaller that torque gets. which you can easily test out on a stepper: tryrotating its shaft when it's powered up and standing still: you'll notice that it feelsa lot like it's spring-loaded - the harder you twist, the further it will turn. and the#higher you set the current, the #harder it will be to flex by hand as the motor generates#more torque pulling it back to its idle position. on the other hand, if you set the currenttoo low or push too hard, you might be able to feel the motor snapping forward: that'swhen it skips a steps and snaps back into
place in the next spot where the magneticfields match up again. congratulations, your motor just skipped a step! ideally, you don'twant that to happen when printing something, as your electronics have no idea about whetheror not they motor is still at the position it thinks it is, so it has to rely on themotor running perfectly. now i’ve only mentioned current so far andhaven’t talked about the voltages involved in driving a stepper motor, and that’s becausethey mostly are none of your concerns. the stepper drivers we use are all chopper drivers,so they are essentially a dc-dc converter formed together with the motor’s coils andthey will limit the current the stepper sees to what they think is appropriate for theposition it is trying to get to. so by itself,
it will increase or decrease the voltage themotor sees to get the current it wants - and that’s really all that matters for the motorand its performance, as the magnetic fields the electromagnets inside the motor generateare directly proportional only to the current through that coil. to get to the wanted currentfaster, the driver will use the overhead it has from the power supply to get there faster,which is why we typically use motors that require spec-sheet voltages of around 3 voltwith supply rails of 12 of 24 volt. / now, when you’re setting the current toyour motors, there are a few things that limit the range of values that will work. the frictionof your linear slides, the inertia of your moving parts when accelerating and decelerating# and possible resonances due to the springiness
of the motors and belts will all require acertain amount of torque to overcome - set the current too low, and your motor will startskipping steps on faster moves / or on the second the hotend scrapes over a part of theprint that somehow stuck up too far. on the other end of the adjustment range, if youset the current too high, the first thing that will happen is that your stepper driverwill go into overtemperature protection. on allegro chips, that is usually well below2 amps without extra cooling, but on texas instruments drv8825 chips, you can actuallyalso go past the rated current of your stepper motors. now, that’s not all too bad, becausethe motors can run for quite some time at a higher current, but they will eventuallyheat up past the softening point of your motor
holders and warp those. the maximum ratedtemperature for most stepper motors is 130 degrees celsius, which is well past what plasticmotor holders can handle. the other problem that especially the allegro chips have athigher current is that they won’t be able to accurately move the motor to its microsteppositions, which will be visible as resolution artifacts, so for example as tree rings onrounded surfaces. so for the actual current adjustment, thereare two schools of thought: one says that you should measure the driver’s referencevoltage, which adjusts its output current, and set it to the exact setting you want.on the common driver board-lets, this is done by adjusting a tiny potentiometer. on moremodern boards, you can control the output
current precisely through software and a bunchof extra chips on your control board. the problem i have here is that you usually won’tbe able to set your drivers to the rated current of your motors, which is usually at leasttwo amps, without overheating the driver. so you compromise on a lower setting, butstill don’t know if that new setting is going to work out. plus, with different referencevoltage levels and different sense resistors on the different driver boards, saying somethinglike “you need to set your potentiometers to 0.68v†doesn’t make too much senseunless you know the exact hardware used. so what i like to do is to go with the otherschool of thought and just experiment until i find a setting that doesn’t overheat thedriver or introduces ripple artifacts, but
still provides enough torque to keep the motorsfrom losing steps under all conditions. as stupid as that sounds, it’s what i thinkis the best way to go about it, especially since you’ll have already verified the settingyou want to use when you’re done adjusting. for me, that means jacking the current allthe way up to where the driver just barely overheats, then backing down a good bit toleave some leeway in case the airflow changes, the drivers degrade or some other things happensthat puts more stress on the drivers. also, running them right at the edge of the overheatprotection isn’t exactly good for the life expectancy of the drivers, even though theyare pretty robust little things. once i’ve found a current setting that islow enough to be reliable, i’d start adjusting
the maximum speed, acceleration and jerk settingsin the firmware. because that’s the other part of the current adjustment game - you’rebasically always trying to provide enough current and torque for your little motorsto master the challenges of driving a 3d printer. and while current and torque is limited, youcan also make it easier for the motors by reducing the maximum speed, but also loweringacceleration and jerk values. i’ve already made a video on adjusting the speed settings,and out of those, the most important one, i think, is the acceleration setting, becausethat’s what determines both the dynamic load on the motor, which is what it will mostlybe dealing with, but also whether or not an axis will go into resonance, and it can seriouslyscrew up your prints and your motivation to
keep printing / when your 3d printer seemsto randomly lose steps on certain parts. and you’re just standing there, looking likean idiot. it’s frustrating. i’ve been there, i don’t want to be in that positionagain. so do it right, test for resonances, for examplewith the test file linked to in the video’s description. print that, check if an axisloses steps and adjust accordingly. so, i don’t really know what else to talkabout as far as driver adjusting goes - you know, any setting that works for you is perfectlyfine. if the motor’s losing steps, lower the speed settings or increase the current,if the driver or motor overheats, lower the current. that’s it.and even if you set the current accurately
by measuring reference voltages or configuringthe firmware, you still need to check if they actually work in the same way.so, as always, thank you for watching. and thank you to everyone who has been watchingmy videos so far, you guys and gals have accumulated almost one million minutes of play time sofar, which is pretty hard to wrap my head around, to be honest. but it also means thatmaking videos is way more efficient for me than explaining the same topic over and overagain in person. and that’s what i was going
for in the first place, and i think it’sworking out pretty well. to maximize the future efficiency, please subscribe if you haven’tdone so already, leave a like and feel free to share this or any of my other videos withpeople that you think could find them useful.
adios amigos, see you next week!