Author Topic: Probing usb powered circuit. Should I be scared?  (Read 4763 times)

0 Members and 1 Guest are viewing this topic.

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Probing usb powered circuit. Should I be scared?
« on: October 18, 2018, 01:30:49 pm »
Hi there.

I've just been gifted my first oscilloscope, so I'm not an expert on anything in that respect.

I have to troubleshoot a circuit which is powered through an arduino nano connected via usb to my mac. I was trying to use the ground pin as a reference for the probe, but then I saw this: https://youtu.be/xaELqAo4kkQ

and now I'm scared... Should I remove the power from my laptop before probing and use just the batteries? Or is it safe to use the gnd of the arduino as a ref?

Thanks
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Probing usb powered circuit. Should I be scared?
« Reply #1 on: October 18, 2018, 01:35:55 pm »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #2 on: October 18, 2018, 01:37:39 pm »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.

Oh ok, thanks. I did not know that the usbs/arduino are galvanically isolated.

Cheers
 

Offline glarsson

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Probing usb powered circuit. Should I be scared?
« Reply #3 on: October 18, 2018, 01:46:10 pm »
You don't know if the USB supply is isolated.

A small phone charger style USB power supply most likely is, but a USB connector on a stationary PC connected to a grounded power outlet probably isn't.

Don't assume, meassures first.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #4 on: October 18, 2018, 01:53:05 pm »
You don't know if the USB supply is isolated.

A small phone charger style USB power supply most likely is, but a USB connector on a stationary PC connected to a grounded power outlet probably isn't.

Don't assume, meassures first.

Ok, I'll measure it!
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #5 on: October 18, 2018, 04:08:10 pm »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
An absolutely wrong assumption. Computer USB sockets are almost universally grounded through to earth ground. The only major exception, really, is laptops that don't have an earth ground connection. (In the case of Mac laptops, they are grounded if using the 3-prong cord.)
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #6 on: October 18, 2018, 06:11:12 pm »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
An absolutely wrong assumption. Computer USB sockets are almost universally grounded through to earth ground. The only major exception, really, is laptops that don't have an earth ground connection. (In the case of Mac laptops, they are grounded if using the 3-prong cord.)

Well I measured my mac laptop, and with the 3 pronged chord I get that usb GND is ~1k to mains earth. So I guess I will have to use the two pronged one when powering circuits that I have to test with the scope, I guess…

Thanks.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Probing usb powered circuit. Should I be scared?
« Reply #7 on: October 19, 2018, 10:34:27 am »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
An absolutely wrong assumption. Computer USB sockets are almost universally grounded through to earth ground. The only major exception, really, is laptops that don't have an earth ground connection. (In the case of Mac laptops, they are grounded if using the 3-prong cord.)

Well I measured my mac laptop, and with the 3 pronged chord I get that usb GND is ~1k to mains earth. So I guess I will have to use the two pronged one when powering circuits that I have to test with the scope, I guess…

Thanks.
1k to mains earth will be no problem for most applications. With a 5V supply, the highest leakage current will be 5mA, which won't damage anything.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Probing usb powered circuit. Should I be scared?
« Reply #8 on: October 19, 2018, 10:39:33 am »
As a rule of thumb I wouldn't power circuits under test from computers you care about. Sooner or later you'll blow at least one USB port from it, and possibly worse.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #9 on: October 19, 2018, 10:45:22 am »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
An absolutely wrong assumption. Computer USB sockets are almost universally grounded through to earth ground. The only major exception, really, is laptops that don't have an earth ground connection. (In the case of Mac laptops, they are grounded if using the 3-prong cord.)

Well I measured my mac laptop, and with the 3 pronged chord I get that usb GND is ~1k to mains earth. So I guess I will have to use the two pronged one when powering circuits that I have to test with the scope, I guess…

Thanks.
Literally the only thing to watch out for if the USB is grounded is to only ever connect the scope ground to the Arduino ground (which is the normal situation anyway). Done it many times with my Mac desktop, which is where my Arduino development is done. Sometimes there was various noise, which was cured by firmly tying the grounds together, and by having the scope ground as short as possible (i.e. standard good practice).
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #10 on: October 19, 2018, 11:02:38 am »
OK to use the Arduino GND since the circuit is galvanically isolated from mains.
An absolutely wrong assumption. Computer USB sockets are almost universally grounded through to earth ground. The only major exception, really, is laptops that don't have an earth ground connection. (In the case of Mac laptops, they are grounded if using the 3-prong cord.)

Well I measured my mac laptop, and with the 3 pronged chord I get that usb GND is ~1k to mains earth. So I guess I will have to use the two pronged one when powering circuits that I have to test with the scope, I guess…

Thanks.
Literally the only thing to watch out for if the USB is grounded is to only ever connect the scope ground to the Arduino ground (which is the normal situation anyway). Done it many times with my Mac desktop, which is where my Arduino development is done. Sometimes there was various noise, which was cured by firmly tying the grounds together, and by having the scope ground as short as possible (i.e. standard good practice).

So let me get this straight: you are saying that it is safe (both for the scope and the mac) to tie the grounds together (even with the current that will be ensured by the ~1k resistance), and that the only mistake I can make is to tie the scope ground to anything else than the arduino ground, right?

I'm sorry if I sound a bit confused: I am; both being a beginner and a non-native speaker is hindering me.

Thanks
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #11 on: October 19, 2018, 11:05:00 am »
As a rule of thumb I wouldn't power circuits under test from computers you care about. Sooner or later you'll blow at least one USB port from it, and possibly worse.

well the problem is that I only have that one computer and the circuit is programmed and powered by that... Apart from galvanically isolating the laptop from mains, and the alternative to unplug/restart the circuit powered from somewhere else (which will make me lose the computer-arduino serial communication) is there anything else you think I can do to use scope&laptop together?

Cheers!
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Probing usb powered circuit. Should I be scared?
« Reply #12 on: October 19, 2018, 12:26:52 pm »
well the problem is that I only have that one computer and the circuit is programmed and powered by that... Apart from galvanically isolating the laptop from mains, and the alternative to unplug/restart the circuit powered from somewhere else (which will make me lose the computer-arduino serial communication) is there anything else you think I can do to use scope&laptop together?

Cheers!
You could isolate the connection between the device and laptop. There are devices you place between the DUT and your laptop which allow you to isolate the connection. Another option would be to use a USB hub or card that acts as a sacrificial device in case things go wrong, although it isn't guaranteed that it will take the hit alone.
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #13 on: October 19, 2018, 12:30:48 pm »
I would recommend specifically a powered USB hub. Over the course of several years, I blew one USB port on a MacBook by drawing too much power from it. (In this case, it wasn’t a short, but was simply drawing far too much power from the port. A powered hub would have protected me there I’m fairly sure.)
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Probing usb powered circuit. Should I be scared?
« Reply #14 on: October 19, 2018, 12:34:48 pm »
I would recommend specifically a powered USB hub. Over the course of several years, I blew one USB port on a MacBook by drawing too much power from it. (In this case, it wasn’t a short, but was simply drawing far too much power from the port. A powered hub would have protected me there I’m fairly sure.)
A powered hub would offer you better chances, but without verifying the exact construction there's no saying what would actually happen.
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #15 on: October 19, 2018, 12:42:01 pm »
Oh lord, there seems to be no end to this, what have I done?   :D
 

Offline GeoffreyF

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #16 on: October 19, 2018, 01:01:15 pm »
Always check the grounds to assure they  are at the same potential. At the least your scope measurement will not be accurate if there is even a small amount of current flowing through the ground or a difference in ground potentials.

Technicians supporting rock concerts also check this before a performance. In a mild case, there is a hum which ruins the performance. If the potential difference is enough it can kill.  An example would be a microphone amplifier connected on one side of the stage and a guitar amplifier on the other.   The grounds are far enough apart that there can be an even lethal potential difference.  Nowadays, most use wireless transmitters which removes the problem.

I once saw this problem in a friends kitchen. The metal case of the refrigerator had that false texture which represents current flow.  Someone had done an amazingly bad job of connecting the mains socket for the fridge and it was not properly grounded.  I fixed it and fortunately nobody was hurt before that.

"The art of electronics" by Paul Horowitz and Winfield Hill discusses this from a measurement and safety point of view.  I recommend the book for many reasons but one of them is that.
US Amateur Extra W1GCF.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #17 on: October 19, 2018, 01:04:34 pm »
Always check the grounds to assure they  are at the same potential. At the least your scope measurement will not be accurate if there is even a small amount of current flowing through the ground or a difference in ground potentials.

Technicians supporting rock concerts also check this before a performance. In a mild case, there is a hum which ruins the performance. If the potential difference is enough it can kill.  An example would be a microphone amplifier connected on one side of the stage and a guitar amplifier on the other.   The grounds are far enough apart that there can be an even lethal potential difference.  Nowadays, most use wireless transmitters which removes the problem.

I once saw this problem in a friends kitchen. The metal case of the refrigerator had that false texture which represents current flow.  Someone had done an amazingly bad job of connecting the mains socket for the fridge and it was not properly grounded.  I fixed it and fortunately nobody was hurt before that.

Ok, I'll try and measure...

Quote
"The art of electronics" by Paul Horowitz and Winfield Hill discusses this from a measurement and safety point of view.  I recommend the book for many reasons but one of them is that.

I have the book (although I have not read it cover to cover, just skimmed about some parts that interested me), can you please point me to where they discuss this? It sounds interesting
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6497
  • Country: de
Re: Probing usb powered circuit. Should I be scared?
« Reply #18 on: October 19, 2018, 01:26:47 pm »
Oh lord, there seems to be no end to this, what have I done?   :D

This thread is no longer yours...  ;)

Actually, the thread is doing fine.
Everybody is actually still discussing the original topic! :)
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #19 on: October 19, 2018, 01:34:56 pm »
Oh lord, there seems to be no end to this, what have I done?   :D

This thread is no longer yours...  ;)

Actually, the thread is doing fine.
Everybody is actually still discussing the original topic! :)

I meant that I thought to ask a simple question and to get a boring universal answer... Instead this interesting discussion has come along, and I hope to learn the most from it
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #20 on: October 19, 2018, 02:34:40 pm »
So let me get this straight: you are saying that it is safe (both for the scope and the mac) to tie the grounds together (even with the current that will be ensured by the ~1k resistance), and that the only mistake I can make is to tie the scope ground to anything else than the arduino ground, right?
Yes. Tying the grounds together actually reduces the chances of problems. I routinely tie together scope ground and Arduino ground when scoping Arduino circuits.

I'm sure many more mistakes are theoretically possible, but yes, the main one is just to remember that the scope ground is earth ground (and thus Arduino ground, USB ground, etc), so don't connect the scope ground to anywhere else in the circuit but ground.

Of course, this is all assuming you are working with normal low voltage stuff. Don't even think of probing mains or other high voltage stuff until you're much, much more experienced and know how to do it properly. (I would not consider myself to be properly educated on how to do that.)

Finally, if you are powering your circuit (such as an Arduino) from a battery or isolated power supply (like most DC power supplies are), and USB is not connected (or the Macbook is not plugged in), then your circuit is "floating" and you can put the scope ground anywhere you like.

I'm sorry if I sound a bit confused: I am; both being a beginner and a non-native speaker is hindering me.
It can be confusing for beginners regardless. And your English is excellent! So don't worry. :)

Part of the confusion is that the discussion has forked in two directions: one is the scope ground question, the other is protecting the computer's USB socket from damage.

As a rule of thumb I wouldn't power circuits under test from computers you care about. Sooner or later you'll blow at least one USB port from it, and possibly worse.

well the problem is that I only have that one computer and the circuit is programmed and powered by that... Apart from galvanically isolating the laptop from mains, and the alternative to unplug/restart the circuit powered from somewhere else (which will make me lose the computer-arduino serial communication) is there anything else you think I can do to use scope&laptop together?
What I do, like many people, is to use an AC adapter (or lab power supply) to provide 7-12V DC to the Arduino's DC input jack. (9V is typical, but lower will let the Arduino's voltage regulator run cooler.) When you do this, the Arduino automatically stops pulling power from USB — but still retains the data connection.

The suggestion others have made, of using a powered USB hub in between, is an effective and simple way to protect the computer's USB ports in case you make a mistake. So it's certainly not a bad idea at all!
 
The following users thanked this post: Moriambar

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #21 on: October 19, 2018, 02:39:38 pm »
I would recommend specifically a powered USB hub. Over the course of several years, I blew one USB port on a MacBook by drawing too much power from it. (In this case, it wasn’t a short, but was simply drawing far too much power from the port. A powered hub would have protected me there I’m fairly sure.)
Out of curiosity, do you know how much current you drew?? Macs made since 2007 can provide 1A (or more) per USB port, above the 500mA maximum of standard USB. (Of course, this is only supposed to be drawn after power negotiation.) Both overcurrent and dead shorting them should cause the port to go into overcurrent protection and turn off, with a message to that effect on screen.


Thinking aloud: wouldn't it also work to make a USB protector of sorts, that simply adds an inline fuse that would blow in a fault condition?
 

Offline GeoffreyF

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #22 on: October 19, 2018, 02:58:14 pm »
Grounding is covered in section 8.16 of the third edition
Chapter 9 also has a lot of useful information.

"Practical Electronics for Inventors" by Paul Scherz and Simon Monk is also good (and perhaps better for this discussion)
2.10 talks about Grounds
2.22 talks about Mains power
Figure 2.90 is really great for this discussion.

Going back for finding these references, I am reminded that there is much overlap between the two books but Practical Electronics starts at a somewhat more basic level in some aspects.  The art of electronics is more for people who are looking to create projects that support college and graduate school experiments while practical electronics is more oriented towards people who want to invent something for it's own sake or as a business opportunity.

Geoff
US Amateur Extra W1GCF.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #23 on: October 19, 2018, 03:22:27 pm »
Yes. Tying the grounds together actually reduces the chances of problems. I routinely tie together scope ground and Arduino ground when scoping Arduino circuits.

I'm sure many more mistakes are theoretically possible, but yes, the main one is just to remember that the scope ground is earth ground (and thus Arduino ground, USB ground, etc), so don't connect the scope ground to anywhere else in the circuit but ground.
Did measure a 0.076V stable difference between the usb ground and the usb gnd. I connected the scope gnd to it and nothing blew up. Great!

Quote
Of course, this is all assuming you are working with normal low voltage stuff. Don't even think of probing mains or other high voltage stuff until you're much, much more experienced and know how to do it properly. (I would not consider myself to be properly educated on how to do that.)

Finally, if you are powering your circuit (such as an Arduino) from a battery or isolated power supply (like most DC power supplies are), and USB is not connected (or the Macbook is not plugged in), then your circuit is "floating" and you can put the scope ground anywhere you like.

Yes, the only project I have that goes up over 5V is a motor one featuring a 12V DC motor, so I think I'll be safe. And, although I understand about "putting the grounding anywhere when you're floating", I feel like for now it's best for me to grow a habit to use the normal gnd, and maybe be extra careful and change it only when needed and floating

Quote

It can be confusing for beginners regardless. And your English is excellent! So don't worry. :)


Part of the confusion is that the discussion has forked in two directions: one is the scope ground question, the other is protecting the computer's USB socket from damage.
Thanks. Yes, both issues are important here…




Quote
What I do, like many people, is to use an AC adapter (or lab power supply) to provide 7-12V DC to the Arduino's DC input jack. (9V is typical, but lower will let the Arduino's voltage regulator run cooler.) When you do this, the Arduino automatically stops pulling power from USB — but still retains the data connection.
Well I did not know this. Great! I have a PSU albeit old and crusty (but it was free!) and I can use that one! Thanks

Quote
The suggestion others have made, of using a powered USB hub in between, is an effective and simple way to protect the computer's USB ports in case you make a mistake. So it's certainly not a bad idea at all!

One can never bee too safe. Thanks a lot, now all is way clearer.
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #24 on: October 19, 2018, 03:23:09 pm »
Grounding is covered in section 8.16 of the third edition
Chapter 9 also has a lot of useful information.

"Practical Electronics for Inventors" by Paul Scherz and Simon Monk is also good (and perhaps better for this discussion)
2.10 talks about Grounds
2.22 talks about Mains power
Figure 2.90 is really great for this discussion.

Going back for finding these references, I am reminded that there is much overlap between the two books but Practical Electronics starts at a somewhat more basic level in some aspects.  The art of electronics is more for people who are looking to create projects that support college and graduate school experiments while practical electronics is more oriented towards people who want to invent something for it's own sake or as a business opportunity.

Geoff

