Shop OBEX P1 Docs P2 Docs Learn Events
mosfet h bridge/code dilemma — Parallax Forums

mosfet h bridge/code dilemma

mikeamikea Posts: 283
edited 2012-05-19 04:09 in Propeller 1
Duane Degn was nice enough to post this code for r/c controlled dc motors. He used the l293 chip for an h-bridge. I am trying to use p, and n channel mosfets for an h-bridge. The p channel needs a low signal to turn on along with a high signal for the n channel at the same time. I have substituted in the con section for his "wheel2red=20 and wheelblack=21"some binary to turn on/off pins simultaneously to run the halves of the mosfet h-bridge. I cant figure out why it isn't working. Also i cant seem to get the "deadband" wide enough. When i use a bi-colored led to simulate a motor it flickers...i have changed the value for deadband and adjusted the trim on the radio. Any advice would be appreciated. -mike

Comments

  • mikeamikea Posts: 283
    edited 2012-05-18 23:07
    So far i figured out that the flicker is from my r/c antenna.( http://www.fairchildsemi.com/ds/FQ/FQP50N06L.pdf this is n mosfet datasheet link)(http://www.fairchildsemi.com/ds/FQ/FQP47P06.pdf this is p channel mosfet datasheet) couldnt figure out how to make another attachment. I can turn on an led through the mosfet h bridge but unable to turn on a dc motor that will turn on directly from the battery, it will only make a ringing noise. The data sheet at the top shows:52.4A, 60V, R
    DS(on) = 0.021Ω @VGS = 10 V

    and down lower on the sheet:
    V
    GSS Gate-Source Voltage ± 20 V

    right now it is only getting 3.3v from the propeller, is that enough to operate correctly?-mike



  • Mark_TMark_T Posts: 1,981
    edited 2012-05-19 04:09
    mikea wrote: »
    So far i figured out that the flicker is from my r/c antenna.( http://www.fairchildsemi.com/ds/FQ/FQP50N06L.pdf this is n mosfet datasheet link)(http://www.fairchildsemi.com/ds/FQ/FQP47P06.pdf this is p channel mosfet datasheet) couldnt figure out how to make another attachment. I can turn on an led through the mosfet h bridge but unable to turn on a dc motor that will turn on directly from the battery, it will only make a ringing noise. The data sheet at the top shows:52.4A, 60V, R
    DS(on) = 0.021Ω @VGS = 10 V

    and down lower on the sheet:
    V
    GSS Gate-Source Voltage ± 20 V

    right now it is only getting 3.3v from the propeller, is that enough to operate correctly?-mike


    No, 3.3V definitely isn't enough. If you look at the specs the Rds(on) figure for the n-channel is quoted at 10V and 5V (but not at 3.3V) - so it won't be fully on at 3.3V, if might be anything from 1% to 50% on or so. The graph of gate voltage against charge suggests 4V is about as low as you could go.

    Quick summary of MOSFET specs:
    Vgs max - the breakdown voltage of the gate oxide layer, here +/- 20V - ignore this unless you were planning a high gate drive voltage such as 15V (in which case you'd need to think about protection circuitry).

    Vth - the threshold gate voltage for conduction - this varies a lot between devices and is the gate voltage for the device just starting to turn on at a few parts-per-million of full forward current (here 0.25mA) - ignore this, you just need to know it will be fully OFF at Vgs=0V

    Rds(on) at Vgs = x THIS IS THE IMPORTANT ONE. At the quoted gate-source voltage the device is guaranteed to be on with the given drain-source on resistance.

    Total gate charge - this determines how fast it will switch at a given gate drive current. This will matter if switching fast (above 1kHz or so)

    Ids max - max continuous forward current. IGNORE THIS. Yes, that's right, ignore it. Unless you plan on attaching a water-cooled heatsink to the device it will melt before you reach this current. Determine how much power you can afford to dissipate in the device and select one with a low-enough Rds(on) to meet this at the highest load current you will need (I-squared-R). You might want to consider heatsinking options (bigger heatsink means you can use larger Rds(on).

    The highest pulsed forward current is useful though if you are switching short pulses. You still need to calculate the average power dissipation though.

    The p-channel MOSFET needs 10V of gate drive since its Rds(on) is only quoted at Vgs=-10V

    This means you will need a power supply of 10 to 15V, you will need some drivers between the logic signals and the p-channel gates (either NPN common-emitter or n-channel common-source stages), and you'll need to level shift from 3.3V to at least 5V for the n-channel drive.

    Pretty much the only easy situation for an n-channel/p-channel H-bridge is when using 5V logic to drive all logic-level MOSFETs. Any other configuration and I'd go for a MOSFET H-bridge driver chip and all n-channel devices. The HIP4081 or FAN7388 spring to mind. These devices handle the dead-time and shoot-through prevention and drive 12V into the gates at high current so you don't have to find logic-level MOSFETs and can switch fast (50kHz say). You will need a 12V supply though (the H-bridge itself can run at any voltage though, within the specs of the driver (for the HIP4081 its 80V, for the FAN7388 its a whopping 600V ...)
Sign In or Register to comment.