L298N driving 5v DC motor under 12V pwm

Hi.

I'm thinking to drive a 5V dc motor from a L298N module with a PWM 12V or even 24V DC.
Max PWM would be 40%analogWrite (motorPin, 106) at 12V or 20% analogWrite (motorPin, 53)at 24V.

It is to minimize the average current, mostly to shrink the power supply and power lines. But I think I still some kind of dampering at the end of the power line (cloth to the motor switch). Would a capacitor do the trick ?

Plus as I want to be able to drive 2 motors at the same time, and as the max PWM time is lower than 50% I could stagger the 2 PWM, so when one is ON, the other is OFF, and vice versa.

Any remark or advice would be appreciated.

5V motor on 12V might work. 5V on 24V, mehh. A motor is going to get hotter on a higher supply. Even if you limit the duty cycle. Also, you now give out bursts of power.

For the last, yeah, a capacitor. But NOT on the PWM lines to the motor but on the power lines to the motor driver.

And as you might have guessed by now, it's useless to shrink the power lines. Not because of heat generated in the cables but in the huge voltage losses across the cable.

Aka, rethink it. Can't you replace them with 12V motors?

And if you really need to drive 5V motor "on a long line" I would move all logic to the end of that line as well. Or at least the motor driver. That way you can place a DC-DC converter close.

A motor is going to get hotter on a higher supply. Even if you limit the duty cycle

I would disagree, a motor has enough thermal mass to avrage the power dissipation, and the actual amount of heating for the motor will be the same no matter what the voltage.

Of course for large voltage increases there could be some effect on the sparks produced by the brushes being too big and burning out the motor faster.

Grumpy_Mike:
and the actual amount of heating for the motor will be the same no matter what the voltage.

That is something that was discussed on another forum. I was uncertain as well. But the idea was that the average voltage does go linear with duty cycle (aka, putting 5V or 12V @ 42% results in the same speed) but the resistive part does not. That still follows P = V2 / R. And that power is linear to the duty cycle again. Aka ∝ = (P1 / P2) x (V2 / V1) = (V12 / R) / (V22 / R) x (V2 / V1) = V12 / V22 x (V2 / V1) = V1 / V2 = 12 / 5 = 2,4 times more heat.

Al though because of the inductive nature it’s going to be less but still, that sounded like the right explanation. I’ll be delighted if you could explain different. I’m still a bit in doubt. ::slight_smile:

hary:
Hi.

I'm thinking to drive a 5V dc motor from a L298N module with a PWM 12V or even 24V DC.

It is to minimize the average current, mostly to shrink the power supply and power lines. But I think I still some kind of dampering at the end of the power line (cloth to the motor switch). Would a capacitor do the trick ?

Plus as I want to be able to drive 2 motors at the same time, and as the max PWM time is lower than 50% I could stagger the 2 PWM, so when one is ON, the other is OFF, and vice versa.

Any remark or advice would be appreciated.

What are the spec/data on the motors?
How much current they rated at, the "power lines" minimization by using a higher supply voltage has me wondering what your project is?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom... :slight_smile: