AUV Project - H Bridge Conundrum

Discussion in 'The Projects Forum' started by BrIDo, Mar 15, 2011.

  1. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Hi there.

    I'm a mechanical engineering student tackling a group project at the minute. It's the design and build of an underwater vehicle. I volunteered to do the electronics (expand the mind and all that) and am in need of some advice.

    Basically, the craft will have 6 motors. They'll be controlled using an arduino microcontroller, which as I understand it puts out 5v logic. The motors will be drawing up to 6.5 amps, and each motor must be bidirectional and be capable of running independently, which means 6 motor controllers. I've struggled to find a commercial driver I could buy 6 of, and still stay reasonably within our budget. So, I've opted to build my own.

    I breadboarded one yesterday and got it working, but this was using 4.5v from three 1.5v batteries to drive a small test motor and to configure the logic of the bridge. I then tested the bridge using a 12v lead acid battery for the bridge, connected one of the 'big' motors, and again used the three 1.5v batteries to configure the logic of the bridge, and... it shorted the right hand side of the bridge, and my high and low side mosfets melted, on that one side. :p

    I've had a bit of advice elsewhere that, if I understand it properly, suggests that the 4.5v wasn't sufficient to 'open' the p types, so they were always closed, the n types came online, and shoot through occurred, thus frying the mosfets. This, I can live with.

    The advice I'm looking for is regarding the schematic I've attached. I basically have three key questions:

    Will using the mosfet driver, in all likelihood, be able to activate the gates of both the P and N types sufficiently?

    Are the diodes I've opted for, with a forward current rating of 7.5A, necessary, and if possible, could I use smaller rated diodes?

    I've sometimes seen capacitors used in the power rail in H bridges to provide extra capacitance, and 1k pulldown resistors in the base leg of the mosfets to set a default state for the bridge. Are these required given I'm using a mosfet driver?

    I should probably also state we're not looking to utilize PWM control, and the motors are unlikely to be switching on and off very fast...

    Cheers folks...

    Attached Files:

  2. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    I've attached the datasheets for the components to save looking them up... :)

    Attached Files:

  3. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    No. The MOSFET gates are driven by +12V because the Vdd of the driver IC is hooked up to +12V.

    The way in your design that both P type and N Type MOSFET in one leg are driven by a common drive signal would mean they can both be conducting when the drive signal change state, albeit very briefly. This will probably destroy the MOSFETs as now there is a direct short circuit between +12V and 0V and hugh current will flow. I don't understanding why you said you can live with that?

    You would probably need *two* driver ICs to drive all the 4 MOSFET individually so that no two MOSFETs from the same leg can be turned ON at the same time.

    The TC4428A might be a better choice as it contains one normal and one inverted output.
    Last edited: Mar 16, 2011
  4. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Thanks for the detailed reply.

    When I said I could live with it, I meant, if that's all it was, it seems fixable. I was worried there was maybe a more fundemental problem which would take longer to fix.

    I should probably clarify that when I tested (and melted) my bridge, I wasn't using any mosfet driver, only 3 x 1.5v batteries. I've attached a JPEG to show what I did and what I think is a possible solution.

    By using a TC4426A I think the mosfets will open and close as expected but...

    What you're saying is - if I understand correctly - is that as one P type opens and one N type closes, due to switching times, they are both in the active region for a period of time and at risk of shoot through. I've read about this problem, but I've also read that, as I'm not utilizing PWM, I should get away with it. No?

    Attached Files:

  5. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    I see.

    You did it wrongly in the second test as 4.5V is insufficient to turn OFF the P MOSFET(requires over 10V w.r.t 0V, when its Source is at +12V) but it might certainly turn ON the N MOSFET. That's why both of your MOSFETs were toasted.

    The proposed modified circuit will not work either. It is even worse than the original one. With 4.5V as your control voltage, you cannot even turn ON fully a NPN or N-ch MOSFET if its collector/drain is already at +12V. The emitter or Source, which is also the gates of the H-bridge MOSFETs you want to drive, get only a few volts w.r.t. 0V.
  6. John P

    John P Senior Member

    Joined:
    Oct 14, 2008
    Messages:
    1,325
    Location:
    Massachusetts
    I suggest doing a web search on H-bridge and see what you come up with. These things are tricky, and you're reinventing a wheel that has made many revolutions over the years.
  7. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Thanks for the help.

    Assuming you're referring to the most recent diagram I posted, I was told that would be a potential fix for the circuit. I don't understand then. If I had a mosfet on it's own with 12v at drain, you're saying I wouldn't be able to turn it on using 5v logic? If not, what is the point in mosfets?

    However, that aside... the circuit I actually WANT to use is not the one in the recent diagram, but in the schematic of the original post, which uses the TC4426A mosfet driver, labelled 'H bridge schematic.pdf.'

    Do you think that circuit would work, with the risk of shoot through due to overlapping active times?
  8. eblc1388

    eblc1388 Senior Member

    Joined:
    Nov 28, 2008
    Messages:
    1,542
    Location:
    UK
    Will it work?

    As they always said, "the proof is left for the reader as an exercise." :D
  9. shortbus

    shortbus Senior Member

    Joined:
    Sep 30, 2009
    Messages:
    2,850
    Location:
    ohio,usa
    Why use a dual mosfet driver, instead of a 'half-bridge' mosfet driver? The half-bridge driver is made for making up a H-bridge, it uses two N-mosfets and has the shoot-through delay built in.
    The driver you picked (TC4426A) is not really a H-bridge driver. It uses a P and a N mosfet that if not using a 'complimentary' pair type of mosfet can have two differing switching times.

    A half-bridge driver allows you to use two N mosfets of the same type which have the same characteristics and the switching times match. The N mosfet is usually cheaper with better specs. Here is a well documented half-bridge driver data sheet; http://www.irf.com/product-info/datasheets/data/ir2110.pdf
    While it's rated at up to 600V it works just as well at 12V. And the it uses logic level commands down to 3.3V

    Here is a link to other half-bridge drivers too; https://ec.irf.com/v6/en/US/adirect/ir?cmd=eneNavigation&N=0 4294837793 4294837535
  10. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Hmm.

    I still think that mosfet driver will work.

    What about the diodes?

    Do I need diodes that highly rated? Would smaller ones be ok?
  11. shortbus

    shortbus Senior Member

    Joined:
    Sep 30, 2009
    Messages:
    2,850
    Location:
    ohio,usa
    You mean the diodes for the charge part of the driver circuit? I am not sure but probably a diode rared for twice the voltage and amps you are using is sufficient.
    But diodes are pretty close in size physically so it shouldn't matter if you go larger in spec than needed.

    Here is an application notes on using the driver;
    http://www.irf.com/technical-info/appnotes/an-978.pdf

    http://www.irf.com/technical-info/appnotes/an-944.pdf

    http://www.irf.com/technical-info/designtp/dt04-4.pdf

    http://www.irf.com/technical-info/designtp/dt98-2.pdf

    Hope this helps.
  12. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Thanks for that chaps.

    Unfortunately....

    Like I said, I tested using a breadboard and my circuit worked using 4.5v for both logic and powering the motors. When I made the move to 4.5 logic and 12v motor supply, my breadboard shorted and right side mosfets melted.

    I put this down to floating gate voltages on the mosfets, causing shoot through.

    However, when I made up my PCB's, I had a TC4427A mosfet driver in place (with two 2k2 resistors in logic input lines lines) and so i assumed this would set my bridge in a 'default' position.

    I connected my motor supply to my bridge, and, pop, one of the tracks burnt out - so it shorted. I'm using a 4.7Ah 12v lead acid battery.

    Is it possible one of the mosfets / diodes was damaged during soldering or is there something inherently wrong with the design of the bridge?

    Should I add capacitors between the power line and ground to support rapid charging / discharging?

    Answers on a postcard please, I'm running out of time... and fast!

    Many thanks.
  13. mjhilger

    mjhilger Member

    Joined:
    Feb 28, 2011
    Messages:
    119
    Location:
    Oklahoma City, OK
    Since you state that you are not going to PWM the motor. It appears to me that you just need to control Forward or Reverse by alternating the polarity. If that is all you need; just use a relay to reverse the voltages and either another one for supplying power or a MOSFET for power. Either way if that is all you need; don't make it too complicated.
  14. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,096
    Location:
    In the vast midwest of the USA; CST
    I'm afraid that you don't have enough time to fix your circuit. Without PWM on the high side, an IR2110 won't work very well either, as the boost cap will discharge after a period of ON-time (usually less than a second). You simply don't understand how MOSFETs and gate drivers need to work in an H-bridge, and there may not be enough time for you to learn it. I'm sorry, but I don't have enough time to teach it to you.

    Here is a simple H-bridge made out of a pair of SPDT relays, using logic-level input to transistors to sink current from the relay coils:

    [​IMG]

    You don't have to be using 5v relays and motor, you could use 12v relays and motor. The InA and InB controls can still be logic level (0v-5v).

    If InA and InB are low, the motor is off (braking).
    If InA is high and InB low, the motor runs in the forward direction.
    If InA is low and InB high, the motor runs in the reverse direction.
    If both InA and InB are high, the motor is off (braking).
    There are no combinations of inputs that can cause problems.
    You can use automotive SPDT relays if you have enough space.
    the12volt.com has some diagrams of automotive relays:
    http://www.the12volt.com/relays/relays.asp

    Attached Files:

    Last edited: Mar 24, 2011
  15. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    You fellows are right.

    Now that it's not working I understand the mountain of a task (for a beginner) that I set out to do. Part of the problem was alot of the robot hobbyist books (Robot Bananza, Intermediate Robot Building) and loads of sites online make it seem as simple as 'follow steps 1, 2, and 3'.

    I agree that relays are the best way to go; you've been very helpful.

    I'm going to buy those components and replicate it exactly, although use 12v relays as suggested.

    Edit:

    I can't find suitable relays on RS. I was thinking about doing it this way instead, it uses the same transistors and diodes as the circuit you showed me, I just want to ok it before I go ahead. I'd be buying a 12v 8A DPDT relay, and using the 2N2222 transister with the 4N4004 diodes.

    That look okay?

    Attached Files:

    Last edited: Mar 24, 2011
  16. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,096
    Location:
    In the vast midwest of the USA; CST
    I hope that you don't feel discouraged/defeated; H-bridges are kind of tough for "newbies" to understand. Don't feel alone, there are lots of folks that have a hard time with them.

    I hope you don't feel like I'm "talking down" to you. I provided the relay H-bridge schematic as it is relatively easy to understand, quite robust (depending on the relays you select) and if assembled properly, not very likely to fail. You should be able to get most or all of the parts you need at Radio Shack; kind of expensive but convenient.

    Radio Shack stocks some small board-mount SPDT relays with 12v coils, contacts rated 125v @ 10A that would work well for your project:
    http://www.radioshack.com/product/index.jsp?productId=2062482&filterName=Type&filterValue=SPDT
    They also carry the transistors, resistors and diodes you'll need, and small pre-drilled PCBs that you can use for assembling the circuit. You will also need some bus wire (pre-tinned bare wire) to connect the components together.

    Radio Shack carries MPS2222A transistors (kind of expensive in a 2-pack) and a 15-piece assortment of NPN transistors in a TO-92 package. The assortment is a better deal.
    You usually get:
    5 - 2N2222 transistors, good for up to 500mA collector current
    5 - 2N4401 transistors, good for up to ~300mA collector current
    5 - 2N3904 transistors, good for up to ~100mA collector current.
    Any of these will work for the relays mentioned, which only require about 30mA current.

    In the schematic, I've shown the resistors on the bases of the transistors as 470 Ohms. This will work fine, even though the current is a bit overkill. You could go as high as 1.4k Ohms for these base resistors, and it should still work. 1k would also be fine.
  17. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Thanks again, that was very informative. I think i'll press ahead with your idea!
  18. BrIDo

    BrIDo Thread Starter New Member

    Joined:
    Mar 15, 2011
    Messages:
    13
    Hello chaps,

    I've got my motor driver boards up and running. Many thanks to SGTWookie in particular. Three boards, 6 motor drivers are all working.

    I was wondering if someone could be kind enough to check my overall wiring diagram to make sure it's correct as I've run into a problem. Alllow me to explain:

    Each PCB board:-
    -has two motor drivers.
    -has a 12v supply.

    Each motor driver has:
    -2 signalling wires to arduino.
    -2 wires to DC motor (not shown in schematic)

    So essentially there are 3 batteries powering 6 drivers. Each battery powers two motor drivers, in parallel. I've tried to illustrate the circuit with a quick sketch (attached below). I've also attached the schematic of the H bridge. I stress again, the boards work and have been tested individually.

    I set up the circuit attached, but DID NOT power the arduino with the 12V battery, instead, it was powered from a USB cable using a laptop. Aftering up loading several programs, i uploaded a program to test each of the motors (firing one at a time). This worked fine.

    I then took out the usb cable from the laptop, and plugged in the 12v battery to the arduino. That is the circuit in the picture I have attached (imag0147). This resulted in a motor firing at random. I think it has something to do with the common grounds on each boards? Is this affecting the transistors in the h-bridge circuit?

    We unplugged the battery and used the USB cable again. The program runs as before - but we cannot upload new sketches to the arduino. The device manager recognises the board on the laptop, but when trying to upload the sketch, it hangs.

    I've tried hitting reset on the arduino and then uploading within two seconds, and the laptop says 'COM 3 is busy - port in use. Close any programs that may be using it.'

    The laptop has been restarted, system restored. The cable has been changed. The program on the arduino still runs, but we cannot upload new ones.

    Edit - I realise arduino microcontrollers might not be popular around here.. but my question is, is my overall wiring okay?

    Attached Files:

  19. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,096
    Location:
    In the vast midwest of the USA; CST
    I lost track of this thread.
    Wiring looks OK, but you will need large bypass capacitors by every H-bridge, and the Arduino will need a bypass cap as well. I don't know about running Arduinos from 12v. I'm not familiar with them.
Similar Threads
Forum Title Date
The Projects Forum Bridge diode - which one for my motor project? Apr 22, 2012
The Projects Forum IR 2101 FET DRIVER problems.. (a Full bridge inverter project) May 12, 2009
The Projects Forum h-bridge inverter project: efficiency Apr 1, 2009
The Projects Forum VSS(Vehicle Speed Sensor) Simulator project help Today at 4:38 AM
The Projects Forum Ambitious Project - 16's Digital VU's and 16 Alpha Displays Monday at 10:42 PM

Share This Page