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

Status
Not open for further replies.
I just realized that I have to use some sort of a flip flop as two inputs will basically be one for pules and the other for direction. I think that will make things easier.

Hi Kal,

It would probably be best at this stage to do a bit of system engineering, as opposed to detailed design, just so I can get a clear idea of your objectives. Could you let me know, at a high level, what you would like the system to do, and what the application is?.

Just a few details which need to be specified/resolved:

(1) What type of motor will be used. What voltage and maximum current?
(2) In your last schematic you show, NTE2395 as a NMOSFET which is correct, but you show IFRZ44N as a PMOSFET, but it is also an NMOSFET in fact. In view of this, could you let me know what MOSFETs you are planning on using?
(3) Could you let me know what the output of the microcontroller is; presumably the micro will drive the two optocouplers.

Cheers

spec
 
You're right I measured without the capacitor :banghead: will measure again in the morning.
Sure I'm game to use IC for more fun and learning.:happy:
 
Last edited:
Hi Kal,

It would probably be best at this stage to do a bit of system engineering, as opposed to detailed design, just so I can get a clear idea of your objectives. Could you let me know, at a high level, what you would like the system to do, and what the application is?.

Just a few details which need to be specified/resolved:

(1) What type of motor will be used. What voltage and maximum current?
(2) In your last schematic you show, NTE2395 as a NMOSFET which is correct, but you show IFRZ44N as a PMOSFET, but it is also an NMOSFET in fact. In view of this, could you let me know what MOSFETs you are planning on using?
(3) Could you let me know what the output of the microcontroller is; presumably the micro will drive the two optocouplers.

Cheers

spec

You're right again.

This is all an exercise in motion control via a PLC. I will be controlling a motor (I will add another motor later) that for now will turn and provide feed back via encoders.. I will control the speed and direction and that's about it, itwill not do anything special nor will it be connected to any load at this time. But I would like the board/drive to be as reliable as possible.

1-Motor is 24VDC- 3Amps
2-The P-Channel MOSFET Iwill be using is IRF9540N
3-The outputs are 24Vdc one for direction so it will be either 0 or 24Vdc and the other will be pulses of a frequency that I have yet to determine.


Cheers
Kal
 
You're right again.

This is all an exercise in motion control via a PLC. I will be controlling a motor (I will add another motor later) that for now will turn and provide feed back via encoders.. I will control the speed and direction and that's about it, itwill not do anything special nor will it be connected to any load at this time. But I would like the board/drive to be as reliable as possible.

1-Motor is 24VDC- 3Amps
2-The P-Channel MOSFET Iwill be using is IRF9540N
3-The outputs are 24Vdc one for direction so it will be either 0 or 24Vdc and the other will be pulses of a frequency that I have yet to determine.


Cheers
Kal

Thank Kal,

That helps a lot- interesting project. I'm sure we would all like to know how it goes.

By the way, I thought you were going to bed- an electronics engineer needs proper sleep to stay on form :happy:

Cheers

spec
 
Hy kal,

Here is a circuit using two industry standard and cheap optocouplers to isolate the benign environment of an assumed stabilised 5V logic control environment from the blood-and-thunder of the motor drive circuit. This type of arrangement is commonly used in industrial control.

(1) If CLOCK input is made 5V the motor will turn clockwise
(2) If ANTICLOCK input is made 5V the motor will turn anticlockwise.
(3) If both inputs are either open circuit or taken down to 0V the motor will be off.
(4) If CLOCK and ANTICLOCK inputs are both 5V none of the four MOSFETs will be turned on, so this potentially destructive state is legislated for. This is realised by the four transistors driving the two optocouplers.
(5) The 5V logic circuits are notional for illustration. Once the actual parameters of your logic control system interface are defined adjustments may need to be made here and there but the general topology of the logic interface will still stand.
(6) The circuit may look daunting, but that is only because of its size, not its complexity. Just analyse it in small chunks and you will find that most chunks are just repetitions, effectively four times because of the four legs of the H bridge.
(7) Because the motor only needs a maximum of 3A, the four MOSFETs only have 24V/2= 12V applied between their gate and drain to turn them on. This is more than sufficient to provide the 3A required by the 24V motor.
(8) Also remember this is an off-the-boards (drawing board) design and has not been built and tested so errors are highly likely, even gross errors. This is quite normal for a design at this stage- especially with me. :happy:


ETO_2016_02_08_Iss01-00_KAL_OPTO_H_BRIDGE.png

