1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Switching between USB power and DC jack power

Discussion in 'Modding' started by galapogos, 15 Mar 2007.

  1. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    Hi,

    I'm building a USB device that can either be self or bus powered. It's normally bus powered but a switched DC jack is provided because up to 1+A may be consumed. I'm trying to figure out how I can do this simply, elegantly and cheaply. From what I can figure, I have a few options.

    1) Use the switched DC jack to do the switching. The DC jack has 3 pins, pin 1 is the center pin, pin 3 is normally connected to pin 2, but disconnected when a DC plug is inserted. I'm thinking of using pin 3 to switch on/off the USB power, but most AC adapters out there are positive polarity, meaning the center pin is positive. This presents me with a problem since pin 2 would be GND. In this case, if I were to connect the USB GND to pin 3, it would disconnect the USB GND rather than USB Vcc from the circuit. Would this still effectively disconnect USB power from the circuit? Since USB Vcc is still connected to the circuit...

    2) Use 2 opposite polarity FET/BJTs to switch on/off the DC jack and USB's Vcc with either the DC jack's Vcc or pin 3. For example, I could use a NPN on the DC jack and an PNP on the USB. Both BJT's gates will be connected to pin 3(NC) with pullups. Hence, when the DC jack is not inserted, the NPN(DC jack) will be OFF and the PNP(USB) will be ON, and vice versa. Seems like it'll work, but will require more components(2 BJTs and resistors)

    A SPDT switch IC wouldn't work since they don't handle more than a couple hundred mA, and a relay is too big to put in my circuit.

    Does anyone have any other ideas? I'm kinda leaning towards solution 1 since it is less involved and cheaper but I'm not sure if it'll work?
     
    Last edited: 15 Mar 2007
  2. JazX101

    JazX101 What's a Dremel?

    Joined:
    27 Jun 2004
    Posts:
    99
    Likes Received:
    0
    Just use a FET or BJT to swich the power from the usb rail.
    tie it to +V thru a resistor, then when you connect you're new power connector, trigger another FET or BJT to tie the first one to ground, so cutting off the USB power when you've got the dc power established.
    i think that makes sense, slight lack of proteus on my home machine so i cant do a nice little picture.
    Jaz_knos
     
  3. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    Thanks.
    After thinking for a while, I get what you're saying. Why would I need the 2nd FET/BJT though. Assuming I'm using a BJT, can't I have a pull up on its base, make it a PNP, and also connect the base to the switched input that's NC? In this case, the PNP will normally be switched on, meaning the USB power will normally be used, but when the plug is inserted the switched input will be open, meaning the PNP's gate will be pulled up instead, causing it to be switched off. Wouldn't that save 1 transistor?

    Also, what about my first idea, that requires no additional transistors at all? Would that work?
     
  4. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    I took the easy way out and simply placed 2 schottky diodes on the 2 voltage sources to prevent any back flow of current. It seems to work, except my voltages are down to ~4.75-4.85V. My device has a 5V tolerance of +/-5%, which puts me on a borderline case. I'm wondering if there are any low drop out schottky diodes that have a lower forward voltage? I'm currently using a Zowie MSCD202 that has a Vf of 0.45V@1A
     
  5. K2V

    K2V What's a Dremel?

    Joined:
    2 Apr 2006
    Posts:
    12
    Likes Received:
    0
    use 1N5819
     
  6. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    Thanks. According to the 1N5819 datasheet, it has the same 0.45V forward voltage rating as the MSCD202 I'm using. Besides, it's only rated at 1.0A. I'm looking for something that handles 5V, 2A, and preferably SMD.
     
  7. DanaG

    DanaG What's a Dremel?

    Joined:
    23 Jan 2006
    Posts:
    27
    Likes Received:
    0
    This question actually reminded me of something funny I can do with my Digilent Nexys board:
    If I jumper both the "USB" and "WALL" power selection jumpers, then plug in the AC-DC adapter, I can use my iAudio6's USB Host cable (Mini B Male-to-standard A Female) to power any USB device.

    This may be an example of what NOT to do in a design. I think it's probably bad to feed power backwards into a hub; also, the development board often stays halfway on even when the power switch is turned off, as long as USB is plugged in.
     
  8. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    A schottky diode would take care of that wouldn't it?
     
  9. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    P-channel MOSFETs with the gate tied to ground might work here, they're used like that for reverse-battery protection where minimum drop is important.

    See also LTC4412/4414 sensing chips.
     
  10. galapogos

    galapogos What's a Dremel?

    Joined:
    5 Apr 2005
    Posts:
    74
    Likes Received:
    0
    Thanks cpemma. The sensing chips looks exactly like my ticket! However, Linear Tech's usually kinda expensive. Are there alternate parts from other manufacturers? What are these chips generically called? I tried googling for "low loss powerpath controller" and didn't come up with much other than from Linear Tech.

    Edit: It seems that they're generically called "ORing mosfet controllers". Maxim also makes some of those. I've narrowed down to a few from Maxim, Intersil and Linear Tech that might work for my application based on my voltage and current requirements.

    Maxim MAX8536 - http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3734
    Maxim MAX5079 - http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4606
    Linear Tech LTC4411 - http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1003,C1142,C1079,P2430
    Linear Tech LTC4412 - http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1003,C1142,C1079,P2220
    Intersil ISL6119 - http://www.intersil.com/cda/deviceinfo/0,0,ISL6119.html
    I don't think I'll need the LTC4414 since it seems to be overkill. In fact I might even be able to live with the cheaper LTV4411. The only differences I can tell from the datasheets is that the LTC4411 has a slightly higher forward voltage and a shallower slope. It also supports only 2.6A(more than enough for USB) and uses more current(only 40uA though). According to the application circuit, the LTC4411 also doesn't require an external FET, whereas the LTC4412 does, though they are apparently pin compatible.

    The Maxims might be cheaper, but their application circuit requires 1 IC for each power source, whereas the LTC only requires the IC be in place for the battery side, and just a 1N5819 for the wall adapter. Wouldn't the schottt rectifier cause a voltage drop though? I suppose it wouldn't matter much for the wall adapter? I also suppose I can replace it with a higher current, lower forward voltage version?

    The Intersil seems to do something different as well, and only has a 1A limit.

    Also, what does charge pump capacitor mean?

    Thanks again.
     
    Last edited: 29 Mar 2007

Share This Page