Great thanks, also for the book recommendation!
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #25 on: October 19, 2018, 05:27:06 pm »
I would recommend specifically a powered USB hub. Over the course of several years, I blew one USB port on a MacBook by drawing too much power from it. (In this case, it wasn’t a short, but was simply drawing far too much power from the port. A powered hub would have protected me there I’m fairly sure.)
Out of curiosity, do you know how much current you drew?? Macs made since 2007 can provide 1A (or more) per USB port, above the 500mA maximum of standard USB. (Of course, this is only supposed to be drawn after power negotiation.) Both overcurrent and dead shorting them should cause the port to go into overcurrent protection and turn off, with a message to that effect on screen.
If I had to guess, a little over 2 Amps. I had a circuit that was able to be powered from USB or from a single LiIon, but didn't have good protections to be able to be plugged in both ways. The LiIon could supply 10 Amps; the circuit could draw 3-4 Amps (depending on the configuration of the LEDs); I would test and update the code with patterns that lit very few LEDs or used very low global brightness settings. A bug in the code let too many LEDs be turned on at high brightness which seems to have blown the USB port. Based on other measurements I did with the bench power supply and meters, I'm pretty sure it blew at 2 Amps +/- 20%.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #26 on: October 19, 2018, 08:24:56 pm »
I would recommend specifically a powered USB hub. Over the course of several years, I blew one USB port on a MacBook by drawing too much power from it. (In this case, it wasn’t a short, but was simply drawing far too much power from the port. A powered hub would have protected me there I’m fairly sure.)
Out of curiosity, do you know how much current you drew?? Macs made since 2007 can provide 1A (or more) per USB port, above the 500mA maximum of standard USB. (Of course, this is only supposed to be drawn after power negotiation.) Both overcurrent and dead shorting them should cause the port to go into overcurrent protection and turn off, with a message to that effect on screen.
If I had to guess, a little over 2 Amps. I had a circuit that was able to be powered from USB or from a single LiIon, but didn't have good protections to be able to be plugged in both ways. The LiIon could supply 10 Amps; the circuit could draw 3-4 Amps (depending on the configuration of the LEDs); I would test and update the code with patterns that lit very few LEDs or used very low global brightness settings. A bug in the code let too many LEDs be turned on at high brightness which seems to have blown the USB port. Based on other measurements I did with the bench power supply and meters, I'm pretty sure it blew at 2 Amps +/- 20%.
Hmm. I have serious doubts that 2.4A would cause damage, especially not on later models. Apple's own article on this is contradictory (and incomplete), in that it says Apple devices can request 1100mA (i.e. 600mA extra), and then later shows a screenshot of an iPhone being given 1600mA extra current (2.1A total). For sure, I wouldn't expect 2.4A draw from a 2.1A port to cause damage, it should just trip the overcurrent protection.

(Edit: I just checked with my MacBook Air, which is a mid-2012 and thus belongs to the first generation of Macs with USB 3 ports, and it does indeed show my iPhone as being able to draw 500+1600mA. So we know for sure that all Macs with USB 3 are capable of 2.1A, and we also know that all Macs introduced from 2007 are capable of 1.1A.)

