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.

The Marcbarker / Giftiger "Organic" H-Bridge Motor Driver

Status
Not open for further replies.

marcbarker

New Member
And here it is, something completely different.. A really simple low-voltage H-bridge, using 21st century AO TrenchFet Mosfets.

**broken link removed**

Directly driven by microcontroller, HC logic, 4000 series, or LVTTL.

Ideal for PWM because of high speed FET circuit.

Optimised for 2-cell NiMH motor supply (2.4 V) and 3.3 V control logic. Even lower typical voltage drop with 5V-powered CMOS logic.

Even with 3.3 V powered logic, there's typically less than 0.2V drop when driving 0.4A motor current, making this H-bridge ideal for servo applications. Although it can be lower as well as higher, if 0.2 V drop is too much, since the FETs are very cheap (£0.20 in UK) you can easily afford to buy spares and use the best ones for voltage-critical applications.

Omitted are 100K 'pull-down' resistors between the gates and grounds. These prevent the FET turning themselves on should the IC supplying the controlling signals is unpowered.


Truth table
PA0.PA1.PA2.PA3
L.....L....L.....L. ......... IDLE STATE
H.....L....L.....L .......... MOTOR1 A-B DIRECTION
L.....H....L.....L .......... MOTOR1 B-A DIRECTION
L.....L....H.....L .......... MOTOR2 A-B DIRECTION
H.....L....H.....L .......... MOTOR1+2 A-B DIRECTION
H.....H....L.....L .......... ILLEGAL (CURRENT LIMIT PROT. OPERATES)
L.....L.....H....H .......... DITTO


Also..... using these same FETs, two suitable current limit circuits - optimised of course for 2-cell NiMH (2.4 V) Ideal for using with the H-bridge to provide protection from bridge 'shoot-through' etc.

**broken link removed**
Here you can get a good idea of just how low gate drive voltage is typically, while the FET is current limiting at 0.9 A. Of course, this gate voltage may be lower (or higher) from FET to FET. Theoretically, it's about +/- 0.5V variation but typically it's less variation, and in any case the gate voltage is plenty low enough. As you might expect, some FETs will be better than typical.

The 0.1 ohm current sense can include any wiring, or a suitable length of wire can even be used as the resistor.

The current drain is a miserly 50 uA, making this ideal for for battery operation, without the need for an on/off switch.


**broken link removed**

Note that during current limit when there is a short circuit, the FET may be dissipating over 2 W. Without a heatsink this can be a problem if the power exceeds your derated package dissipation. One way around this is to alter the circuit slightly so that the FET latches itself off, after an overload lasting longer than a preset time, then this circuit will behave like a Polyfuse, but with lower dropout voltage for a given current.
View attachment pa0-3-fet.asc
o-h-bridgefet.gif

View attachment pa0-3-climH.asc
lowsidelimit.GIF

View attachment pa0-3-clim.asc
highsidelimit.GIF
 
Last edited:
I like it! Have you considered using PFET/NFET pairs in the hbridge, then you could just connect the gates and you only need 2 microcontroller pins to drive each motor? Your current protect circuit will allow that level simplicity as it will catch any shoot-through.

Then you could even minimalise it further by replacing the current protect circuit with an inductor as sutained illegal conditions won't occur, only the shoot-through for a couple uS. :)
 
I like it! Have you considered using PFET/NFET pairs in the hbridge, then you could just connect the gates and you only need 2 microcontroller pins to drive each motor? Your current protect circuit will allow that level simplicity as it will catch any shoot-through.

Then you could even minimalise it further by replacing the current protect circuit with an inductor as sutained illegal conditions won't occur, only the shoot-through for a couple uS. :)

I like this idea as well since currently you can only drive motor 1 in Forward AND Reverse mode, according to your truth table...
or if you just invert the values in the truth table do you get the complimenting action?

i.e. LLHL = Motor 2 A-B
would HHLH = Motor 2 B-A ? doesnt seem quite that simple looking at circuit and the rest of the truth table
 
Don't take the truth table too seriously, it doesn't show every one of the states.

I shown the truth table just to indicate that at 'idle state' all logic outputs are low, and to show that sending 'fwd' and 'rev' at same time is illegal.

You lift only one "PAx" to high to activate a motor. Or lift the other PA to active the reverse direction.
 
I like it! Have you considered using PFET/NFET pairs in the hbridge, then you could just connect the gates and you only need 2 microcontroller pins to drive each motor? Your current protect circuit will allow that level simplicity as it will catch any shoot-through.

Then you could even minimalise it further by replacing the current protect circuit with an inductor as sutained illegal conditions won't occur, only the shoot-through for a couple uS. :)

When I say 'shoot through' I mean during a software error, or that there may be an overlap in signals. I think it's very unlikely anyway, since if the motor direction is to be reversed, the software will drop the output first before lifting the other one. Only one output needs to be raised to drive the motor, not 2 outputs. So if the user is confident there will be no software errors, then the current limiter can be omitted.

You're welcome of course as always to suggest improvements!
 
marcbarker said:
The Marcbarker / Giftiger "Organic" H-Bridge Motor Driver

This has its own thread now? I see your version is slightly different to my version, but you've captured most of the essence of my idea. Did you happen to see what I'd done with hero's schematic to try to implement the same idea? Apparently the lack of a shared ground made it illogical or 'incomplete' was also suggested, but since all routes to a L go back to the shared GND on the microprocessor anyway, I didn't see what they were getting at.

By the way, for future reference, the appropriate shortened version of my name is 'giftig' :p it's german and 'giftiger' alone doesn't really make sense, as -er is the masculine ending for the adjective, and relates to the noun, 'wunsch'.
 
Last edited:
I can't take all the credit. Without your inspiration Giftig, this circuit would never have happened!
 
By the way, for future reference, the appropriate shortened version of my name is 'giftig' :p it's german and 'giftiger' alone doesn't really make sense, as -er is the masculine ending for the adjective, and relates to the noun, 'wunsch'.

"Giftiger" alone makes a lot of sense. Correctly translated into English it means "more poisonous". :)

-> poisonous -> more poisonous -> most poisonous =
-> giftig -> giftiger -> am giftigsten

Also, adjectives have no femimine or masculine endings in the German language. The ending just prepares for the following noun, e.g. "Wunsch" is masculine, therefor "giftiger Wunsch", poisonous gras e.g. would be "giftiges Gras", since gras is neutral (neither male nor female)

I'd name a circuit like that "giftig" anyway since it doesn't contain a control logic to prevent an illegal state (e.g. malfunctioning software or defective MCU). :D

The logic circuit could be used for hard braking action instead of free running braking.

Boncuk
 
Like I said, change the top NFETs to PFETs. Then you can connect the top/bottom gates together.

Now it needs only 2 PIC pins to drive it not 4 (a massive benefit) and it can't ever get a sustained top/bottom shoot through short (another massive benefit).

There may be possibility of uS length shoot-through caused by gate capacitance, but a supply line inductor will catch that ok.

As for other suggestions, I suggest adding a small resistor from the bottom of the hbridge to ground, so the PIC can measure current through the hbridge at any time no matter which direction it is driving the motor. So it can measure motor current, pwm current, etc etc.
 
"Giftiger" alone makes a lot of sense. Correctly translated into English it means "more poisonous". :)

-> poisonous -> more poisonous -> most poisonous =
-> giftig -> giftiger -> am giftigsten

Yeah yeah yeah, OK smartass :p what I meant was, it's out of context. I'm not a more poisonous wish, just a poisonous one.

Boncuk said:
Also, adjectives have no femimine or masculine endings in the German language. The ending just prepares for the following noun, e.g. "Wunsch" is masculine, therefor "giftiger Wunsch", poisonous gras e.g. would be "giftiges Gras", since gras is neutral (neither male nor female)

-er is the adjective ending given to adjectives preceding masculine nominative nouns when the indefinite article (or no article) is used. I'm fluent enough in german that i don't need every word picked apart to try to prove me wrong ;)
 
Last edited:
Yeah yeah yeah, OK smartass :p what I meant was, it's out of context. I'm not a more poisonous wish, just a poisonous one.

I hope you're not trying to teach the German language to a German. :p

And of course I overlooked the "smartass". :D (pretty rude? Isn't it?)
 
And of course I overlooked the "smartass". :D (pretty rude? Isn't it?)

Sorry if you feel that way, I thought the :p counteracted the smartass. I'm not trying to teach german to a german, i'm defending my own understanding of german. I lack some vocabulary, but otherwise I consider myself pretty fluent in the language.
 
I like it! Have you considered using PFET/NFET pairs in the hbridge, then you could just connect the gates and you only need 2 microcontroller pins to drive each motor? Your current protect circuit will allow that level simplicity as it will catch any shoot-through.

Then you could even minimalise it further by replacing the current protect circuit with an inductor as sutained illegal conditions won't occur, only the shoot-through for a couple uS. :)

I just noticed, I didn't answer these questions.

PFET/NFET pairs. Yes that's a good point. Instead of the present scheme using 4 NFETs for H-bridge with diagonally-crossed gates.

I believe your suggestion is NFET lowside and PFET highside, with the two gates joined together, and having the same on the other side of the H-bridge. That way each N/P fet circuit virtually becomes a high power "74HC04 or CD4069 Inverting Buffer"! Cool!

The truth table will be slightly different, because there wouldn't be a HH = illegal state any more, so no need for current limit protection.

And the other suggestion, insert a current sense resistor in the low side. It'll need a little bit of amplification though.....
 
Last edited:
If you're going with NFET lowside and PFET highside, with the two gates joined together, and having the same on the other side of the H-bridge, then you might consider using an AO6604 for each side. The typical on-resistance is higher, but still reasonable for low-current motors.

The transistor characteristics should do a good job limiting the shoot-through current. I think if you plot the shoot-through current, you might see the current is typically limited to less than 3A with a 2.4V battery. This 'limit' is 6A if your battery is 3.0V. (This 'protection' goes away completely if your transistors are better than typical or your battery is greater than 3.00V.)

What you lose when HH is no longer an illegal state is that there is no longer a freewheeling state. Both HH and LL apply braking to the motor.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top