Powering uC with USB from PC while connecting ground with external supply - Page 1
Forum section: electronics / beginners

author: AQUAMAN
author_rank: Regular Contributor
timestamp: May 17, 2018, 05:58:48 pm
content: HelloI have an external high current power supply, where the power supply is 'isolated', but the negative terminal is earthed for safety reasons. See first page of this doc:http://www.delta-elektronika.nl/upload/APP_SAFE%20OPERATION%20POWER%20SUPPLY_V201705.pdfThe configuration is literally what you see here.I plan on using an LPC1768 to control and monitor the voltages of a circuit powered by this power supply, and stream the data via the USB to a PC. It's about 20V and 100A.So I will connect the ground of the LPC1768 to the negative earthed terminal of the power supply. But at the same time the LPC1768 will be connected to my PC via USB and also 'earthed' through that (I think). If I do this, will I create a ground loop and blow up my microcontroler or PC?Or should it be OK because this is basically the same as an oscilloscope right, and there are no problems using the oscilloscope in this way? Just as long as I don't connected my mbed ground to anywhere else in the system?

author: JS
author_rank: Frequent Contributor
timestamp: May 17, 2018, 10:48:43 pm
content: Not recommended, it could go fine for some time but you are exposed.Serial ports are not hard to insulate, usb is much harder (there are ICs for that but expensive and not so common)So, what I'd say is to use a serial out to the µC, optoisolate the serial bus, serial to USB converter. That's one way to do it if high bandwidth is not required. If you are constrained with space or something you could use the USB isolator, Dave has mentioned it on a teardown not long ago, I can't remember which.JS

author: rstofer
author_rank: Super Contributor
timestamp: May 17, 2018, 11:32:50 pm
content: There are USB isolators around, Adafruit has one:https://www.adafruit.com/product/2107Even with that, I might still run the USB through a powered hub.

author: AQUAMAN
author_rank: Regular Contributor
timestamp: May 17, 2018, 11:43:03 pm
content: Quote from: rstofer on May 17, 2018, 11:32:50 pmThanks for your replyHad no idea these things existed.So if I buy one of these powered hubs, I will have an isolated power supply to my mbed, and it won't affect any of the speed?I'm streaming the data at 921600 baudI have a feeling this will work even without any precautions, I don't see any difference between this and an oscilloscope probe which works fine, but I can't risk breaking anything right now. although my circuit is only about 15V max, it is 100A+

author: David Hess
author_rank: Super Contributor
timestamp: May 18, 2018, 12:05:20 am
content: Quote from: AQUAMAN on May 17, 2018, 05:58:48 pmThat is a risk. I have blown up a couple of computers that way.QuoteOscilloscopes and most other test instruments have the same problem and the same risk. This is why differential and isolated probes are used with oscilloscopes and why some test instruments have isolated outputs and isolated USB ports. Ethernet has a decisive advantage over USB with its built in galvanic isolation.Get an isolated USB hub or bridge to place between your computer and device under test.

author: AQUAMAN
author_rank: Regular Contributor
timestamp: May 18, 2018, 12:45:27 am
content: Quote from: David Hess on May 18, 2018, 12:05:20 amCan you recommend a good one?

author: David Hess
author_rank: Super Contributor
timestamp: May 18, 2018, 01:07:37 am
content: Quote from: AQUAMAN on May 18, 2018, 12:45:27 amNo butAnalog Devices makesan integrate USB isolation ASICs which are suppose to work well so maybe look for products which use them.Adafruit has one.Almost all USB isolators operate at 12 Mbit/sec (Full Speed) maximum so watch out for this if you are expecting the 480 Mbit/sec of USB 2.0.

author: AQUAMAN
author_rank: Regular Contributor
timestamp: May 18, 2018, 08:17:44 am
content: Quote from: David Hess on May 18, 2018, 01:07:37 amThe adafruit one only gives 100mAThe LPC1768 needs more than this AFAIK

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 18, 2018, 12:42:15 pm
content: LPC1768 supports up to USB 2.0 full speed (12 Mbit/s), not 480 Mbit/s high speed, so an ADuM-based isolator should suffice.I'd recommend you use e.g.Olimex USB isolator. It is very similar to other USB full-speed (12 Mbits/s) isolators based on the ADuM4160 chip. If the host USB provides full 500 mA, the isolated DC-DC converter can provide up to 350 mA. The LPC1768 itself consumes up to 150 mA or so, depending on which peripherals you use, so the 350 mA is often sufficient.However, you can also use an isolated 9V or 12V supply, to supply the isolated side with up to 750 mA. Any non-earthed switch-mode supply legal in Europe/UK should work (I'd get one from a reputable local electronics or hardware store) as they should all be isolated AFAIK, but one should probably use a multimeter to verify neither the positive or negative output of the supply is grounded. The idea here is that this supply will be grounded to the target circuit (LPC1768) ground, with the USB isolator being the barrier between the two circuits.

author: rstofer
author_rank: Super Contributor
timestamp: May 18, 2018, 01:01:54 pm
content: Quote from: AQUAMAN on May 18, 2018, 08:17:44 amThe adafruit one only gives 100mAThe LPC1768 needs more than this AFAIKI just measured an mbed at 150 mA.Having gone to the trouble to isolate the USB bus, I don't think I would still try to carry 5V over the isolator. Maybe an external supply works well here.

author: BergRD
author_rank: Contributor
timestamp: May 18, 2018, 08:52:08 pm
content: Question in regards to the USB Isolator talk..I've been looking to work on my own and using the ADMU4160 IC but listed on many vendors there are multiple version by name it seems but the spec's all seem the same.I've found:ADUM4160BRWZ-RLADUM4160BRWZADUM4160BRIZADUM4160BRIZ-RLI cannot seem to find a datasheet or anything that explains those differences in Part Numbers. Again, based on raw spec they all seem to be the same and the footprints as well.Thanks and sorry if I've interrupted the thread.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 18, 2018, 10:58:09 pm
content: Quote from: BergRD on May 18, 2018, 08:52:08 pmHere, at Analog Devices website. The two packages (wide-body 16-pin SOIC, ADuM4160BRWZ, and wide body increased creepage 16-pin SOIC, ADuM4160BRIZ) do have the same footprints, but the latter (increased creepage) has a taller body (13mm versus 10.50mm), taking a bit more board space.Note that the reason I like the Olimex isolator is that the external supply is optional, but if used, supplies USB power downstream. Very easy to use.

author: BergRD
author_rank: Contributor
timestamp: May 19, 2018, 12:07:13 am
content: Quote from: Nominal Animal on May 18, 2018, 10:58:09 pmAwesome and thank you so very much! I was pulling datasheets from Mouser/others and they were all the same for the 'family' itself; not the individuals.I may grab one of the Olimex as well to get something for audio ground loop hum now and build for experience others later.Cheers!