ERRATA
(1) C8 & C9 lower should connect to 0V (5V) SUPPLY RAIL
(2) Both optocoupler receiving transistor collectors and emitters are not joined by circuit traces.
(3) The base connection of the two optocoupler receiving transistors are open circuit. This may need to be changed. I have not checked yet. They may need to be decoupled with a couple of 100nF capacitors to deck.
(4) Q28 & Q29 should be BC556 not BC557.

DATA SHEETS
(1) NTE2395 NMOSFET
http://www.nteinc.com/specs/2300to2399/pdf/nte2395.pdf
(2) IRF9540N PMOSFET
http://www.irf.com/product-info/datasheets/data/irf9540ns.pdf
(3) 4N25 Optocoupler
http://www.vishay.com/docs/83725/4n25.pdf
(4) BC546 NBJT
http://www.fairchildsemi.com/datasheets/BC/BC547.pdf
(5) BC556 PBJT
http://www.fairchildsemi.com/datasheets/BC/BC557.pdf
 
Last edited:
You know something spec, as much as I would like the circuit to work I'm excited to learn from it. I've already bee shopping and will be playing with the optos first and to get a handle on how they work and then after the smoke subsides there will be lots of questions :woot:
 
You know something spec, as much as I would like the circuit to work I'm excited to learn from it. I've already bee shopping and will be playing with the optos first and to get a handle on how they work and then after the smoke subsides there will be lots of questions :woot:
That is the best way- divide and conquer.

You have already been using an optocoupler: the opto sensor, with the slot in it, is exactly the same. With the 4N25 if you put 10mA thru the transmitting LED, so long as you have at least 10V between the opto receiving transistor (ORT) collector and emitter, at least 20% of that value will flow between the collector and emitter of the ORT, ie 200uA. That's all there is to it.
 
Last edited:
Hi spec,

I put together on a bread board the opto section of the schematic and used LEDs on the Opto's output emitter along with the 5k6 resistor to test it out and it passed with flying colors. they worked just as they are illustrated on the schematic.

I have questions as usual, mostly relating to fundamental electronics and specifically how components and their values are selected.

1-Mosfets: The absolute maximums of gate voltage is just that, maximums but the designed voltage should be determined by Rds On voltage? So for my N-Channel NTE2395 of +-20V maximum has an Rds-On of .028 Ohms @ Vgs of 10V+ and Id of 31Amps (is that amperage correct?). So how did we determine that 12V is best for this circuit? Does the MOSFET conduct current between drain and source at different voltage levels and if yes then why 12 and not 15?
There's a "Note 5" beside the Rds-On rating that states : "Pulse width <= 300<=s; duty cycle 2%." . I intend to supply pulse in the range 20-60 Khz with 50% duty cycle. What's that going to do to the MOSFET?

2-Resistors: I understand the resistors in the schematic to be of two functions, voltage dividers and current limiters. There are different resistors at the bases of same transistor type with the same specification. Why would one have a 10K and the other

The BC546 has an absolute maximum of 100mA and Hfe of 110-800. I think you used and number of 300 for a typcal Hfe of a resistor before so I will reuse that here.
Q33 and Q31 will be turned on at the same time with 24V+ signal and they have a 10K and 5K6 resistors respectively. The moment both transistors are turned on the resistors will have a current path to ground through Base-Emitter which will form a parallel circuit for the resistors with effective resistance being 3590Ohms @ 24V+ there will be a 6.6mA the base. 6.6x300= 2Amps. BUT the 270Ohm resistor will limit that collector current to a reasonable 18mA.
How much current will be flowing through the Base-Emitter of the same transistor, the same 6.6mA, 2A or 18mA?



Is any of that correct or am I just hallucinating :eek:


Cheers
Kal
 
Hi spec, I put together on a bread board the opto section of the schematic and used LEDs on the Opto's output emitter along with the 5k6 resistor to test it out and it passed with flying colors. they worked just as they are illustrated on the schematic.

Good news kal.

1-Mosfets: The absolute maximums of gate voltage is just that, maximums but the designed voltage should be determined by Rds On voltage? So for my N-Channel NTE2395 of +-20V maximum has an Rds-On of .028 Ohms @ Vgs of 10V+ and Id of 31Amps (is that amperage correct?). So how did we determine that 12V is best for this circuit?

Yes, the absolutes VGS of +- 20V is, as you say, the maximum voltage that can be applied without the danger of damaging the NMOSFET. Incidentally, if you did exceed this voltage you would probably break down (punch through) the extremely thin silicon oxide insulating layer between the gate and the D/S channel.

