USB Switch and question for Wayneh

Discussion in 'The Projects Forum' started by rsfoto, May 30, 2013.

  1. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi Wayneh,

    Remember this ?

    Please explain me how to check the voltage difference between the 2 grounds.

    I came up with an idea of switching the USB cables in another way using voltage regulators but then the ground loop question comes up again how to connect the USB cable ground to the separate ground of the 12V power supply.

    Let me make a circuit today afternoon in order to explain a bit better my new idea about powering the USB devices at the other end of the PC.

    Thanks in advance
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Well that's an easy one: Just put your meter in AC mode and then put the two probes onto the two "grounds". Hopefully you'll see little or nothing for voltage. If you do, this may be a dead end. Switch to DC mode, highest range and apply the probes again. Turn down the range as you can.

    If the grounds are within a few DC volts or less, apply a 200Ω resistor between the two grounds and recheck for a DC voltage - and calculate the current if there are more than a few millivolts. The times I've done this, the current was tiny, maybe a milliamp or less, so I just left the resistor in place. You can reduce it to a lower value if you want.

    As a final check, watch for a voltage across the resistor as loads are placed on the two different supplies. You don't ever want to see current trying to flow from one ground to the other, ie. a ∆V across the resistor.

    A diagram will help a lot.
     
    rsfoto likes this.
  3. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    Below you can see my idea. As you see I have the ground of the Powerbrick and the USB line connected together.

    Does the schema make sense and would it work considering that I have no problem with the 2 different grounds ?

    Or what do I have to do in order to have no problem ?

    I thought that anyhow having the 12V Poerbrick to power the optocoupler for opening the MOSFET drain why not supply power from the Powerbrick to the USB devices ?

    Also ¿ Do I really need the capacitors ? I took that schema off the datasheet ...
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    So it appears you are making a self-powered hub? These are available inexpensively, by the way.

    I do not think it is as easy as you have drawn it. If you have enough power from your 12v supply, and do not need to draw from the PC, just power the "out" side with your regulator and ignore the +5V line on the "in" side. Maybe that's how the commercial hubs work, I don't know, but at least you avoid connecting power supplies.

    Where is your 12V coming from? Note that you have directly connected the ground lines of your 12V supply with the ground from your PC's USB port. That is potentially a current path from one supply to the other and should be avoided, or at least you should proceed with a meter as described earlier. If it's 12V supplied from a wall wart, it should be OK. If it's another PSU, be careful.

    Yes. Note also that dropping 12V to 5V is very inefficient and whatever power is needed by the USB device, 7/5ths of that amount will also be dissipated in the 7805 IC. At even 100mA or so, it'll get hot and you'll need a very good heat sink on it.
     
    rsfoto likes this.
  5. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Thanks. So in simple words it could be done like this ?. See image.

    Instead of using a 12V powerbrick I would use a 5V powerbrick and remotely switch via a relay card the VBus1 of the OUT USB ...

    I ahve been doing a lot of searching in the WWW in order to find out how the communication of an USB cable works but have not yet found anything and I am still searching :eek:

    ... but, ¿ is it not necessary that the ground from the USB coming from the PC needs to communicate with the ground from the Device USB ?
     
  6. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Yes, they do need to be connected. That means you need a power supply with a ground that is "floating" compared to your PC's USB ground. A wall wart normally provides this because of the isolating transformer inside it. I don't know about the typical SMPS brick.
     
    rsfoto likes this.
  7. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    Thanks. Found this in the web. See image.

    The powerbricks I use have 3 connections Line, Neutral and Ground. My Observatory is grounded as I ahve all wall outlets with 3 plugs.

    This

    http://www.agspecinfo.com/pdfs/H/HF150W-S.PDF

    are the Powerbricks I use.

    I just ordered a powered USB Hub for reverse engineering :D
     
  8. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    That attachment using the diode might work, but it ignores the fact that the diode will drop ~0.65 volts when current is flowing. So without the external supply, the hub will not see 5V but something like 4.35V. That may well work and, since it was posted, it must have worked for somebody once. But some USB devices can be picky.
     
    rsfoto likes this.
  9. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Well what I want to do is to interrupt the +5V line from the PC totally. Just let us take away the Diode and no connection will be there.

    So I power the device via a separate Power Source like this one. See image. So far I see there is a transformer and so we have the "floating ground" as you mentioned before and I can connect the ground lines of the PC and the Powerbrick together ¿? :confused:

    Via a remote relay I just close or open the 5v line and so I switch the device ON or OFF as needed. This is an alternative to the USB Cable switch we developed using a Mosfet or a reed relay as discussed in this thread

    http://forum.allaboutcircuits.com/showthread.php?t=85160
     
    Last edited: May 30, 2013
  10. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Maybe someone here knows about whether a typical SMPS (or this one in particular) provides isolation from the mains. I know the topic has been discussed in this forum and I believe the answer was no, not completely.

    You need an expert and/or some measurements.
     
    rsfoto likes this.
  11. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi Wayneh,

    I have been reading over and over again the above but somwhoe I got confused.

    Which 2 grounds do you mean ?

    The Earth of the SMPS against the ground of the USB cable eventually also the Shell (shielding) of the USB cable against the earth of the SMPS ?

    Or the Earth of the SMPS against the -V output of the SMPS.

    What about the Shell of the USB cable against the ground of the USB cable ?

    What about the neutral line of the SMPS ?

    Sorry ... :confused:
     
  12. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    For maximum care when connecting power sources, each power supply needs to be considered a "black box" which might have any voltage on any conductor, where voltages are relative to the other source. Before attaching one power supply to another via ANY single conductor, you need to establish whether a damaging current might flow if you make the connection. Unlike the normal situation where two conductors from a power supply, red and black, + and - , must be connected to complete a circuit, when you connect two power supplies there might be a "hidden" connection between them via mains ground, so that a connecting a single conductor between the supplies will complete a circuit you didn't expect and pass a damaging current.

    To carefully rule out this possibility, you use your meter to check for voltage differences, both AC and DC between the wires you want to connect, usually the power supply commons. That establishes a "common ground" which is handy reference point for all the other voltages.

    The measurements are more meaningful if there is a load - a low ohms resistor - between the two conductors, but you can't risk putting a load there until you've first checked for a voltage. (Unless your load is capable of surviving the test, like a lightbulb.) Your meter is a tiny and safe load. A 200Ω resistor is a larger load and will also be safe if your meter test showed little difference. If the 200Ω resistor sees only small voltages, you could move to a larger load, maybe 10Ω or less. The ultimate load is a direct connection. But I've learned the hard way to not directly connect two power supplies without first checking as above. Been there, blown the fuses.
     
    rsfoto likes this.
  13. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Thanks. I think I understood now.

    I will check voltage with my Multimeter by touching with the probes al possible places and see where I have a voltage where it chould not be.

    For example: Earth SMPS against -V = NO voltage = OK
    Earth SMPS against +V = NO voltage then OK

    and so on. Of course +V against -V= YES voltage = OK :rolleyes:

    Same for USB cable eg. Shell against ground line = NO voltage = OK

    and so on ... correct ?
     
  14. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Sounds like a good start, yes. With luck, the grounds will both be floating and not tied to mains ground. Then you'll be good to go.
     
    rsfoto likes this.
  15. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    Well just came home and measured all connectors against all.

    OK when measuring the HOT line (115V AC) against the -V (gnd for 12V) I get variable values +- which I think is normal.

    Now measuring all the -V of the SMPS outputs against Neutral and Earth ( AC 115V) the only case I get ~1mv to 2mV.

    Under load it stays the same. I used a 12V light bulb with 12 resistance.

    I just measured a 7 Port Hub I bought yesterday and opened it. I get also 2mV between the negative connector of the additional power supply (delivering 5V 2A max) against the shielding of the USB female connector. Without the additional power I get 0.5mV between the shielding of the MicroUSB a connector and a normal USB-A (Output) connector. Look at the image.

    So what does all this mean :confused:

    Am I safe without any device between the 2 grounds eg. -V 12V SMPS and USB ground ¿? :eek:
     
  16. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    In my opinion, yes, you can connect them directly. If you're nervous, and there's nothing wrong with that, start by connecting them thru your light bulb. It should remain dark and show very little voltage across it. If that's true, try a direct connection and watch for the magic smoke to be released! ;) Just kidding. I think you'll be fine.
     
    rsfoto likes this.
  17. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Thanks. OK, if I understand correctly, I connect ground to ground and inbetween a light bulb as a resistor in order to kill any current flow.

    Correct ?

    Sorry for making so much questions :rolleyes:
     
  18. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Yes, that's right. The lightbulb can handle more current than you are expecting and as a bonus will light up if that current happens. It won't prevent ("kill") the current, though, and in fact it will behave almost as a direct wire. It's a special wire, if you will.
     
  19. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Appreciate your great help in helping me to understand this a bit better.

    I can make the real tests in 2 weeks as I have all the stuf in my Observatory.

    Will now draw a schematic circuit how to wire everything. So the only hardawre I will need are female USB A and B connectors and a PC controlled relay card.

    UPDATE a few minutes later.

    On the other side separating the grounds using a reed relay or the circuit kubeek was so kind to draw for me is less stress as the grounds of everything is separated.

    My friend was here. I showed him how to wire the USB Cable switches and this weekend he will do the real trials in his Observatory, The only incognita is still how to work with a USB 3.0 camera he has but I have already some ideas in my mind, like piggybacking the switch on the cable and just interrupt the +5V wire and leave the other 8 intact as well as the shielding over them. Perhaps shield them with a copper mesh tube by just wrapping around the copper mesh.

    After all this I just need to find interesting books in oirder to get a bit more involved in this.
     
    Last edited: May 31, 2013
  20. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,056
    Good luck. Let us know how it goes.
     
    rsfoto likes this.
Loading...