How to cool down a stepper motor? - Page 1
Forum section: electronics / beginners

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 12:59:24 pm
content: Hello everybody,my littleNema11 stepper motorgets quite hot (this is normal since it absorb around 1.3 A). I would like to add some kind of heat protection by adding a sort of heatsink.My idea is to use the long mounting alu-bracket as heatsink too. In this way I will avoid a big and bulky construction.It would be possible to insert some thermal paste between the bracket and motor surface in order to maximize the heat transfer?Also: I googled around and I've got no definitive answer about what thermal paste are electrically conductive and what are not. Any suggestion?P.S.This stepper should be used outdoor.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 20, 2020, 02:06:51 pm
content: Stepper motors are designed and rated to be used as-is. First make sure you are staying within datasheet ratings + some margin (say, derate current by some 20%). If you still feel uncomfortable with the temperature, reduce current further, if possible, or pick a larger motor.Gluing heatsinks on is a commonly used trick but really just an ugly hack. I doubt mounting a fairly small heatsink, as typically seen, does much difference. With a fan moving air around the motor, you have better chances to have a real cooling effect, compared to a small passive heatsink which maybe adds some 5-10% of surface area of the motor and does that through additional thermal interface which likely halves the gain.If the motor has large even surfaces then of course you can mount heatsinks. Use standard heatsink compound. It works given the gap is very small (say less than some 0.1-0.2mm), requiring even surfaces. For passive heatsinking to be effective, I would be looking at heatsink surface area many times (5-10x) more than the motor surface area, coupled through as much motor area as possible.

author: SparkyFX
author_rank: Frequent Contributor
timestamp: December 20, 2020, 05:18:59 pm
content: Check if you can change how it is driven. If you can change the system mechanically to hold position/angle without being driven you can skip all considerations for heat dissipation.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 05:34:52 pm
content: Hello Siwastaja,thanks for the info.Unfortunately I cannot install a bigger motor because of space problems. So I have to run this small one at full power.Roughly, the "L" shaped bracket will have two times the surface of the motor, and much better ventilation. So I think it should add some benefits. Even lowering the temperature of 15-20% take me on the safe side and will provide a "safety" margin.The bracket should be something like this:I would put some thermal past along all of the lower motor surface.Since this motor will be used outdoor, it is not clear to me if common thermal paste will get dry and will crack under the sun of an hot summer day, or if it will freeze and crack in winter (-5/-10 celsius degrees).I was thinking about a little fan too, but I have no idea how to provide a minimal waterproof characteristics in such case...

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 05:42:33 pm
content: Quote from: SparkyFX on December 20, 2020, 05:18:59 pmIt would be really nice if I could do that. I saw some nice examples of steppers with embedded geared-boxes on the market (for example onwww.servocity.com).Unfortunately I have to be able to manually turn the motor shaft in some (rares) emergency situations. This is a "must-have" requirement of my project...

author: james_s
author_rank: Super Contributor
timestamp: December 20, 2020, 06:49:12 pm
content: Can you change it to a servomotor? Those can behave like a stepper motor when driven appropriately, but they can be much more powerful and more efficient. I don't think steppers are used much anymore due to the electronics required to drive servomotors becoming so cheap.

author: langwadt
author_rank: Super Contributor
timestamp: December 20, 2020, 07:06:02 pm
content: Quote from: james_s on December 20, 2020, 06:49:12 pmsteppers have much more torque than servos of the same size and the drive with modern ICs is dirt cheap

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 07:56:47 pm
content: Quote from: gimpo on December 20, 2020, 12:59:24 pmThere is another possible solution and that is add intelligence to the driver, in some applications it is not required to develop the full torque 100% of the time, for example when stationary or not accelerating/decelerating, by controlling the current according to torque needs power dissipation is reduced.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 08:14:45 pm
content: Quote from: fourtytwo42 on December 20, 2020, 07:56:47 pmAnyway, I have ordered a smalldevice on Aliexpressequipped with the AS5600 magnetic encoder to monitor tiny shaft movements. I'm not trying to build a closed-loop system, I want simply de-enerigize the windings when a small rotation of the shaft is detected.As I know, servos are good at high rpms. That is not my case.I need just good torque for small rotations (max 90-100°) of the shaft at low rpm (100? 200 rpm?)

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 08:21:25 pm
content: Maybe just maybe it might help if you described the application a little bit ?It's not normal to de-energise a stepper when an unexpected rotation is detected as that implies the holding torque is insufficient.A rotation measurement device is not normally required as the degree of rotation is known by the number of steps stepped UNLESS there is insufficient torque and slippage is occurring.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 08:23:03 pm
content: Quote from: fourtytwo42 on December 20, 2020, 07:56:47 pmThat is a very clever observation!Actually, when I measured the max load required by my application, I noticed that the force necessary to keep the load stationary is less than the one necessary to move it. Why I forgot this detail???But... I'm scraping my head now... I use the "Big Easy Driver" to drive my stepper. With that I have only two options:1. turn on or off the motor with a digital command (i.e. energize or de.energize the windings)2. manually adjust the current of the windings by tuning a little potentiometer on the board.So there is no way to increase/decrease the current by using a microntroller (in my case an Arduino Pro Mini)....Any idea?

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 08:30:08 pm
content: Yes, you modulate it with a PWM drive, so the on/off signal instead of being static is a square wave of variable duty cycle.The frequency you choose is somewhat dependant on the motor and driver characteristics plus your hearing!As the driver is DMOS it should manage 10Khz or even 20Khz without troubleEDIT Ghaaa I see this A4983 thing is already intelligent, two intelligences may end up fighting each other!

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 08:39:41 pm
content: Quote from: fourtytwo42 on December 20, 2020, 08:21:25 pmAH! So you want to know the details of my invention that will change the world???I'm just wasting my time and money to build an "intelligent" throttle-lock for my motorcycle.When the driver must suddenly shutdown the gas because of unexpected traffic conditions, then the micro-controller should detect the initial force applied on the throttle and immediately turn off the current. This will make make the rotation of the throttle itself more easy and with (almost) zero effort for the right hand.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 08:46:49 pm
content: Quote from: fourtytwo42 on December 20, 2020, 08:30:08 pmWait a minute! Stop the world, please.Are you telling me that the A4983 can electronically modulate the current?

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 08:50:43 pm
content: Quote from: gimpo on December 20, 2020, 08:39:41 pmOhh gosh I am very sorry, I can assure you I am not one of those dasterdly industrial spies we hear about trying to steal others ideasLooking at that driver chip it just controls the current within a step, there is no variation according to the mode, for example when stationary, by the sounds of it in your app it could spend a fair amount of time stationary, in that case you could modulate the ENABLE input to reduce the power dissipation, for example 50% duty cycle would halve the power. I guess the frequency probably has to be low enough not to confuse its (A4983) intelligence so a few hundred hertz might be worth a shot but you need to avoid any mechanical resonance, of course it might end up comforting the drivers hand too

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 08:53:35 pm
content: Quote from: gimpo on December 20, 2020, 08:46:49 pmIt does but in a kind of dumbo way because it doesn't know about the wider worldAll it does is use the modulation to generate a constant stator current rather than one controlled by V/R in the static case.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 08:58:21 pm
content: Ah!So I cannot use it from the external world...

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 09:01:48 pm
content: Quote from: gimpo on December 20, 2020, 08:58:21 pmI think you can, it seems to run at 25-30Khz, so if you SUPER MODULATE it via the ENABLE pin at a much lower frequency it has no option but to obey

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 09:07:40 pm
content: Quote from: fourtytwo42 on December 20, 2020, 08:50:43 pmThis sounds crazy, but could work. In this way I could decrease a little the current when full torque is not necessary.As I wrote above, I'm just searching for a little margin in motor temperature to take me on the safe side. I think that even a 20% lower current should lower the temperature more or less of the same amount.Anyway, now both Pololu and Sparkfun have migrated their products to the A4988 chip. As I see from the datasheet, the mechanism used to control the current is the same (PWM).

author: tszaboo
author_rank: Super Contributor
timestamp: December 20, 2020, 09:07:45 pm
content: What's even the point of cooling it down? There isn't anything heat sensitive in it. There isn't any electronics in it, just some wires and some metal and oil. Unless it is like 90 degrees hot, I dont see a reason why you want it cooled.In fact, maybe it doesn't even get proper lubrication or the bushings in it don't work properly if it is not at design temperature.

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 09:12:16 pm
content: Quote from: fourtytwo42 on December 20, 2020, 09:01:48 pmI try it in the one or two days. No doubts.I just have to find where my wife hidden the key of my little lab. She say that in Christmas time I have to stay with the family, not playing with electronics.Wife =

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 20, 2020, 09:15:03 pm
content: Quote from: gimpo on December 20, 2020, 09:12:16 pmFANTASTIC, mine too, asking what I am typing away at instead of making her evening Cocoa, seasons greetings and good luck

author: langwadt
author_rank: Super Contributor
timestamp: December 20, 2020, 09:52:52 pm
content: Quote from: gimpo on December 20, 2020, 08:23:03 pmuse a gpio (and resistor) connected to Vref to pull the reference voltage down a bit, reducing the current

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 10:08:51 pm
content: Quote from: NANDBlog on December 20, 2020, 09:07:45 pmI would agree with you. Furthermore, 99,9% of commercial stepper have a Class-B insulation. If I remember correctly, this means an heat resistance up to 110 °C.Nevertheless, I wrote at two manufacturers and both have answered with the same karma: "max environment temperature MUST be max 50 °C". So, if you close your stepper in a box, that must be the max temperature inside your box.In a hot summer day of August I think that you're going to crash that limit very easily. So any temperature grade saved is like gold for my outdoor application.(I also plan to add some opening in my enclosing box somehow, to guarantee a minimal ventilation added to an external heatsink.)

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 10:10:20 pm
content: Quote from: fourtytwo42 on December 20, 2020, 09:15:03 pm

author: gimpo
author_rank: Contributor
timestamp: December 20, 2020, 10:15:38 pm
content: Quote from: langwadt on December 20, 2020, 09:52:52 pmNo orthodox approach... do you have any link to provide an example where this solution has actually worked?I'm quite worry about how external environmental temperature could make this value oscillating too much...

author: langwadt
author_rank: Super Contributor
timestamp: December 20, 2020, 10:32:55 pm
content: Quote from: gimpo on December 20, 2020, 10:15:38 pmwhy wouldn't it work? it is just simple DC voltage that set the reference for the current limit. A potentiometer isn't exactly aprecision instrument either.

author: mawyatt
author_rank: Super Contributor
timestamp: December 21, 2020, 02:31:34 am
content: Quote from: gimpo on December 20, 2020, 09:07:40 pmThe most sophisticated stepper motors controllers I know of are from Trinamic. We developed some very precise controllers with the TMC5130, TMC5160 and TMC5072, they are offered in a small PCB called a BOB that makes it easy to mount and interface with. Our application used a Raspberry Pi, and these controllers mounted on to a HAT type PCB which plugged directly into the RPi.These controllers allow various parameter tuning to achieve remarkably smooth motor/system operation with little vibration and no sound.Best,

author: amyk
author_rank: Super Contributor
timestamp: December 21, 2020, 04:23:16 am
content: Quote from: gimpo on December 20, 2020, 10:08:51 pmThedatasheetfor your motor says maximum 80C rise with ambient temperature of 50C, that means an absolute temperature limit of130C.In other words, see how hot it gets in a normal 20C room, and you'll see how much extra margin you have. It is unlikely to be a problem.I have some old printers with stepper motor drives, and there are labels on the motors that say "WARNING: HOT SURFACE! DO NOT TOUCH!" They heat up to over 100C when in use (hot enough to boil water), and also discolour the surrounding plastic over a few decades of use. I would be more concerned about the effects of those temperatures on other parts of your device than the motor itself.

author: gimpo
author_rank: Contributor
timestamp: December 21, 2020, 08:56:42 am
content: Quote from: mawyatt on December 21, 2020, 02:31:34 amHi, stuff from Trinamic is really cool stuff. I looked at it some weeks ago and I was impressed (they have also good "torquing" steppers too). It is still in my browser bookmark list.As I understand Trinamic offers also a free integrated IDE for programming their drivers. Also a Linux version is available!Honestly, I was intimidated from the large options they offer with their drivers, and I felt a little bit lost.I have to write down an email to Trinamic guys and ask more info about my application. Decisively.Also the prices seems quite reasonable.