Indeed, the RDS-on is important, especially at high currents- the lower the RDS-on the better. The RDS-on of the NTE2395 would typically be twice the value at 25 deg C because the MOSFET will normally be heated by the power dissipation resulting from, IDSS * VDS, so that will give you a working RDS of around 56m Ohms. Suppose you wanted to conduct 36A, that would give a voltage drop of 2V. This would give a dissipation of 2V*36A = 72W. From this you can see that at this high current a low RDS-on is critical to the application.

On the other hand, take the case of your application. The maximum motor current is 3A. 3A*56m Ohms= 168m V. The NMOSFET power dissipation would be 168mV * 3A= 505m W.
So a low RDS-on is no longer that critical.

To get an RDs-on of 28m Ohms, as you say, requires a VGS of 10V or more. So, in theory, a VGS of 10V to the limit of 20V would do the job.

I just chose 12V, because it was a bit more than 10V and it meant that the resistors in the circuit would be the same value, ie 2K2. Also as the two 2K2 resistors divide the 24V of the supply rail in half, there is no danger of exceeding the max VGS of the MOSFET, so protection Zeners are not required.

In summary, a high power MOSFET, like the NTE2395, means that there are few critical design constraints for a relatively low current application like you motor drive H bridge. In fact the MOSFETs will think they are on holiday!

The data sheet for the NTE 2395 is not comprehensive, that is why you are having trouble deciphering what is going on. Also NTE products would not be a first choice, like Fairchild, International Rectifier, and Vishay, for example.

Does the MOSFET conduct current between drain and source at different voltage levels?

Because of the deficiencies of the NTE2395 data sheet, it would be better to refer to a proper MOSFET data sheet to answer this question, so take a look at the International Rectifier IRF540N. NMOSFET: http://www.irf.com/product-info/datasheets/data/irf540n.pdf

Yes, just like a valve (tube), JFET, and BJT, a MOSFET conducts current proportional to an input control signal. With a MOSFET the control signal is a voltage between its gate and source (VGS), and the controlled current (IDS) flows from the drain to source The gate is insulated from the rest of the MOSFET so, for practical purposes, this means that no gate current flows. From this it follows that the power gain from the gate to the drain is infinite- a valve is the same, but as a BJT requires base current to make collector current flow, the power gain is not infinite, even at DC (note that as the input signal frequency increases parasitic capacitors, especially, have an effect which lowers the input resistance, which would now be called input impedance, of all devices. Once again this is a big subject, which you need not worry about at the moment).

If you look at the graph of Fig 1 on the IRF540N data sheet you can see ID plotted against VGS against drain source (VDS) with a junction temperature (TJ) of 25 deg C (junction is a misnomer here because there is no junction in A MOSFET, but the term is a convention)

Take the plot with a VGS of 4.5V. Although not shown on the graph with DS=0V there will be essentially no ID. As VDS is increased so will ID in proportion, so at this stage the D/S is acting like a resistor. But when VDS reaches around 1V, and IDS has reached 10A, IDS no longer increases but stays essentially constant right up to 50V, as shown on the graph. This second phase is called the drain current saturation region and is where the MOSFET would normally be operated as a linear amplifier.

You will notice that there is a whole family of plots with VGS ranging from 4.5V to 15V.

There's a "Note 5" beside the Rds-On rating that states : "Pulse width <= 300<=s; duty cycle 2%.".

If the manufacturer did high current/high voltage measurements at DC the device, a MOSFET in this case, would be destroyed by over dissipation. So instead they only apply the high current/voltage tests for a short period and the leave plenty of time for the device to cool down before applying the test again. In this case the on to off ratio is 1:50. This has nothing whatsoever to do with the switching characteristics of the device.

I intend to supply pulse in the range 20-60 Khz with 50% duty cycle. What's that going to do to the MOSFET?

That should be fine but why as high as 60Khz? I may have to add some speed up components here and there and adjust some values to optimize speed, but probably not.

2-Resistors: I understand the resistors in the schematic to be of two functions, voltage dividers and current limiters.

That is correct.

There are different resistors at the bases of same transistor type with the same specification. Why would one have a 10K and the other [2K2]

All the transistors in this circuit are either off (no collector current) or voltage saturated. Voltage saturated is where the collector current causes the whole supply voltage to be dropped across the collector load resistor, so that the VCE is essentially 0V.

To get this saturating collector current to flow you need to determine what current is necessary to saturate the collector by Vsupply/Rcollector. Having found the saturating collector current you then need to find out how much base current you will have to inject into the base to generate the collector current by Ib=ICsat/hFE. You normally push more base current than the bare minimum typically twice upwards. Data sheets, especially when specifying VCEsat, often say that IB should be VI sat/10. For most transistors Ib= IVsat/20 is a good figure. For a high hFE transistor, like a BC546 IVsat/100, would probably be good. One problem of having too much excess base current is that the transistor switching speed is slowed. In fact saturating a transistor slows it in general., but that will not be a problem for the sort of switching speeds you are considering.

The BC546 has an absolute maximum of 100mA and Hfe of 110-800. I think you used and number of 300 for a typical Hfe

Yes: for non critical applications, I would tend to assume an hFE of 300 on an initial design, but that high figure is only when a BC546/BC556 is in the linear region and not saturated.

Q33 and Q31 will be turned on at the same time with 24V+ signal and they have a 10K and 5K6 resistors respectively. The moment both transistors are turned on the resistors will have a current path to ground through Base-Emitter which will form a parallel circuit for the resistors with effective resistance being 3590Ohms @ 24V+ there will be a 6.6mA the base. 6.6x300= 2Amps. BUT the 270Ohm resistor will limit that collector current to a reasonable 18mA. How much current will be flowing through the Base-Emitter of the same transistor, the same 6.6mA, 2A or 18mA?

I think you mean: 'Q32 and Q31 will be turned on at the same time when ANTICLOCK goes to 5V. Q32 has a 5K6 resistor in series with its base, while Q31 has a 10K resistor in series with its base. Why are the base resistors different?'

Q32 collector is required to pass 10mA through the optocoupler LED. At this current Q32 collector, will be saturated by design. Assume that the hFE of Q32 when saturated is 100, them Q32 base current must be at least 10mA/100= 100uA. When ANTICLOCK is at 5V the base of Q32 will be 600mV as a result of Q32 base current. Thus, the base resistor (5K6) will have 5V- 600mV= 4.4 volts across it. This means that Q32 base current will be 4.4V/5K6 Ohms= 786uA. This is more than enough to ensure that Q32 IC supplies the 10mA required by the optocoupler LED.

By the same token, if CLOCK is also at 5V, 786uA would be flowing itno Q30 base thru R37. But in this situation, Q31 needs to divert the 786uA down to ground to protect the MOSFETs from all turning on at the same time. The hFE of Q31 is again 100 so Q31 needs a minimum base current of 786uA/100= 7.86 uA. But Q31 base resistor is 10K, so Q31 base current would be 4.4V/10K= 440uA. So Q31 will be highly saturated. This illustrates why the same transistor can have different base resistors. Q31 base resistor could have been as high as 4.4V/7.86u A=560K Ohms and still perform its task of diverting Q30 base current.

You may ask, as Q31 only requires 7.86 uA why hit it with 440uA. The reason is that it is unwise to have to higher resistance values or switching speed will be reduced and the circuit will be more susceptible to pick up and interference. Don't concern yourself with this aspect at the moment; it is a big subject, but not that difficult to fathom.

Is any of that correct or am I just hallucinating :eek:

Not at all- you ask some searching questions, which indicate that you are on the right lines and are keen to get an understanding of the detailed working of a circuit. If you carry on with this approach it will not be long before the operation of circuits like this will be second nature to you. Then you can advise others on ETO who ask questions about their circuits.:)
 
Last edited:
Hello sec and fellow forum members ( I don't know where the rest are hiding),

How does **broken link removed**circuit look. It's a modification on the opto section of your last circuit though not complete just the basic opto/interlock section for now. I may end up making two different versions, one exactly like you designed it with one input for clockwise rotation and one for counter clock rotation, and another board for two inputs one for direction and one for pulse and using 24 V power supply for the optos. The one I posted here is the latter.

I also wired the MOSFET part and as usual used LEDs for now to test it out and wasn't quite sure why the addition of the transistors on your second schematic why connect the opto section to the first schematic or is there an advantage to second?


Thanks
Kal


Edit: I just realized the opto current is two high and will change the 1K resistor with 2.2K
 
Last edited:
**broken link removed**
Hi kal,

Neat circuit. Just a few observations though:
(1) Typo: CLOCK and ACLOCK outputs are connected to U1b and U2b respectively. CLOCK and ACLOCK should be connected to U1e and U2e respectively
(2) Typo: R2 should be 2K2 not 1K as you say.
(3) The circuit will work OK, but R10 and R11 could be increased to 10K.
(4) U1 and U2 emitters, with correction of (1) above, now connect to 0V via 5K6 resistors. This means that CLOCK and ACLOCK output voltage levels are indeterminate:
(4.1) With a worst case current transfer ratio 4N25, the emitter current could be as low as 200uA, so CLOCK and ACLOCK could be as low as 200uA * 5K6 Ohms = 1.12V
(4'2) From the data sheet, a fantastically good 4N25, would have a potential emitter current of infinity (nonsense of course). The emitter current would be limited to 24V/5K6 Ohms= 4.29mA and the VCE of the ORT will be 0V. In this case CLOCK and ACLOCK outputs will be 24V. Also, the ORT will be operating outside the conditions specified by the data sheet.
 
I also wired the MOSFET part and as usual used LEDs for now to test it out and wasn't quite sure why the addition of the transistors on your second schematic why [not] connect the opto section to the first schematic or is there an advantage to second?

The additional two transistors of the second circuit allows the optocoupler to work within its data sheet specified condition and also provide enough voltage (12V) to drive the two lower NMOSFETs adequately in the H bridge. It is a good question though and it may be possible to design a satisfactory circuit without the two additional transistors.

But as a general rule, it is always best to design a circuit to be as non critical as possible and also to be as modular as possible. Isolation is also worth considering; it is always best to isolate any special/expensive/delicate components from any blood and thunder. Of course, it all boils down to a cost and complexity trade off. If this was the 1960s and transistors very expensive, it would be a different matter.

Modular means that one function is independent of another. As an example, on older cars (autos), you could replace the dashboard lights by just pulling the instrument bezel off and replacing the £0.30 UK bulb in about 5 minutes. On modern cars you often have to have the whole dash out just to change a single bulb. The first design is modular and the second is crazy and is not modular. The annoying thing is that, in most cases, a non modular design is not necessary. It is known as an unforced error. Also know as stupidity or incompetence- don't get me started, but non modular designs waste millions every year. :arghh:
 
Last edited:
**broken link removed**
Hi kal,

(4) U1 and U2 emitters, with correction of (1) above, now connect to 0V via 5K6 resistors. This means that CLOCK and ACLOCK output voltage levels are indeterminate:
(4.1) With a worst case current transfer ratio 4N25, the emitter current could be as low as 200uA, so CLOCK and ACLOCK could be as low as 200uA * 5K6 Ohms = 1.12V
(4'2) From the data sheet, a fantastically good 4N25, would have a potential emitter current of infinity (nonsense of course). The emitter current would be limited to 24V/5K6 Ohms= 4.29mA and the VCE of the ORT will be 0V. In this case CLOCK and ACLOCK outputs will be 24V. Also, the ORT will be operating outside the conditions specified by the data sheet.


HI spec,

Thanks for your great feedback. The circuit is not complete as I was only playing with the PLC input to change one input to be directional but I will be using the rest of your circuit as you designed it so I didn't add it in my schematic. Just being lazy. Basically the output half the optos is going to be exactly as in your schematic so the the labels Clock and Anti-clock will connect to R23 and R24 on your schematic.
 
HI spec,

Thanks for your great feedback. The circuit is not complete as I was only playing with the PLC input to change one input to be directional but I will be using the rest of your circuit as you designed it so I didn't add it in my schematic. Just being lazy. Basically the output half the optos is going to be exactly as in your schematic so the the labels Clock and Anti-clock will connect to R23 and R24 on your schematic.

Hy kal,
Your questions are very good for me because they keep me on my toes and make me think what I am doing. I hope the circuit works OK. Just one question: as you are are controlling the motor with a micro, you will have complete logical control, so why not stay with the two fundamental signals of CLOCK and ACLOCK. That would be my choice.

Cheers

spec
 
Some software provides an already built in "motion control device" that includes a direction output in addition to the pulse output and I pass parameters to that device to control the output. Another motion control device will put out only a pulse and I have to write my own code to control the output direction. I would like to work with both types to take advantage of the built in code.

Cheers
Kal
 
Some software provides an already built in "motion control device" that includes a direction output in addition to the pulse output and I pass parameters to that device to control the output. Another motion control device will put out only a pulse and I have to write my own code to control the output direction. I would like to work with both types to take advantage of the built in code.

Cheers
Kal

Ah yes, that makes a lot of sense.

Good work

spec
 
I just finished testing the whole thing and it works well but unfortunately I still don't have a power supply yet.

I am a bit confused still about the use of resistors in a circuit and their effect on one another. This time I'm not quite certain of how resistors R24 (470 Ohm) and R35 (5K6 Ohm) are working together. The moment the opto output is on and Q27 is high and therefore has a base -emitter path, don't they form a parallel circuit? Or to put it another way, how much current is being applied to the base of Q27?
 
Hi kal,

Here is a version using a 74AS00 quad two input nand gate (you can use a 7400 chip but the input current is higher and may be more difficult to drive with your micro)

ETO_2016_02_13_Iss01-00_KAL_OPTO_H_BRIDGE_LOGIC.png
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top