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

0 Members and 1 Guest are viewing this topic.

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

Online tooki

  • Super Contributor
  • ***
  • Posts: 11531
  • 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.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11531
  • 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.)
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11531
  • 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: 7589
  • 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