Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Lack of Torque using PWM

Status
Not open for further replies.

henriquesv

New Member
Hello everyone.

I would like a piece of advice. I want to control a 200W DC motor through PWM.
I have a 24V battery as the DC source.

The control is being handled by a circuit made of a PIC 18F2550 and two L298 H-Bridge in parallel with high speed diodes (250Hz).

I can make the motor roll really fast, but when it gets to torque it just don't have any power. The same motor works great if DC is directly applied with a help of a knob.

Any tips / hints?
Thank you.
 
Post your circuit. Your transistors or FETS might not be fully turning on.

"Try" PWM at 100% or 99% depending on your code and look at the DC voltage across your motor.
 
Ok, I am avoiding high duty cycle due to the overheating, but I think it will worth a try.
It is weird, since when I apply like 12, 16 v directly it goes well ... But the same average pwm current wont do it.
 
So, use 12 or 16 V and 99 to 100% PWM. Just see what your drivers are doing.

Post your circuit. Maybe we can see something.
 
Here are the circuits

Here are the circuits. Please, consider all the capacitors as 100nF.
 

Attachments

  • sc1.png
    sc1.png
    75 KB · Views: 606
  • sc2.png
    sc2.png
    59.1 KB · Views: 453
Oscilloscope pics

And here Oscilloscope pics...
These were measured on motor pins to the ground.
 

Attachments

  • pic1.JPG
    pic1.JPG
    577.2 KB · Views: 425
  • pic2.JPG
    pic2.JPG
    562.3 KB · Views: 439
The waveform on the current sense resistors would really help. :)

