Maker Pro
Maker Pro

fried L298N, stepper motor fun...

well, back to this (after a good long while).

my past attempts at current limiting the L298N (with improvised analog electronics) were ultimately not successful, and eventually the thing fried.

couldn't really get accurate current limiting, and the stepper kept trying to pull more current than the L298N was rated for (around 2A), so it fried. I suspect I may be running too big of a stepper for the L298N to drive safely (at least with rather experimental stepper-driving code).

this is because when trying to run the stepper at 12v, naively it will try to pull around 5A.
keeping it at the rated 1.3A requires basically using around 30% duty cycle (for holding).

stepper coils are 1.3A, 2.5ohm, 5mH.


but, after the L298N fried, I am left back with an early stepper-driver built on a breadboard (out of PNP and NPN power transistors).

so, the current thinking is I will build some dual H-bridges using TIP120 and TIP127 transistors instead of driver ICs (still waiting on the TIP120's to show up). transistor H-bridges are considered since basically these should not fry.


previously I was using a fixed duty-cycle for running, generally around 50%-75%.
but, RPM is slow, and the motors really like to vibrate during operation.
the L298N failed with a running duty-cycle of around 85%, though the reported amperage on the power supply was still only about 1 amp at the time (and current limiting was IIRC set at around 2 amps).


I have since modified the code to try starting each pulse with around a 100% duty cycle, then rapidly dropping off to around 50% duty cycle (giving each stepper coil a reverse sawtooth wave). though not yet really well tested on the motor, I suspect it should perform better than using a fixed duty-cycle though (more power to get the motor moving at the start of the pulse, and less power holding it in place at the end of the pulse when the next pulse kicks on).

partly due to technical issues, it falls back to using the holding duty-cycle during low-speed operation.


side notes:
I am using the steppers to run gears with a 5mm tooth pitch used to move 3/8" all-thread (such as by spinning a nut on the all-thread), intended to in-turn move a load.

in one case, the gearbox is stationary and the all-thread does not turn (fixed to the load), so it will push/pull the all-thread through the gearbox (a gear on the all-thread contains a nut).

in another case, the all-thread is fixed to a gear in the gearbox (and will be spun by the motor), and the nut to move the load will be located on the load itself.


thoughts?...
 
Build your own bridge using MOSFETs, they will have much less loss and need less (possibly no) heat sinking than darlington transistors.

Bob
 
I'm not sure why you're wanting to limit your current. Is this a power-saving project, or limited power supply issue?
My input here, is that the stepper motor is going to try to draw the current it requires to operate.
If you aren't careful, one of these attempts you're going to fry your stepper motor instead of your L298N.
Instead of turning at speed, the motor could overheat in it's attempt to draw the current it requires.
 
Build your own bridge using MOSFETs, they will have much less loss and need less (possibly no) heat sinking than darlington transistors.

Bob

I have some MOSFETs, but nowhere near enough, and they cost a lot more than using Darlington transistors. heat and loss isn't a huge factor here, and I wont be running them anywhere near full load (running too much power continuously would be bad for the motors).

I had used some MOSFETs to build the driver for running the main tool motor though.

had built a temporary dual H-bridge mostly using normal BJTs and low-value resistors (what I had on-hand, it will likely be a while before the ordered components arrive, as they are apparently on a boat from China).


I'm not sure why you're wanting to limit your current. Is this a power-saving project, or limited power supply issue?
My input here, is that the stepper motor is going to try to draw the current it requires to operate.
If you aren't careful, one of these attempts you're going to fry your stepper motor instead of your L298N.
Instead of turning at speed, the motor could overheat in it's attempt to draw the current it requires.

I wanted to limit current to try to keep the L298N from frying, since it was basically the weakest link here. my attempt failed, and the L298N fried.

I could use more of them, but as-is they would probably fry as well, and I wont have enough for the project.


as for frying the motor, yes, this is a concern, but luckily they don't fry quite as easily.

I have some magnet wire at what appears to be the same AWG as that used in the motor (it appears to be 28AWG), and running 5A though it (12v / 2.5ohm -> 4.8A), in the test the wire gets hot (feels like somewhere in the area of 60C).

running 3.5A, wire seems to stay at about 40C or so.

not sure what temperature the wire in the motor itself would reach, but yeah this scenario is preferably avoided. though, I suspect it would likely take a bit of abuse to fry the motor at 12v though (as-in probably having it hold a single position at full power for an extended period of time, such that it pulls full current and gets very hot).

( in the tests thus far though, no noticeable heating of the motors has been observed ).


there would be much less risk to the motor at 5v, but in my tests, the motor is pretty weak at 5v (it pulls very little current when trying to spin and is unable to drive a load).

the power-supply I want to use in the actual project only really has 5v and 12v, so I basically have to make it work at 12v.


( ADD: what info I can find on the subject (via web searches and tables), implies that at 5A, the motor core should hit a temperature of approx 100C. a lot of this magnet wire I have seen seems rated for around 150C.

assuming this much, it should (probably) not be possible to burn up the motors at 12v, though they could still get very hot in extreme cases... )
 
Last edited:
Your problem with running it at 5V is that the L298 is dropping about 2V, which gives you 3V left for the motor. A MOSFET bridge would solve this problem.

I have some of these:

http://www.diodes.com/datasheets/DMG6602SVT.pdf

Which gives you a P channel and N channel in one package. They would work for your 1.3A current and cost me only 12.5 cents each or 25 cents for each bridge. If you can drive the gates with 10V or more they total loss at 1.3A would be 200mV.


Bob
 
Your problem with running it at 5V is that the L298 is dropping about 2V, which gives you 3V left for the motor. A MOSFET bridge would solve this problem.

I have some of these:

http://www.diodes.com/datasheets/DMG6602SVT.pdf

Which gives you a P channel and N channel in one package. They would work for your 1.3A current and cost me only 12.5 cents each or 25 cents for each bridge. If you can drive the gates with 10V or more they total loss at 1.3A would be 200mV.

Bob

driving the stepper with a BJT H-bridge, at 5v, it will hold at about 1A or so (and holds pretty solid), but if it tries turning (say, at 100RPM), current draw drops to about 0.25A, and the motor has almost no torque.


at 9v, at full duty, it will pull about 3A trying to hold, but around 1A while turning.

at 12v, it will try to pull 4A while holding, and about 2.5A while turning, so needs a lower duty cycle both for holding and turning (but a lot lower for holding, as it pulls more current while holding).

a Darlington H-bridge at 12v should give around 10v across the motor I think. the Darlington transistors I have on-order are TO-220, each rated for 5A.

it will take 4x PNP, 4x NPN, 4x 2n3094 (small NPN), and 8 resistors, and a few other parts, to build each stepper driver. currently, I am using pin-headers for both the signal and stepper connections.


surface-mount components are less useful in my case since my boards are mostly made using perfboard and wire-wrap construction.

I don't currently have a setup for making PCBs.

ADD: had seen some TO-92 MOSFETs, but the ones I have seen are still more expensive than the TO-220 Darlington transistors (and with a typically lower power rating).

ADD 2: DIP MOSFETs, not very cheap. DIP Darlington arrays, cheaper, but somewhat lower-power (it appears typically 500mA or less).
 
Last edited:
Top