[TERMINATED] pwm h bridge stepper control

hello :slight_smile:

I'm driving a stepper with l298n dual h-bridge module,

the chip gets really really HOT when the stepper is moving slowly & of course when is stooped but enabled,

however that doesn't happen when it is moving relatively fast.

I think that is because of the current consumption when the stepper coils are saturated.

so how could I implement a pwm signal to the enable pins of the module that is relative to the current speed of the stepper ???

or any better solution I'm sure it's already solved before but cant find any thing by my self :(.

THANKS IN ADVANCE :slight_smile:

Hi!
Have You checked the specs for the l298n and the settings for current? Possible to add a heatsink to the l298?

Railroader:
Hi!
Have You checked the specs for the l298n and the settings for current? Possible to add a heatsink to the l298?

It can handle up to 2A of current and already have a heat sink in the module, But I think when the stepper coil reaches saturation, It acts like sort of short circuit & that over loads the chip, Thus that doesn't happen when the magnetic field changes fast (stepper moving fast), Tt operates at a normal temperature.

I think that could be mitigated by implementing a pwm signal on the enable pins of the module.

Although that will help in the low speeds, the motor wont have enough power for high speeds (it will skip steps).

so is their is a library or code for controlling stepper with h bridge in that manner ?

An L298 is a very poor choice for driving a stepper motor.

Have a read through Stepper Motor Basics

If you want more advice please post a link to the datasheet for your stepper motor.

...R

Robin2:
An L298 is a very poor choice for driving a stepper motor.

Have a read through Stepper Motor Basics

If you want more advice please post a link to the datasheet for your stepper motor.

...R

THANKS A lot, That was very helpful unfortunately I'm stuck with that poor choice also my stepper is disassembled out of a very old copying machine, I couldn't find any thing about it's model number online, but it have a resistance about 15 ohm per coil.
I'll continue searching their must be a software solution for varying a pwm signal relative to each motor speed !!

If you are stuck with the L298n then the answer to the high temperature is a lower supply voltage.

You have not said what voltage you are using but, for example, 12v would drive 0.8 amps through 15 ohms.

The reason the temperature is lower at higher speeds is because the back emf and the inductance prevent the current from rising during the short interval of a step pulse.

Specialized stepper drivers monitor the coil current several times per pulse and take action to prevent excess current - which allows higher voltages to be used. It would be very difficult (impossible in practice) to do the same with an L298.

An A4988 stepper driver is not expensive.

...R

I notice the word PWM crept into the OP.
PWM is not used to drive a stepper motor.
Was this just a bad choice of words, or are you intentionally frying the driver during low duty cycle operation?