author: gimpo
author_rank: Contributor
timestamp: December 21, 2020, 09:10:35 am
content: Quote from: amyk on December 21, 2020, 04:23:16 amHi, your direct experience make me feel much better. I second your observations and I think there is a lot of safety margin in temperatures even by adopting no particular countermeasures against the rise of temperature.Anyway, I usually saw stepper motors operating in a "open-air" installation. Not protected by any enclosure box.I have no idea what happens when the stepper is inside a box to protect hit from rain and water splashes. In this case the thermal exchange between air and the metal surface of the motor is greatly reduced, and I think that some heat-dissipation media should be provided.For this reason I think that a layer of (not conductive) thermal paste between a face of the motor and a big alu-bracket should help. Also a layer of thermal past between the motor and the internal surface of an enclosing metal box could work as heat-sink.What you think?Unfortunately, seems that nobody have an experience about how much time a commercial thermal paste can last when exposed to outdoor temperature...

author: langwadt
author_rank: Super Contributor
timestamp: December 21, 2020, 03:06:35 pm
content: Quote from: gimpo on December 21, 2020, 09:10:35 amthermal paste is usually exposed to the same or higher temperatures from the heatsink

author: mawyatt
author_rank: Super Contributor
timestamp: December 21, 2020, 03:12:55 pm
content: Quote from: gimpo on December 21, 2020, 08:56:42 amYes they are very complex devices, and not easy to understand. Hopefully the Trinamic CS will be useful for you, they weren't for me since they knew I wasn't going to buy 1000 chips!! Used Python and the mentioned RPi. SCI was interface to control them, this was for an ultra-precison linear THK rail used for focus stacking and required micron & sub-micron positioning. Motors were 400 step NEMA 11, 14 & 17 types depending on what was required. THK rails have 1mm pitch, so each motor step represents 2.5um, with micro-stepping each motor step is broken down into many micro steps, up to 256.Best,

author: james_s
author_rank: Super Contributor
timestamp: December 21, 2020, 06:03:16 pm
content: Quote from: langwadt on December 20, 2020, 07:06:02 pmThat hasn't been my experience. Servomotors can be very powerful, think how much torque you can get from a cheap cordless drill for example, that's just a little brushed motor which could just as easily have an encoder on the shaft to be a servomotor. Compared to a stepper of the same size it would be no contest. Friends of mine own a CNC machine shop and they have upgraded several old machines from steppers to servos and got dramatically improved performance, the servos are faster, smoother, quieter, and being closed loop they never skip steps.

author: langwadt
author_rank: Super Contributor
timestamp: December 21, 2020, 06:39:10 pm
content: Quote from: james_s on December 21, 2020, 06:03:16 pmthe big torque from a cordless drill is because it is geared, probably something like 30:1no doubt servos are usually better and faster but they often require gearing, you an also get "hybrids" that steppers used as servos, they are really just two-phase brushless motors after all

author: gimpo
author_rank: Contributor
timestamp: December 22, 2020, 04:15:42 pm
content: Quote from: langwadt on December 20, 2020, 10:32:55 pmUh! I think I got it. Do you mean to "digitally" lower the VCC voltage used by the potentiometer, yes?(Seeschematic)

author: gimpo
author_rank: Contributor
timestamp: December 22, 2020, 04:34:53 pm
content: BTW, I have just ordered a cheappy/crappy/sloppy chinese infrared thermometer to evaluate your proposals about lowering the stepper temperature.Please be patient with me... I bought the one here below on Aliexpress...Don't say it to my friends.I thought that I need just a rough estimate of the motor surface temperature. Even an error of 7-8 Celsius degree will not kill me (I hope).(Uh! It has also adjustable emissivity!)

author: langwadt
author_rank: Super Contributor
timestamp: December 22, 2020, 05:26:24 pm
content: Quote from: gimpo on December 22, 2020, 04:15:42 pmjust a gpio connected to TP1 via a resistor (and a diode if you want to play it safe), normally you have thecurrent set by the potentiometer if you drive the gpio low it'll pull reduce the vref reducing the current

author: gimpo
author_rank: Contributor
timestamp: December 22, 2020, 05:31:32 pm
content: But I will test the PWM approach first.