It's also important to do testing on your motors and understand their requirements. If you have a variable voltage DC supply, try a low fixed voltage and with a voltmeter and ammeter measure the stall current of the motor (with the motor shaft fixed so it can't turn). That will give you a ballpark figure for the stall resistance of the motor(it's resistance when delivering very high torques).

Also some general figures are good to know, like free running (no load) speed and current, tested at a few different voltages.
 
RB is right about measuring the current that your motor uses when it is stalled.

It's my guess that the motor requires more current than the sense resistors allow to pass. A 1 ohm resistor at 1 watt can only sustain 1 amp.
 
I don't know how much current the stalled motor pulls. I wouldn't want you to overload the ICs.
From memory I believe the motor drivers are rated for 4 amps. You may want to check that.
Instead of short circuiting them you may try 4 amp fuses in the sensors resistors place.
This is something I might try just for a test, not something I recommend for a permanent solution, unless it works for your need.
 
I will try with the 4 amp fuses and will snapshot the current on the sensing resistors.
I will also try to post the motor stall current.
 
But I didn't understand why the sensing redistors would "chop" the current limits.
I thought I would have to read its vslue to make myself a feedback control.
 
Hello there,


The sense resistors are there to limit the current. This was mainly used for stepper motors where you'd want to supply a 30v signal even for a smaller stepper so that the current can climb up fast. With a lower voltage signal the current can not climb up fast enough for many applications that have to step fast, so a secondary control is added that limits the current instead. So on demand the motor can step fast, yet not burn out. The sense resistor is typically used with the L297 where that device will cut back the pattern to limit the current. Without another device like the L297 however the pattern will just be current limited via the sense resistor itself due to simply being in series with the load. So in other words, without a controller chip you would need to find another method of current limiting if the motor does not do it itself. Your circuit doesnt show an L297 so it's hard to tell what you are using to control the PWM with and if that control incorporates the sense voltage.

So with your application, you only have to limit the current for the IC chip, unless you want to use a higher voltage so that you can get very fast motor response (which it doesnt look like you need here, but it's up to you).

Knowing what the max your motor can draw when stalled would tell you if you need current limiting or not. Without current limiting the motor would draw more current than the IC chip can handle so the IC would burn out.

What i suggest is that you size the current sense resistors to what is appropriate for the IC chip. You dont need fuses you just need the right size resistors. I dont remember what the sense voltage range is for the L297, but say it is set to 1 volt, then with 1 ohm that will limit the current to 1 amp, so if the IC can handle 2 amps then you would need 0.5 ohms (but only if the sense voltage is 1 volt again).
So check the sense voltage and do the math and figure out what size resistors you need. You can use resistors in parallel to get down to a lower value as long as they have thick enough traces connecting them and they are soldered well (solder can affect low value parallel resistor banks).
 
Last edited:
Datasheet says the IC can handle 2.5 Amps continuous per channel, and that each IC has two channels. So 4 Amps with two channels per motor is workable, though I personally wouldn't recommend it.

https://www.robosapiensindia.com/resources/L298.pdf

The thing I'm wondering is how you do dead-time control, if at all:confused: There is nothing in the datasheet that indicates the H-bridge IC does this for you, and the schematic doesn't look like it even would. If you're not taking care of this detail, that COULD be your whole problem, but I doubt it. The IC would get stupid hot if that was the issue. The resistors being too high value seem more likely at this point. But even so, you do need to do proper dead-time control if you are not already.
Edit: Took a second look, and I guess the sense resistors would be what actually takes most of the shoot through burden.

It's unfortunate you have the 18F2550 and not the 18F4455, 18F4550, or similar. Both of the latter parts have an ECCP which makes doing dead-time control, and point of fact PWM in general relatively painless. Doing this also frees up the CPU for doing user code.

The control is being handled by a circuit made of a PIC 18F2550 and two L298 H-Bridge in parallel with high speed diodes (250Hz).

A couple questions/observations.

(1)250Hz !? Is that really your PWM frequency? Or is that a just typo? You should aim for at least 40 *KILO* Hertz or more. This prevents audible noise and makes the created voltage much more smooth. Though it may be easier to debug any switching problems with it that low.

(2)One 200W motor at 24 volts is going to require ~8.4 Amps just to sustain rotation. And much much more during start up or high load. At 2.5 Amps continuous and 3 Amps peek per channel, You will need at least 4 channels of the before mentioned IC to keep things within their ratings under normal operation. And you will certainly have to have the current limiting resistors to prevent IC overcurrent during worst case situations. Not really optimal if power and reliability is what you're really after. When designing H-Bridges, one should overrate things by at least 3X, and even that is not really being very generous. The parts you have are not even close to this.

My opinion, and this is JUST an opinion that you can totally disregard if you want. You should use a PIC with an ECCP, then get power FETs/IGBT's and appropriate driver IC. This can let you scale up to 1000's of Watts if you want, and has better specs and performance as it gives you full control over the whole process.

Anyway, Good luck.
-()b
 
Dear ()blivion,

You are absolutely right in every angle. And thank you for the whole analysis.
I managed to change the limiting resistors and i did the trick. But the 4 L298 couldn't handle that much of energy. They held it for about 2 minutes and then they exploded. :eek:
ECCP PIC and FETs / IGBT's are the way to go. Would you please indicate a good family of FETs/IGBT's for this matter?

Thank you.

Best Regards,
Henrique
 
Would you please indicate a good family of FETs/IGBT's for this matter?

Any FET's with at least 3x the voltage and current will work perfectly. With your particular setup though, I would change that to ~3x the voltage and over 4x the current, FET's with those numbers are quite easy to get and cheap.

Can't go wrong with any of these.

DigiKey
https://www.digikey.com/product-detail/en/AOT430/785-1145-5-ND/1855917

https://www.digikey.com/product-detail/en/STP60NF10/1026-STP60NF10-CHP/2521385

https://www.digikey.com/product-detail/en/AOT460/785-1146-5-ND/1855918

https://www.digikey.com/product-detail/en/STP80NF12/1026-STP80NF12-CHP/2521390


Mouser
https://www.mouser.com/ProductDetail/ON-Semiconductor/NTD5862N-1G/?qs=sGAEpiMZZMshyDBzk1%2fWiy8mkjihaa%252bLsHrwImjMh9Q%3d

https://www.mouser.com/ProductDetail/Infineon-Technologies/IPP057N06N3-G/?qs=sGAEpiMZZMshyDBzk1%2fWi4GEWCr0KJSE3GE5sBsT8kU%3d

https://www.mouser.com/ProductDetail/NXP-Semiconductors/BUK7513-75B127/?qs=sGAEpiMZZMshyDBzk1%2fWi9tVkC2LaBCdc%2fetkdhgQ2c%3d

https://www.mouser.com/ProductDetail/NXP-Semiconductors/PSMN016-100PS127/?qs=sGAEpiMZZMshyDBzk1%2fWiwlkuHBjkY0VWW8NYwLE1Xk%3d

There is a problem here though, all these are N-FET's, most H-bridges use P-Channel for the top side switches, generally so the control can be shared with the bottom side switches. This CAN be avoided, but requires some extensive ingenuity. The best I have seen was someone using opto-isolators in a clever configuration. If you know how to do this or similar, great, I highly recommend it as it lets you use cheaper parts that are actually better. Plus you get to use one part for all four switches, which lets you potentially gain bulk purchase discounts. In any case, here are some P-Channel units if you want to make a "conventional" H-Bridge. Which should be far easier to design and build.

DigiKey
https://www.digikey.com/product-detail/en/SPP80P06P%20H/SPP80P06P%20H-ND/2081673

https://www.digikey.com/product-detail/en/IXTP96P085T/IXTP96P085T-ND/1995412

https://www.digikey.com/product-detail/en/IXTP52P10P/IXTP52P10P-ND/1995407

https://www.digikey.com/product-detail/en/SUP75P05-08-E3/SUP75P05-08-E3CT-ND/3758733

Mouser
https://www.mouser.com/ProductDetail/Infineon-Technologies/SPP80P06P-H/?qs=sGAEpiMZZMshyDBzk1%2fWi5eGkr%252bPRUK3ycad2k5yKXs%3d

https://www.mouser.com/ProductDetail/STMicroelectronics/STP80PF55/?qs=sGAEpiMZZMshyDBzk1%2fWi1qxDdW%2fXBi2hekoN3GjTiE%3d

https://www.mouser.com/ProductDetail/International-Rectifier/AUIRF4905L/?qs=sGAEpiMZZMshyDBzk1%2fWi6rYPvSui93I7R7xZwnh1UY%3d

https://www.mouser.com/ProductDetail/International-Rectifier/IRF4905LPBF/?qs=sGAEpiMZZMshyDBzk1%2fWi5%252bqVgN3%252bWS8xZ2k6vtUc%2fg%3d


Driving sequence
Note that there is a particular way to drive an H-Bridge that is most efficient. I will explain in reference to this diagram...
robot-basics-using-h-bridge-move-your-bot-backwards.w654.jpg

When you want to drive the motor one way, let's call it forward, you would HOLD switch one(S1) ON, and you would then PWM switch four(S4) for the actual speed control. This gives you one single point that you are turning on and off which makes switching much cleaner and more efficient. Since switch four(S4) is an N-FET, you get the best PWM performance do to it's characteristics. This is because the P-FET's just acts like direction choosing switches, so their high speed switching characteristics don't come into play at all.

Now, if you want to change direction, you would make all the switches off/open, wait for a specified dead time, (or preferably, until the motor has completely stopped), Then you turn on switch three(S3) and PWM switch 2(S2) just like you did before, only this time you're going the other way, or breaking (stopping, not destroying) the motor. If you want to change directions again, you use the exact same process, just with the first switches again.

Note that a PIC ECCP already implements the above logic when set up in Full-bridge mode. All you have to do is decode how to set yours up this way from the data sheet. Otherwise, it's up to your ability to be able to do it in pure software by yourself. It's not really hard, but it's not nearly as convenient as using the ECCP when you have one.

FET Drivers.
Even if you get four logic level FET's, you will need to have some strong drivers to switch them quickly and cleanly. The good news is you really only need this on the bottom side switches, as these are the switches you are PWMing. You are really only using the top side to direct the current, and you only change them infrequently and usually only when the current is already off. So it is enough to use conventional drive strength, or if anything, higher voltage for the top side switches.

If it were me and my design, I would use BJT push-pull buffer that can sink-source at least 1 Amp current. This gives you the strength needed to really get those switches moving, and lets you use a higher voltage for driving the bottom side switch gate. I would drive all the FET's to 10~12 Volts for best performance.

Another option is to get a purpose built IC that goes in-between logic and an FET. This seems to be what all the cool kids are doing these days, you can't go wrong with this. But, you will have to have someone else help you pick one of these IC's out. As I said, I personally would just use BJT's and some such circuitry. But I can do these things.

Current feedback
If you want current feedback to your PIC, to let you so things like calculate motor power or detect short circuit, you will need to insert a current sense resistor between ground and the bottom of the lower switches. This gives you a voltage drop across the resistor that is proportional to the current through it and it's resistance. I would use a low resistance, high wattage resistor, like 0.1 ohms 10 Watts. I would then use an Op-Amp to boost the output voltage up to a point that the PIC's ADC could read it, so to about 2.5 volts. That, or I would use a Schmidt triggered comparator and just implement overcurrent shutdown.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top