1. 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.
    Dismiss Notice

DPDT switch function using MOSFET's: how to?

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by earckens, Mar 2, 2018.

  1. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Two poles A and B need to be fed from source + and -, alternating (switching every few minutes) the polarity to A and B. Normally this is easily done with a DPDT relay. I would like this to be done using (four?) MOSFET's.
    The source is a 5V low frequency (10.., 200,.. Hz) square wave. Max current = 100mA.

    Can this be done and how?
     
    Last edited: Mar 2, 2018
  2. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,720
    Likes:
    422
    Location:
    Brisbane Australia
    That sounds like a job for a H-bridge.

    Mike
     
    • Like Like x 1
  3. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    7,549
    Likes:
    162
    And mind the high-side gate drive
     
    • Like Like x 1
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    What do you mean?
     
  6. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    • Thanks Thanks x 1
  7. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,720
    Likes:
    422
    Location:
    Brisbane Australia
    The high side mosfets have to have their gate voltage 3-10 volts above the supply voltage and so need specialised drive circuitry. I'd just use a ready built module EG This one.

    Mike.
    Edit, That bridge would be fine.
     
    • Like Like x 1
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Great, that helps!!
    Thanks,
    Erik
     
  10. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,859
    Likes:
    515
    Location:
    L.A., USA Zulu -8
    The L298 is a BJT device that has nearly a 2V load drop when on, so will not work well with a 5V supply.

    Here's a simple MOSFET H-bridge that should do what you want.
    It uses P-MOSFETs on the high side to simplify the gate drive requirements.
    You can use other MOSFET part types, but they must be logic-level devices with a max threshold Vgs(th) of 2V or less.

    upload_2018-3-3_10-45-44.png
     
    • Like Like x 1
  11. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    That is a very interesting circuit.

    My I kindly ask you to adapt this schematic so that there is a IN1 to control cuurent going the one way, and a IN2 to control the current going the other way through the load?

    Thanks!
     
  12. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,859
    Likes:
    515
    Location:
    L.A., USA Zulu -8
    Okay.

    upload_2018-3-3_22-2-59.png
     
    • Like Like x 1
  13. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Thank you! :)
     
  14. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Hi crutschow, just a few questions that I do have:
    1. no need for gate resistor?
    2. will the gate voltages be high enough to drive the MOSFET's in saturation?
     
  15. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,859
    Likes:
    515
    Location:
    L.A., USA Zulu -8
    No need. They are to prevent oscillations in high frequency circuits and that's not a problem here
    Depends upon the voltage and the MOSFETs used.
    As I previously stated, for a 5V supply and 5V gate drive, the MOSFETs need to be logic-level types, with a gate threshold voltage Vgs(th) of 2V maximum.

    A pedantic note: when a MOSFET is used as a switch they are not driven into saturation (which is the active region in a BJT) but into the linear (or ohmic) region, as shown below (which is the saturation region in a BJT).
    Why the solid-state physicists used the same word for a different operating state in a FET as compared to a BJT is beyond me. Guess they thought they would throw that in there just to confuse the rest of us
    And it worked.
    :banghead:

    upload_2018-3-3_23-57-41.png
     
  16. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Hi, thank you for that very informative answer. Not pedantic at all but very usefull and funny too :)
     
  17. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Hi, I try using a 555 output to change polarity on the load, with a MOSFET p-channel inverter so that IN1 is driven directly from the 555 and the IN2 is driven from the inverter. The issue I have is that the inverter has a slight delay causing both IN1 and IN2 to be on for the slightest amount of time and in effect causing a short between V1 (supply voltage) and ground.

    So what would be needed is interlocking between IN1 and IN2 as there is on the regular L298P; how can this be achieved as simple as possible (frequency <200Hz)?
     

    Attached Files:

  18. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,377
    Likes:
    191
    Location:
    Ohio - GMT-5
    That is called cross-conduction or shoot-through, and is a common problem in totem pole and H-bridge circuits. Wally's timimg diagram shows a gap between when in1 changes state and when in2 does. If you cannot cause that to happen in your system, then a small asymmetrical time delay is added to the input signals so they change state in the proper sequence.

    ak
     
  19. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    I have another question:

    for my specific purpose I need to have 2 of these bridges (bridge 1 and 2), but with M2 (the one side of the load, of bridge 1) connected to M2 (one side of the load of bridge 2) of the other bridge, with IN2 being the same signal (both IN2 simultaneously high or low). So that when the current (<100mA each) goes through both loads their respective connected sides of the load either sink or source together.

    The purpose is to use the loads as sensors for liquid monitoring: the sensor consists of a probe with 3 conducting vertically positioned stainless steel bolts. With these 3 bolts I need to measure the liquid in either low (none conducting), medium (lower and middle pin conducting) or high (upper pin also conducting).

    EDIT: a current limiting series resistor per load prevents short circuit and is used for current measurement.

    Is that double bridge setup electrically possible?
     
    Last edited: Mar 6, 2018
  20. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    Here is a schematic proposal of what I have in mind. Lug P7 and P11 are connected together, both are driven in phase.
     

    Attached Files:

  21. earckens

    earckens Member

    Joined:
    Aug 25, 2016
    Messages:
    625
    Likes:
    11
    Location:
    Ghent, Belgium
    ok, thks. Solved: issue was due to overcurrent on the load, I had mistakenly used a 4 ohm power resistor instead of 40 ohm.
     
  22. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,377
    Likes:
    191
    Location:
    Ohio - GMT-5
    If you change to a CMOS 555 (lmc555), the output swings much closer to both rails, assuring a complete turn-off of the three FETs it drives.

    Add a pull down resistor from the Q7 drain to GND to assure turn-off of the two FETs it drives.

    ak
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice