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.

H-Bridge with PWM current limit

Status
Not open for further replies.

yngndrw

New Member
Hi,

I am designing a H-Bridge to be used with a PIC for a stepper motor controller. Attached is the circuit which I've come up with.

There are some test things there, but generally the PIC will set the Direction, Brake and the variable voltage source. (Above the current sensor op-amp.) The MOSFETs will be IRF540N and IRF9540N.

I am aiming for a switching frequency of around 20KHz, above the threshold for human hearing. However due to the design it will run at it's own speed. I tried to limit the frequency using the 10K resistor and 5nF capacitor next to the op-amp.

The reason for this hardware PWM solution is so that the PIC program can be much simpler. It means that the user can set the current limit through a potentiometer and no ADC use is required. It just needs a dual DAC. (One for each coil.)

I don't have the components to test this at hand so I thought that I'd ask for advice on here. Some of the component values (MOSFETs) are wrong because the program I used doesn't have IRF540N / IRF9540N.

I also intend on building the H-Bridge on a PCB without the current limter so that I can use it for other projects. I will use TTL buffers so that it can accept 5V and 3.3V signals.

Note: The resistor and inductor in the middle are to model my stepper motor coil.

My main questions are:
1) Are there any general problems with this design ?
2) Will there be any issues with this, seems as it doesn't have a "fixed" PWM frequency ?
3) Any suggestions ?

Thanks for your time,
-Andrew.
 

Attachments

  • H-Bridge With Current Limit.png
    H-Bridge With Current Limit.png
    39 KB · Views: 3,313
Last edited:
1) you /really/ need to sort out your gate-drive!!! as it stands you will burn out the BJT's
2) you need to uprate the main FET's, zvp2106A and co are Vds rated for 60V, having a DClink of 60volts is going to blow those devices
 
Last edited:
Your H-bridge driver circuit has no "dead time". The upper Mosfet is turning on or off at exactly the same time that the lower Mosfet is doing the opposite. So both Mosfets will conduct at the same time for a moment causing a huge "shoot-through" current from the supply. The Mosfets actually short the supply without some dead-time. Most PWM driver iCs have dead-time.
 
Styx:
1) Why would it burn them out, is it becuase of the ratings of BC549's or some other reason ? If it's the ratings - They were just a random transistor from my simulator and I'll find a better suited one. If it's the design, can you suggest a better design to combat this ?
2) The main MOSFETs in the diagram are the wrong part, I'll be using IRF540N and IRF9540N MOSFETs. I only used those as the simulator didn't have much of an option.

audioguru:
Would the attached circuit fix this problem ? It would go in between the drivers and MOSFETs. The idea is to limit the current for the switch-on phase while bypassing the limiter with the diode when switching off. I don't know if this will work but it's an idea.

Failing that, can you suggest a driver which would work in this application ?

Max supply voltage: 60V
Main mosfets: IRF540N and IRF9540N
Fast enough for 20KHz PWM

Thanks again for your help.
 

Attachments

  • MOSFET Dead-Band.png
    MOSFET Dead-Band.png
    1.4 KB · Views: 765
The are a few PWM controller ICs available. The TL494 is one example that has dead time and a push-pull output.
 
The reason why I thought about building the drivers myself was becuase I always found it hard to find drivers which meet my needs.

The IC you linked me to can only output 250mA but I was looking for closer to 1A to keep the MOSFET rise/fall time low. The second problem is that I wanted to be able to run these at 60V.

To be honest, I don't know a lot about MOSFETs - What is wrong with the driver that I designed which would blow the transistors ? I don't want to end up with using a driver only to blow the output stage of that too.
 
You need to turn on one Mosfet at a time with some "dead-time" in between.
Or else one Mosfet will still be turning off when the other Mosfet turns on then they both blow up.
 
Would the change that I mentioned in my first reply (Second attachment) fix that issue or would it not be enough dead time ? (Or not work in general ...)

Styx mentioned that the driver it's self would burn out, why is that ?

I did find this which would be perfect:
https://www.electro-tech-online.com/custompdfs/2008/07/4223rg.pdf
However I cannot find an equivalent in the UK. (Another reason why I wanted to build my own stuff, it's easier to find parts in my local electronic stores.)
 
The output of Mosfets can be 60V or more but the input is only 10V.
 
I thought that the P channel MOSFETs required (V+) to switch off and (V+ - ~10) to switch on ?

I wanted to use P channel MOSFETs for the high side because:
1) I already have them.
2) I didn't want to mess around with an 70-80V charge pump.

Or am I thinking wrongly ?

I've been searching on Google but still haven't found out how to add the dead-time delay.
 
Last edited:
I fly an electric model airplane that uses PWM for its motor speed control. I never tried to reverse its motor (I think some airline airplanes reverse the blades on their turbo-props to slow down).
I don't know if jet planes reverse their thrust to slow down.
 
Last edited:
I don't understand what you're getting at ?
My PWM application is for the motor in an electric RC model airplane and it works perfectly. It does not BRAKE and it does not REVERSE.

You didn't say what is your application.
 
Ah, well this H-Bridge is for two purposes:

Firstly, as a "generic H-Bridge prototype" to use when needing to breadboard a motor controller for example - I'll have a read made unit which I just have to connect up.

Secondly, it's for a microstepping bipolar stepper motor driver. (The current limiting is just for this, for the generic board I'll just have the current sense resistor on it's own, with an analogue output from it.)

I may aswell design the circuit once and use it many times, so I tried to make it as versatile as I could - Hence the brake input.

It terms of ratings, I guess I'm looking at 60V max and 10A. I will make a PCB for it and bolt a large heatsink / fan to the top of it. The inputs must be able to accept both 5V and 3.3V. I will probably just use a TTL buffer for this.

I already have a load of IRF540N and IRF9540N MOSFETs so I'd like to use them and I also want it to be able to switch at 20KHz so that it is inaudible.
 
Last edited:
Look at the datasheets for your Mosfets. They need an input of 10V to completly turn on, not 5V and certainly not just 3.3V.

Your motor has inductance. It takes time for the current to build up in an inductance. At 20kHz there is not much time so the voltage of each pulse must be extra high for it to build up the current to the average amount you want.

The PWM frequency for my electric model airplane is 2kHz for the current to build up high enough in each pulse. I can hear it and I like its sound in the motor.
I think electric wheelchairs blast a high voltage at an inaudible high frequency so that the average power is high enough..
 
By 3.3V and 5V inputs, I ment the inputs to the whole H-Bridge before the logic and drivers. I.e. PWM, Direction and Brake on the initial circuit diagram that I made. (Just noticed a typo: 'Break'.)

I had setup the transistors to act as a level switcher, from the 12V CMOS logic to the 60V MOSFET requirements.

I understand that a higher frequency will have a negative effect, but I am using a high enough voltage that it won't matter for my application.

I have some stepper motor drivers which use an audible switching frequency currently, the noise is one of a few reasons why I wanted to make my own. It gets very annoying after a while, especially with three motors on at the same time. (It's for a CNC machine, so it has three motors - One per axis. I will at some point require more axises - Upto three so the noise will get worse.)

The other type of motor control which I wanted to do was DC brushed servo motors. (I.e. A motor with an encoder on the back, not RC servos.) This is the other reason for the high voltage, the ratings of the servo motor require these voltages.
 
I just noticed that you are using a 50V supply for BC549 transistors that have a max allowed voltage of only 30V.
The transistors are feeding 49.3V to the gates of the Mosfets that have a max allowed voltage of 14V and are spec'd with a gate voltage of 10V.

The Mosfets are tiny and have a very low max allowed current.
 
Ah I'll have to find some proper transistors for it, I just picked the first on the list of my simulator.

This is the bit that I don't understand about MOSFETs, how to properly drive the gate.

I've always known it as this:
(Assuming The sources are at 60V and 0V.)
N channel: On, >10V; Off, 0V
P channel: On, <50V; Off, 60V
This is because, for the P channel at least, it is relative to the source voltage. (60V in this case.)

Where am I going wrong with this ? Can you show me the proper way of driving both a P channel and N channel mosfet which have a supply voltage of 60V, with a signal of 12V please ?

The MOSFETs are rated at 33A and -23A, I don't see how that is not enough for my application ?

Edit: Actually I'l wondering if I should use an all N channel H bridge design and a driver which does the charge pump and dead-time delay - It would mean a slower on-time though due to the low-current charge pump. Then again, N channel MOSFETs have a lower Rds(on) ....
 
Last edited:
Your Mosfets are spec'd with 10V from gate to source. Their max allowed voltage is 14V.
But your circuit puts almost 60V from gate to source.

I have seen high voltage complementary transistors and darlington transistors used ibn a high voltage H-bridge because the gate voltage is not a problem.
I have never seen complementary Mosfets like you have. they are used in 12V circuits.
 
I forgot that driving the P channel MOSFET's gate to 0V would put -60V across the gate and source - Just realised now.

Would that be correct for the P channel MOSFET ? Or is that the problem ?

I know that the N channel MOSFET is driven wrong now, just wondering about the P channel though so I know what I can and can't do in the future.

I will look into using 4 N channel MOSFETs.

Thanks for your help, you've made me see where I'm going wrong.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top