Scary failure with USB supply - Page 1
Forum section: electronics / projects

author: Kleinstein
author_rank: Super Contributor
timestamp: September 02, 2021, 07:15:19 pm
content: I just saw a rather scary case of failure when powering a circuit from the USB:My DIY voltmeter use an SN6505A based DCDC converter (Push-pull transformer driver) for power with a current consumption of some 250 mA at 5 V. So this should be normally be OK to power from USB. I used a USB to UART bridge unit, which has convenient access to the 5 V, and the 5 V wired directly through. I have it for the data transfer anyway, but this is towards the isolated side, so should not interfere.I was worried a bit if current spikes could be a bit high and maybe the current on startup or voltage drop under load, so I measured the voltage coming from the USB. No load the voltage was 5.08 V which seem fine.I was however not expecting the way this test failed: the USB supply voltage went up under load: first 5.2 V and later up to 6.7 V at the DC/DC converter input / USB voltage.This is scary and did cause the UART-USB bridge to get hot enough to smell. After cool down it still works, so no fatal damage. The DCDC converter has a 6.8 V zener at the input - this may have prevented an even higher voltage.It this a common problem, or just an exception with a not so well behaved load (some ripple current), or maybe a bad designed mainboard ?For this is a bit scarry for me, as other USB devices may see the higher voltage too.

author: 2N3055
author_rank: Super Contributor
timestamp: September 02, 2021, 09:34:52 pm
content: You didn't say what was the USB source..

author: TheMG
author_rank: Frequent Contributor
timestamp: September 02, 2021, 09:54:03 pm
content: There's a LOT of variability in the quality and design of USB chargers, especially inexpensive ones from dubious manufacturers.Some of them can be downright dangerous, not only creating a risk of equipment damage but also can be an electric shock or even fire risk.What is the brand of USB charger you're using and where did you buy it from?It likely has a very rudimentary circuit with poor voltage regulation, as it heats up under load the voltage creeps up.

author: mikerj
author_rank: Super Contributor
timestamp: September 02, 2021, 10:08:39 pm
content: Quote from: TheMG on September 02, 2021, 09:54:03 pmI'd interpreted it as being plugged into a PC/Laptop USB port rather than a USB charger. It's a USB/serial converter and he mentioned "mainboard".If it is a PC I would certainly not expect the 5v to rise unless you are inadvertently trying to pump currentintothe USB port.

author: magic
author_rank: Super Contributor
timestamp: September 02, 2021, 10:21:49 pm
content: More hardware details needed, butDoes that computer still work? No fried hard disks and other stuff?Such things are certainly not supposed to happen. On desktops with ATX PSUs there is simply one 5V rail for everything. I'm not familiar with laptop internals, but unlikely to be much different.It shouldn't be very sensitive to load, there is a ton of capacitors in there.If it was a dry test on some USB charger then sure, quality varies a lot and some also try to compensate for cable loss by increasing output voltage proportionally to load current.

author: amyk
author_rank: Super Contributor
timestamp: September 02, 2021, 11:39:23 pm
content: Was it some form of fancy USB-C port? USB-C PD can supply up to 20V, and it's normally negotiated through some insanely complex protocol, but that still scares me based on the fact that it's a variable output voltage that can surely go up if something doesn't work right.It could also be an attempt atcompensating for cable voltage dropthat's overcompensating.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2021, 12:51:12 pm
content: The USB power was from a desktop computer (Fujitsu i5..., not very new), just a normal USB2 (maybe USB3, but not on the plug used). The UART unit was kind of only to have access to the pins and as far as I can tell has only 1 or 2 MLCCs at the 5 V and a 0 Ohms resistor in series - so I doubt it did contribute, just suffered.The local decoupling at the DCDC is a bit on the short side with 2x1 µF MLCC and 10 µF electrolytic - still I had not expected it to be a USB killer.I have not measured to voltage with the scope, just an old, likely ICL7106 based DMM.I have the feeling the ripple current from the DCDC converter did somehow interfere with the 5 V regulator on the mainbord side.