author: tszaboo
author_rank: Super Contributor
timestamp: December 22, 2020, 06:07:30 pm
content: Quote from: gimpo on December 20, 2020, 10:08:51 pmYou looked into this before asking, I appreciate that.Can you install a 80mm fan in this enclosure to circulate the air, if it gets too hot? Even brand name solar inverters do this, I guess it is acceptable approach.

author: fourtytwo42
author_rank: Super Contributor
timestamp: December 22, 2020, 07:58:28 pm
content: Quote from: gimpo on December 22, 2020, 05:31:32 pmThey are kinda the sameIf you imagine you want to reduce power while stationary for example you could either do it by modulating the enable signal with a pwm or the suggested play with the reference voltage. The IR temperature gizmo's are bloody wonderful, had one for years, essential workshop tool & easy to calibrate just point it at the sensor of a known thermometer! Hmm beware there quite wide angle so it's hard to measure a lower temperature small part amongst other hot ones but you get the hang of it after a whileOf course peeps with lots of readies buy IR cameras!Quote from: gimpo on December 22, 2020, 05:31:32 pmOne other small problem might be any electronics you include in the same box

author: gimpo
author_rank: Contributor
timestamp: December 22, 2020, 09:18:28 pm
content: Electronics will be in a separate box.

author: gimpo
author_rank: Contributor
timestamp: December 28, 2020, 01:47:22 pm
content: Quote from: fourtytwo42 on December 22, 2020, 07:58:28 pmUPDATEI was playing today with the analogWrite() istruction of arduino. The PWM-approach doesn't work.By using the BED (Big Easy Driver) the stepper is fully powered when the ENABLE pin is LOW. On the other hand, is unpowered when the pin is HIGH.I tried different duty-cycles (5%, 10%, etc.) to keep the enable-pin a little bit above the 0 voltage to get a smaller current. Unfortunately the stepper rotates in an abnormal way, with a lot of forward-and-back movements, a lot of noise, etc.In other words: a disaster. It is not usable in such conditions.The stepper works normally and smoothly when the duty cycle is zero or 255. Other values make the BED getting "confused" ( I was using a Pro Mini Arduino with PWM frequency equal to 490Hz). I suppose for reasons you write above.It's a sin... it would be very nice if I could digitally control and modulate the current to the stepper, not only to reduce the temperature, but also to provide a different intensity of the motor force (torque) in different situations. That would be a real "game changer" for my project.Maybe I should migrate to another driver? At the moment I have no idea of what driver board allows to modulate/regulate the current by using an Arduino-like micro-controller.

author: langwadt
author_rank: Super Contributor
timestamp: December 28, 2020, 04:46:11 pm
content: Quote from: gimpo on December 28, 2020, 01:47:22 pmI'll try again: vary the Vref ...

author: gimpo
author_rank: Contributor
timestamp: December 28, 2020, 06:11:07 pm
content: If I put a resistor between TPI and ground (i.e. the pin of Arduino set to LOW), then it will be in parallel with the resistor of the potentiometer (10K).So I think that a value of50Kfor such resistor (R_ref) should lower the voltage of circa 16-20%, and the same should hold for the current.Or I missed something?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 28, 2020, 06:16:02 pm
content: +1 for Trinamic drivers - they can be set up to automatically reduce current when the motor isn't moving

author: gimpo
author_rank: Contributor
timestamp: December 28, 2020, 06:36:06 pm
content: Quote from: mikeselectricstuff on December 28, 2020, 06:16:02 pmAre you the devil? You're tempting me...Anyway can a Trinamic driver programmatically lower the current sent to the windings? Or it is just a static configuration setup?It would be fine if I could do that upon the input of an external sensor, or even a pressed button/switch.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 28, 2020, 06:54:46 pm
content: Quote from: gimpo on December 28, 2020, 06:36:06 pmIt's a while since I used one (TMC2130 ) - a quick glance at the datasheet shows "coolstep - load-adaptive current control" as well as a timeout (TPOWERDOWN register) and hold/run current settings (IHOLD_IRUN register)

author: Kjelt
author_rank: Super Contributor
timestamp: December 28, 2020, 07:26:39 pm
content: If you really need to cool your stepper motor for instance because the ambient temperature is too high then you can add a watercooled coolingplate to the flange of the stepper.You might have to make it yourself.Something like this.

author: mawyatt
author_rank: Super Contributor
timestamp: December 28, 2020, 08:43:02 pm
content: Quote from: gimpo on December 28, 2020, 06:36:06 pmYou can program the static current and the run current, even use a mode that reduces the power when the motor is up to full speed. In addition you can utilize the motor & velocity profiling to optimize motor performance and minimize motor heat buildup. They even have a Stall Detect capability without a motor shaft encoder, although I haven't used that feature.Spend some serious time studying the Trinamic data sheets to get an idea of what these controllers offer, they are the most advanced stepper motor controllers I am aware of.Best,

author: gimpo
author_rank: Contributor
timestamp: December 28, 2020, 09:56:24 pm
content: Quote from: Kjelt on December 28, 2020, 07:26:39 pmThanks for the advice, but all the construction would look a little bit too bulky and massive. I try to keep things as small and slim as possible.

author: gimpo
author_rank: Contributor
timestamp: December 28, 2020, 09:59:56 pm
content: Quote from: mawyatt on December 28, 2020, 08:43:02 pmTime is what I need the more.I feel acquainted in dealing with "simple" technology, but I will do what you suggest if I will be able to delay my project of around two months.

author: innkeeper
author_rank: Unknown
timestamp: December 29, 2020, 01:08:42 am
content: how hot is it getting that makes you concerned??

author: gimpo
author_rank: Contributor
timestamp: December 29, 2020, 10:10:30 am
content: After 10 minutes with windings fully powered (around 1.3A) I could barely touch the surface of the motor. This is normal, but at the same time I started to be worry.As I wrote above, this "thing" should be installed on a motorcycle. I started to imagine the motorcycle parked under the sun in an hot sunny day of August. It will take a while before the stepper get cooled by the wind after starting the motorcycle and driving.I will try to avoid to an enclosing black box too, but in any case reducing the current when not necessary will be a big benefit and will help me to stay on the safe side.P.S.As reported above, I ordered a cheap IR thermometer to have a rough idea of the temperatures. But I'm still waiting for the delivery.

author: langwadt
author_rank: Super Contributor
timestamp: December 29, 2020, 05:08:05 pm
content: Quote from: gimpo on December 28, 2020, 06:11:07 pmthe reduction will depend on the pot setting but it'll work.Add a capacitor on Vref and you can use PWM to vary the current

author: gimpo
author_rank: Contributor
timestamp: December 29, 2020, 08:02:45 pm
content: Quote from: langwadt on December 29, 2020, 05:08:05 pmYes, I have to detect the resistance of the pot when set at my preferred position, then I can calculate the right size of the resistor to be used in parallel with it.Quote from: langwadt on December 29, 2020, 05:08:05 pmIntriguing. But as I know a cap can act as a filter if not correctly sized. I'm using an . It is not immediate for me what size of the cap I should use (Arduino Pro Mini at 3.3V with 490 Hz of PWM frequency).I can recall my vague reminiscences have brought to my mind the τ=RC constant to calculate the charging/discharging time, but not resistor here...

author: langwadt
author_rank: Super Contributor
timestamp: December 29, 2020, 08:25:14 pm
content: Quote from: gimpo on December 29, 2020, 08:02:45 pmstart with something like 1u, it's not too critical all it has to do it turn pwm into roughly DC

author: gimpo
author_rank: Contributor
timestamp: December 29, 2020, 09:02:55 pm
content: The "BigEasyDriver Manual" states"A Vref of 1.76V will result in a motor current of 2A." (per winding - my note)The output voltage of the Arduino pin could be set (roughly) to any value between 0V and +3.3V by using PWM.If I understood right, I should be able to lower a little the Vref voltage upon my needs by connecting an output PWM-pin of Arduino to the Vref pin via a small cap.SO, let's say that I would lower the voltage from 1.76V to 1.3V. Then (if your idea works) all I need to do is simply to choose the right duty-cycle for that value. It is correct?

author: langwadt
author_rank: Super Contributor
timestamp: December 29, 2020, 09:16:25 pm
content: Quote from: gimpo on December 29, 2020, 09:02:55 pmcap goes from Vref to ground, resistor from Arduino to Vref

author: gimpo
author_rank: Contributor
timestamp: December 29, 2020, 09:44:23 pm
content: Ah!So the R_ref resistor is still. So you're proposing aLow-pass RC filter(see attached image). Why?

author: langwadt
author_rank: Super Contributor
timestamp: December 29, 2020, 09:53:20 pm
content: Quote from: gimpo on December 29, 2020, 09:44:23 pmthe lowpass turns the pwm into the DC voltage need for Vrefthe stepper controller itself does the current control by turning off the outputs off for a while when the voltage across the 0.22R current sense resistorsexceeds the Vref voltage (divided by 4)

author: gimpo
author_rank: Contributor
timestamp: December 29, 2020, 10:06:24 pm
content: Uh!. So that is useful for smoothing the PWM output. Nice.Anyway, I got a little bit lost...To summarize, let's suppose that I get my 1.5A for my stepper when Vref = 1.5 V.Then:1. PWM output = ~1.5 V (to make the Big Easy driver working normally)2. PWM output = 0V (to lower the Vref)In the case 1, the R_ref does not influences the voltage. In case 2 the same resistor works in parallel with the pot and lower the voltage. Is this right?

author: langwadt
author_rank: Super Contributor
timestamp: December 29, 2020, 10:48:58 pm
content: Quote from: gimpo on December 29, 2020, 10:06:24 pmjust try it and measure the resulting voltage on Vref for various PWM values

author: innkeeper
author_rank: Unknown
timestamp: December 30, 2020, 02:21:52 am
content: Quote from: gimpo on December 29, 2020, 10:10:30 amyes steepers get hot enough to burn you ... that is normal...typical nema 17 steppers are rated for 80 °C above ambient and a max temp of 130 C ... so if it's 40C outside your talking about 120 C ... so u less your getting over a 80 C rise or its getting over 130 C, then you have noting to be concerned about.i would not enclose it in anything plastic or unventilated.not sure why you would lower the current at any point unless your not using them at all and shutting them down completely if they're not needed ..... when you reduce current you reduce hold power so thats something to consider.do make sure you're not operating the stepper over the current as that will overheat them. the major damage to overheating them is 2 fold, one it will reduce the strength of the magnets permanently reducing the strength of the stepper, and second, it can melt the plastic inside the stepper and burn windings.

author: gimpo
author_rank: Contributor
timestamp: December 30, 2020, 10:42:43 am
content: Hi innkeeper,thanks for your observations. As I stated many posts above, I just want to have some safety margin to stay on the safe side. A reduction around 20% of torque when the stepper is holding a load (no movements) is not a bad idea, after all. If I can do it by program is even more clever.More than this, I had another idea while writing in this thread: this feature could be used to make the manual rotation of the throttle (yes, we're talking about a motorcycle) more effortless. The stepper could help the hand of driver once the direction of the movement is detect.I have received a little board with an AS5600 magnetic sensor rated for 0.015 degree of resolution (in ideal conditions). So I think that I could detect when the "user" starts manually applying some force on the motor shaft, and help him with some light torque in the same direction. It would be cleverifthis idea works, isn't it?Anyway, having (even a limited) control on the current trasmitted to the motor is a "nice-to-have" feature that all driver should offer, IMO. Setting the current by manually rotating a pot seems a little as a travel back to the '80 era...The enclosing boxYes, I have to avoid a plastic in favour of a 100% metal solution. With some thermal paste in between, ametal box could work as heat sink as well.I have also thought to mount the stepper at open-air, but the look will be honestly quite ugly...The electronics will be stored in a separate box 90cm (3 feet) away from the stepper. I plane to use a generous size of the cables to minimize resistance. I think that some AWG20 wires should be enough.

author: gimpo
author_rank: Contributor
timestamp: January 09, 2021, 11:18:30 am
content: UPDATEIn the meanwhile I almost randomly discovered another driver board distributed by Pololu: theTB67S249FTGboard.By scrolling down in the page until the "Active Control Gain" paragraph, I have found that this driver can "automatically" reduce the current when no high-torque is required. The amount of this reduction can be set by using two pins on the board.No idea if this feature works in the real life and can reduce the temperature when the motor is stationary, but seems so:https://youtu.be/sySdiGsw9-g

author: innkeeper
author_rank: Unknown
timestamp: January 13, 2021, 07:19:55 am
content: that's a pretty cool find, id definitely give it a try if I were you.