Quote:
Originally Posted by rsfotoI can not use the same ground. One ground comes out of the PC and the other ground comes from the 12V power source which I use for the relay card.

So far as I know I can not join the different 2 grounds into one ¿ due to groundloop issues ?

I was going to warn you about this. It may or may not be a problem. When I connect two "grounds", I first check for a voltage difference. Then I use a 200Ω resistor and look for voltage drop across it. Anyway I believe you'll need "ground" to be defined by USB power ground.

Quote:
Originally Posted by rsfotoCould I use the same +5V from the USB line to switch it using a Logic level MOSFET as you wrote ? Using a high KOhm pull down resistor ?

Sounds fine, yes. I see no need for the optocoupler unless you cannot solve the ground problem.

Click to expand...

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.

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

Click to expand...

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.

As you see I have the ground of the Powerbrick and the USB line connected together.

Click to expand...

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.

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

Click to expand...

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.

... 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 ?

Click to expand...

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.

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.

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 ¿?

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

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.

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.

Click to expand...

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 ?

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.

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.

Click to expand...

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

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.

Click to expand...

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

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

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

Click to expand...

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.

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.

Click to expand...

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.

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.

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.

Click to expand...

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.