author: magic
author_rank: Super Contributor
timestamp: September 03, 2021, 12:58:24 pm
content: There is normally nothing on the mainboard, just a polyfuse connected to 5V from the PSU. (I think MOSFETs to choose between the normal and standby rail are a possibility too, but it's been awhile since I looked at computer motherboards).If you had 6V on the output, you probably had 6V everywhere. Consider yourself lucky.editHow much confidence do you have in:- the PC PSU?- the DMM and its battery?

author: ConKbot
author_rank: Super Contributor
timestamp: September 03, 2021, 01:04:58 pm
content: How did you measure this voltage rise? Scope? DMM? Analog meter? I'd suspect ringing between the cable and the input capacitance played some role here, but if you scoped it and it was indeed DC, and not spikes and ringing, that is indeed quite weird.

author: tszaboo
author_rank: Super Contributor
timestamp: September 03, 2021, 01:17:57 pm
content: I wanted to make a small board, basically an "USB safety-fyer"And place an electronic current limiter, fuse, for the power, and a re-driver for the USB data lines.I wonder if there would be a need for this...

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2021, 01:42:53 pm
content: I have quite some confidence in the DMM: it shows a low battery relatively early and did work well the last 30 years or so. The same meter shows normal 5.08 V at the USB supply when nothing bad connected. I did not consider the DCDC converter to produce very much EMI - at least the voltmeter part it powers works fine, with little interference (maybe a little noise in the 7 th digit). So I don't think there was enough interference for the DMM to read wrong. The input capacitance of 12 µF is a bit low for the DCDC converter, and slightly above the 10 µF that are supposed to be at the USB max. I still don't think it should be so sensitive.The PC is more like an office computer (lower profile desktop with a more custom power supply). So it is not so easy to exchange, but I also don't expect it to be build super cheap.It was not just the DMM reading high, but also the chip on the USB-UART bridge (just used for power through) was getting hot (could smell it and it still felt hot after unplugging it).Yes I consider myself lucky that nothing got really damaged. I only had the higher voltage for maybe 5 seconds or so.Anyway I have no intention to repeat.So no more USB power to DIY circuits from this computer.Just a fuse and maybe a FET to turn off the power is also what I expect on the main board.It seems the USB uses kind of standby power, as some devices still get power when in standby mode.

author: magic
author_rank: Super Contributor
timestamp: September 03, 2021, 02:13:32 pm
content: Quote from: Kleinstein on September 03, 2021, 01:42:53 pmI think they switch to the main 5V rail when the PSU is on.But those branded machines can be weird, some of them use 12V only PSUs with on-board regulators for everything else.Anyway, that's some bizarre stuff.I presume that simply loading USB with 250mA doesn't produce the same effect?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2021, 08:28:04 pm
content: I have not tried, loading the USB with a resistor, but other loads (charge digital camera, WLAN and external USB harddisc) did work.

author: 2N3055
author_rank: Super Contributor
timestamp: September 03, 2021, 09:36:25 pm
content: Quote from: Kleinstein on September 03, 2021, 12:51:12 pmThank you for answer.Yep, PC is getting USB power from 5V power bus directly, and cannot produce 6V.. It has to be some back driving by device or inductive pulse or something.That is kinda small decoupling on input of DC/DC converter. You could try adding 100uF to it and test.Measurement artifact not very likely with a DMM.I guess a short USB extender cable will have to give it's life to science... Expose wires and measure with a scope. Or if you feel like it make a little measurement pickup through board to get test points exposed.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 03, 2021, 10:20:44 pm
content: I think I will look at the PC internals tomorrow. It was one of the front side connectors, just in case it matters, so not directly the plugs on the moterbord.The circuit definitely had not way to backfeed extra power, as the USB was the only power source.It would be more like excessibe ripple, though normally this should not happen, as the load should be relatively symmetric on both half cycles.The regulator may just behave poor at some 160 kHz. This about the frequency where voltage regulators can tend to oscillate, so a boarderline regulator with a nasty load (possibly some negative impedance in this frequency range) may have come together.I probably won't do experiments with this USB part, so sorry - no scope traces.The filter capacitance is a bit tricky. The transformer driver wants a bit more capacitance.The USB specs want 10 µF max, if there is no extra current limit.The ripple, if powered from a pretty slow lab supply with not very much capacitance at the output is visible, but not too large. I check the amplitude tomorrow.

author: magic
author_rank: Super Contributor
timestamp: September 04, 2021, 05:46:29 am
content: I have exceeded the 10µF spec before I knew it exists; I think 100µF was my recordMaybe some choke and/or small resistance on the input could smooth out the inrush transient and also isolate your switching junk from the PC.As much as I would like to know what happened, I don't think it is objectively a good idea to attempt reproducing this condition when it isn't know what else sits on that 5V rail in the PC.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 04, 2021, 08:07:27 am
content: As far as I see it the 10 µF upper limit USB wants is there to limit inruch currents. So the supply does not collaps if a new USB divice is plugged in. With extra measures to limit the inruch current more is allowed.When I build the circuit I also did not know about this limit, and I did not even planed for USB as a supply. It was just coincidence that my 12 µF (nominally) are only slightly above, but this should not be the reason.I checked the ripple when powered from a lab supply: 10 mV_pp (about triangle waveform) at some 330 kHz - so as expected twices the DCDC working frequencies. I don't think the lab supply (old DIY one) has a very low impedance in this frequency range.Some choke / filtering would probably help and be a good idea. I have a CM choke planed, but not yet populated. The stray inductance of the choke would have helped at least a little.The other point may be some optimization at the DCDC converter, like something to reduce peak currents a little. It currently looks like it draws quite some peak currents - maybe my DIY transformer is too low in stray inductance.