Dual H-Bridge L298n driver for stepper motor fries itself. How to prevent/address this?

Thread Starter

IsaacPZ

Joined Oct 24, 2023
2
Hello Everyone,

I have a college project where I'm trying to use some Nema34 stepper motors to move a platform up and down. The setup is functionally similar to a 3d printer, just using some more robust components. The problem I'm currently having is that sometimes the right side dual H-bridge driver suddenly fries. The system will work fine for several different movements, even being turned on and off. However, at random the right driver would smell burnt. I would quickly turn it off after noticing but the aftermath leaves the driver drawing 2.2amps on idle and overheating after a couple seconds... The circuit I'm using is shown below (Haven't ever made a circuit diagram before so please let me know if I should add anything).

circuit.png

Both motors are slaved together in the code & are used to raise the platform (attached to linear stages). The limit switch just keeps the platform from crashing into the base. I am also using adjustable power supplies with the voltage fixed at 12v. Not sure how to/if I can set a current limit. The left side driver has never failed, never even overheated, but the right side one has had to be replaced twice now. This is also my first time making a circuit period so I'm sure I might just be making a(possibly couple of) simple error(s) but am not sure what it could be. Does anyone know how to fix this?

Also, here are the components I'm using for reference:

Steppers:
NEMA34 465 oz/in 3.5A Stepper Motor Single Shaft (KL34H260-35-4A) | (automationtechnologiesinc.com)
Dual H-bridge drivers:
Amazon.com: L298N Dual H Bridge PWM Stepper Motor Drive Controller Board Module (Pack of 2) : Electronics
Left Side Power Supply:
Lavolta 30V 5A DC Power Supply Model BPS-305 ++ | eBay
Right Side Power Supply:
Amazon.com: DC Power Supply Variable(0-30 V 0-5 A), Eventek KPS305D Adjustable Switching Regulated Power Supply Digital, with Alligator Leads US Power Cord : Electronics
Arduino Uno R3
Amazon.com: ELEGOO UNO R3 Board ATmega328P with USB Cable(Arduino-Compatible) for Arduino : Electronics
Limit Switch:
DIYables Limit Switch for Arduino, ESP32, ESP8266, Raspberry Pi, 10 Pieces, Normally Open Close, Roller Lever Arm: Amazon.com: Industrial & Scientific


Thanks in advance for all the help.
 

Papabravo

Joined Feb 24, 2006
20,995
Helping you without a proper schematic diagram will be difficult, and you really should learn to stop making excuses when asking for help. Just provide the information that will most efficiently lead to an explanation and a solution.
 

sarahMCML

Joined May 11, 2019
353
Your motors are rated to take way more current than the L298 modules can safely supply (3.5A for the Motor against max of 2A repetitive for the module), without some form of current control. Either get higher current driver/controllers, or modify your modules and use with the matching L297 controller I.C.
 

Jerry-Hat-Trick

Joined Aug 31, 2022
494
some form of current control.
From the motor specification the coil resistance is 0.73 ohms so with the 12V supply you'd be trying to push 16.4A through the motor in the stalled condition. It'll be less if the motor is spinning but even then you are way over the current limit of thre L297 driver IC.

I'd question the need for such a powerful motor. Starting from first principles you need to consider the maximum weight of the platform and the vertical movement per turn of the motor to establish the necessary torque. And how fast does it need to move? If speed is not important then a much less powerful geared stepper motor will be fine.

The simplest way to limit the current in your existing assembly is to put a resistor in series with each motor coiil. To limit the current from 12V to 3A the resistor would need to be four ohms, less the 0.73 ohms coil resistance. This will massively reduce the torque of the motor but it may be sufficient for your application. Note that the resistors need to be high power and they will get hot. At stall, power loss in 3.3R resistor will be 30Watts - hardly practical.

If you really need the power and speed available for your chosen motors you should probably use the recommended motor drivers. But I favour going back to the beginning to select components based on the maximum weight and the minimum speed of movement of the platform.
 

shortbus

Joined Sep 30, 2009
10,044
I can't understand why people are still trying to do this with the simple, no amp control L297 as drivers, that only cause troble. In this era of inexpensive stepper drivers there, in my opinion no reason not to use a real stepper driver where more parameters can be set in driving the motors.
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
The problem with these L298 boards is that the current sense is not brought out in order to use a L297 translator IC, this IC sets the rated motor current based on the current through the L298 H-Bridge,
I have lifted the current sense pins out and fitted two sense resistors in order to be capable of setting the drive to the motor rated current limit.
Generally two resistors are needed 0.5Ω to 0.2Ω at the bottom of each H bridge sense pins.
If needed, I can show how to set up the sense pin on the L297 with a 10turn pot and resistor.
https://320volt.com/en/l297-l298-ile-step-motor-surucu-devresi/#google_vignette
 
Last edited:

sarahMCML

Joined May 11, 2019
353
The problem with these L298 boards is that the current sense is not brought out in order to use a L297 translator IC, this IC sets the rated motor current based on the current through the L298 H-Bridge,
I have lifted the current sense pins out and fitted two sense resistors in order to be capable of setting the drive to the motor rated current limit.
Generally two resistors are needed 0.5Ω to 0.2Ω at the bottom of each H bridge sense pins.
If needed, I can show how to set up the sense pin on the L297 with a 10turn pot and resistor.
https://320volt.com/en/l297-l298-ile-step-motor-surucu-devresi/#google_vignette
This is exactly what I did with my L298N module, although in my case since I didn't want to put in an order at the time, so I built up the circuit of the L6506 Current controller ( with my own translator), using discrete I.C's. It worked perfectly!
 

MisterBill2

Joined Jan 23, 2018
17,800
Some stepper driver modules require an external capacitor to absorb the spike energy from the driver. I have smoked two of them when the capacitor became disconnected for just a few steps. That might be part of te problem. AND one power supply may have a control problem. Both stepper drives should feed from a single supply.
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
Any decent drive will not allow over current, it will immediately go into fold back, in order to protect the motor, which should be ran at the motor rated current throughout the RPM range.
From 0rpm to max.
 

Thread Starter

IsaacPZ

Joined Oct 24, 2023
2
To everyone who answered my questions/gave good advice/clarified things, thank you for the help. I appreciate the quick responses. I'll be reviewing/applying what you said and hopefully get my circuit working well.
 
Top