Basically, as the subject says ... using a L298N, should a 50% PWM signal mean 50% volts output? I presumed that is would/should however that is not what my multimeter shows.
I'm attempting to use the ubiquitous L298N DC motor controller board to regulate my 20v input. Right now I do not have it connected to a motor, I'm just using my multimeter to see the output volts. I'm also supplying the L298 board with its own 5v power to run the IC and not using the 20v input power.
I'm using an Arduino NANA (not the new ones) which is dedicated to controlling the L298. It receives "speed" commands via I2C from my UNO controller. I'm also using my hobby DSO138 scope to check the frequency, cycle and duty to confirm. I'm also using the TimerOne library and NANO pin 10 as the output pin going to the enable pin on the L298.
When I initialize the TimerOne at 200 microseconds, aka 5KHz, and set the PWM at 50% (512 PWM), my scope shows the NANO pin at 5KH and cycle at 200 and duty at 50%.
With 20 volts going into the L298 should I not expect about 10 volts on the output? I see a very high value, around 19 volts.
It appears that any duty percent from 10% through 90% does not change the output, which remains in the 19 volt range.
At 100% duty I get 20 volts. And at zero% I effectively get no volts (couple mV).
Curiously if I change my frequency all the way down to about 550Hz, then the L298 output starts to reflect as expected, with a 50% duty showing at 13v. Still not 10volts, but at least from 10% through 90% duty reflects a appropriately changing output level.
From what I've read, the L298 should be able to handle a PWM if 5Khz on the enable pin. So back to my prompting question at the start of this post.
No, it provides an average of approximately 50% of the input voltage. Power is voltage times current.
But, if you’re you’re referring to the power that could be produced by a motor connected to the L298N, the answer is maybe but probably not.
The power produced by a motor is equal to its speed times its torque. You know neither of these values so there no way you could say the power would be 50%.
Hi folks ... apologies for my miss use of the word "power". I realize the word power has a specific definition and meaning which I did not intend to refer to in this case. I am strictly referring to the output "volts".
I've edited my original question, changed power to volts. Please re-read in the context of expected volts output from the L298.
Your scope is telling you what is going on - you have a square wave with a 20V peak. That's not going to give you an average of 10V but it has confused your meter a little.
Riccarr:
Hi folks ... apologies for my miss use of the word "power". I realize the word power has a specific definition and meaning which I did not intend to refer to in this case. I am strictly referring to the output "volts".
I've edited my original question, changed power to volts. Please re-read in the context of expected volts output from the L298.
Thanks.
The voltage out itsn't useful in decay modes, its the average current that matters, and as I said this
is not a linear function of PWM unless you use synchronous rectification mode.
In decay modes the voltage may float for part of the cycle, is clamped by a diode for some part,
and is equal to the supply for another part - this is a complex situation and also load-dependent.
In synchronous rectification mode the voltage is never allowed to float, and is always equal to the
supply or 0V (for a half-bridge), or the supply and its negative (for H-bridge). This means the
behaviour is basically linearly dependent on the PWM timing.