Is it conceivable that the liIon somehow back-fed current into the USB port? Or maybe the instantaneous current was too high, e.g. with PWM?
« Last Edit: October 19, 2018, 08:29:33 pm by tooki »
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #27 on: October 19, 2018, 08:29:29 pm »
Li-Ion was not connected (and is “downstream” of the Arduino regulator in any case.

To be honest, it happened just last week and I haven’t fully power cycled the MacBook to see if it will come back. The port still has power, but doesn’t “see” any devices connected there. I’ll update this thread just out of closure when I do a full reboot and test.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #28 on: October 19, 2018, 08:30:58 pm »
Oh! In that case, also be sure to do an SMC reset, if power cycling alone doesn't fix it. Others have reported that this brought their USB ports back to life.

(See also my added edit to my reply above.)
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11501
  • Country: ch
Re: Probing usb powered circuit. Should I be scared?
« Reply #29 on: October 19, 2018, 08:43:13 pm »
Yes. Tying the grounds together actually reduces the chances of problems. I routinely tie together scope ground and Arduino ground when scoping Arduino circuits.

I'm sure many more mistakes are theoretically possible, but yes, the main one is just to remember that the scope ground is earth ground (and thus Arduino ground, USB ground, etc), so don't connect the scope ground to anywhere else in the circuit but ground.
Did measure a 0.076V stable difference between the usb ground and the usb gnd. I connected the scope gnd to it and nothing blew up. Great!
Those are just stray currents, and connecting the grounds is how you equalize them.

But FYI, even much higher voltages are possible — it is, for example, absolutely normal for an ungrounded switch-mode power supply to show as much as 1/2 the AC mains voltage between either + or - and ground!! (This is what causes the tingle you can feel on many devices.) But the current is spectacularly low, so connecting one side (typically the negative) to ground is the fix! I guess my point is that measuring a voltage from earth ground to somewhere else isn't necessarily a sign of a malfunction. If you're not sure, of course, you already know where to ask!


Yes, the only project I have that goes up over 5V is a motor one featuring a 12V DC motor, so I think I'll be safe. And, although I understand about "putting the grounding anywhere when you're floating", I feel like for now it's best for me to grow a habit to use the normal gnd, and maybe be extra careful and change it only when needed and floating
Yes, absolutely!!!!

Also, 99.99% of the time, a circuit's ground will be the negative. But the rare positive-ground circuits do exist (mostly in a handful of vehicle electrical systems, and in many power supply circuits, like the cheap 0-30V linear lab power supplies you get on eBay). So if you're unsure, just use your multimeter to determine whether it's a positive or negative ground before connecting the scope. Of course, this only matters if your circuit isn't floating.



What I do, like many people, is to use an AC adapter (or lab power supply) to provide 7-12V DC to the Arduino's DC input jack. (9V is typical, but lower will let the Arduino's voltage regulator run cooler.) When you do this, the Arduino automatically stops pulling power from USB — but still retains the data connection.
Well I did not know this. Great! I have a PSU albeit old and crusty (but it was free!) and I can use that one! Thanks
Yep, as long as the voltage is in the right range, and the PSU has enough current for your circuit, use it!!
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #30 on: October 19, 2018, 09:18:26 pm »
Great thanks!
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Probing usb powered circuit. Should I be scared?
« Reply #31 on: October 20, 2018, 02:19:52 pm »
Li-Ion was not connected (and is “downstream” of the Arduino regulator in any case.

To be honest, it happened just last week and I haven’t fully power cycled the MacBook to see if it will come back. The port still has power, but doesn’t “see” any devices connected there. I’ll update this thread just out of closure when I do a full reboot and test.
OK, so thankfully this was a false alarm.

A full power-cycle reboot restored the port's functionality. (Didn't even need the SMC reset.)
 
The following users thanked this post: tooki

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7588
  • Country: au
Re: Probing usb powered circuit. Should I be scared?
« Reply #32 on: October 20, 2018, 04:34:53 pm »
You don't know if the USB supply is isolated.

A small phone charger style USB power supply most likely is, but a USB connector on a stationary PC connected to a grounded power outlet probably isn't.

Don't assume, meassures first.

Ok, I'll measure it!

For Pete's Sake!

If there is a ground on the USB connector, & a 3 pin plug on the computer, it is connected to the building "Ground" (Protective Earth or PE), just as the Oscilloscope is.
These points are at the same potential & current cannot flow between them.

If  you have a PC or Mac with a 2 pin plug, the external metal may take up a voltage halfway between Active & Neutral, but the current available from this will not be sufficient to damage your 'scope if you connect the probe ground clip to it.

The only way you can cause damage, will be to place the 'scope ground clip on a point which is not "ground" as far as the device is concerned.
In that case, you would probably kill the USB circuitry inside the computer, but will not damage the Oscilloscope.

The original situation that brings up these warnings is when someone wants to look at the Mains supply, & inadvertently places the 'scope probe ground clip on the Active line.

This, because of the PE system which connects Neutral  & Earth (ground) at the point where the power enters the building, will place a dead short circuit across the Mains supply, drawing a lot of current, until the Mains fuse, Circuit breaker, or, if you have one, RCD drops out.

Note that "getting it the right way round" & putting the ground clip on Neutral is, also, quite rightly, frowned upon, as you have made a second Neutral/Earth link.
If there is something drawing a lot of current close to the power socket you are looking at, due to resistive losses in the wiring, there may be a substantial difference in voltage between Neutral there, & Neutral where it connects to Earth at the power entry to the house.

This may also be able to cause enough current to damage your 'scope, especially modern DSOs where the ground connection is via A PCB track.

Another situation that could do the same thing is with a fairly high current DC power supply with one side connected to ground.
Put the probe ground clip on the non grounded connection, & again, damage may occur.

In your case, there is no direct connection to the Mains, & the USB board cannot supply enough current to cook your 'scope.

« Last Edit: October 20, 2018, 04:42:32 pm by vk6zgo »
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Probing usb powered circuit. Should I be scared?
« Reply #33 on: October 20, 2018, 04:38:58 pm »
Thanks.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf