Transferring DC signals between isolated circuits - Page 1
Forum section: electronics / beginners

author: danderson
author_rank: Contributor
timestamp: November 22, 2014, 11:16:00 pm
content: Hi,I'm working on a variant of Dave's famous electronic load (), with some adjustments to fit my needs. The biggest adjustment, is that I want to control the load over USB from my computer, so the 10-turn pot and panel meter are replaced by an ATxMEGA that provides the set point via DAC, monitors the true current via ADC (though an op-amp still runs the actual control loop), and exposes all that over a USB serial port in the same style as the Bus Pirate. Other specs: up to 3A current sink w/ forced air cooling, and able to test supplies that provide up to 20V.I've attached a schematic (which is likely missing quite a bit of decoupling around the microcontroller and ADC paths, it's still a draft). It's also at, if you prefer to follow links.However, this introduces a challenge: the circuit is powered by USB, which means that if I naively reuse Dave's design for the current sink portion, the USB port and the supply under test will share a common ground. This seems very risky, because that means that under the right conditions (both sides mains earth referenced), disconnecting the supply-under-test's negative wire will shovel all 3A through the USB port's ground pin, and will likely cause magic smoke to escape.So, the answer seems obvious: build two isolated circuits! One powered and grounded by USB for the control circuitry, and a separate circuit exclusively referenced to the supply under test. That way, there should be no path for the high sink current through the USB connector and computer.What I'm struggling with is how to get the DC control signals through that isolation. I suspect that an optocoupler would do the trick to get the op-amp's output to the power MOSFET, though I have to look at how the optocoupler would distort the op-amp's signal. What I'm stuck on, however, is how to get the current sense signal back in the other direction. Naively, I was thinking of using an op-amp configured as a 10x differential amplifier, to convert the 0-0.3V sense back to 0-3V for the feedback loop, but I keep confusing myself trying to puzzle out how that would work with two separate grounds. Theoretically, the supply-under-test's "ground" could be at, say, -10V relative to USB ground, and powering the op-amp from either side would result in an unusable signal for the other side.Looking around digikey, I found that there is such a thing as an isolated differential amplifier, which seems to be what I need... With the exception that I don't have a good positive reference voltage on the current sink side of the circuit (since I don't know upfront what the supply under test is supplying), and all the isolating amplifiers I saw require a stable VCC on both sides.Again naively, I think what I'm looking for is something akin to an oscilloscope differential probe, albeit with less filtering and compensation circuitry since I don't need high frequency fidelity. However, I've looked at a few of those circuits, and I still don't understand how the probe can power itself from the oscilloscope's power rails only, and still "transfer" a differential measurement (where each pin may be at dozens of volts above/below the scope ground) into the scope's power domain. Based on the specs, I know for a fact that the differential voltage across the shunt should always be between 0 and 0.3V, I just can't figure out how to turn that differential voltage into a signal referenced to USB ground, without giving the sunk current a path to USB ground as well.So, can you suggest what I should be putting in the two black boxes marked "??" in the circuit? Do you have any good reading material on designing the interface between isolated circuits?Thanks in advance,- Dave (nottheDave, obviously)

author: rs20
author_rank: Super Contributor
timestamp: November 22, 2014, 11:36:16 pm
content: Not what you're asking, but if I were you, I'd put the microcontroller on the load side of the isolation, so that the only thing that needs to jump the isolation gap is power + serial data, not DC levels. The Analog Devices ADuM series of isolation chips (e.g. I've used ADuM6000 for power and ADuM3301 for data in a similar application which involved measuring mains voltage + current) will take care of both digital data and power for you.You could chop your DC into AC, feed it through a transformer, and rectify + smooth on the other side, but that seems nasty. There may be chips that can do this for you.

author: Matje
author_rank: Regular Contributor
timestamp: November 22, 2014, 11:44:52 pm
content: Quote from: danderson on November 22, 2014, 11:16:00 pmYou could also isolate the USB side.There is the Analog Devices ADUM3160/4160 to isolate the USB data lines, be aware it only supports USB low (1.5 Mbps) and full (12 Mbps) speed. Analog also has the ADUM5000 to transfer power from USB to the isloated side, no idea if 500mW @ 3.3 or 5V is enough for your application.

author: danderson
author_rank: Contributor
timestamp: November 22, 2014, 11:55:51 pm
content: Isolating the USB connector is a very good point, and one that I hadn't considered. And it seems to be a common enough need that there are single chip solutions to implement the power+data isolation for me, which is fantastic.The 500mA the USB bus can provide is more than enough. The whole design eats 50mA at the outside, most of it status LEDs, so I'm really just sipping power on the bus compared to the load side. And I really only need low-speed USB to get a usable serial console.Thank you for the insight, and the references to the AD chips to implement! If I ever get a working device, it'll be OSHW, and I'll share it back here.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 23, 2014, 01:27:15 am
content: USB isolators sound expensive, because they're bidirectional and potentially high speed. Then again, maybe they're actually quite popular and cheap, I haven't shopped for one.Another alternative is a common e.g. FT232, do your comms over async serial (only need two isolated channels -- a pair of 4N35 are good for ~100kbaud) and you can use whatever ATmega you're comfortable with.Tim

author: Rerouter
author_rank: Super Contributor
timestamp: November 23, 2014, 02:24:04 am
content: For measuring across the barrier, something like this circuit would work fine, you time how long you have a low, and using the capacitors time constant can work out how high it charged,equally by timing how long it took between setting output low and seeing the returned high you can determine the round trip time to correct for the propagation delay of the optocoupler (2 on the same die should be very very closely matched)That gets you current back to the micro, and seeign as you already have an op amp over there, you can easily make it a double,The set point is a little more tricky, as you obviously picked a DAC for the purpose of being a dac and avoiding PWM dithering, and without using PWM i can not see how you might accomplish that,

author: nuno
author_rank: Frequent Contributor
timestamp: November 23, 2014, 03:33:05 am
content: Just wanted to say that if you go with the isolator chips, check also Siliconix, they have chips similar do AD (some even pin compatible) but cheaper (at least at mouser).

author: danderson
author_rank: Contributor
timestamp: November 23, 2014, 08:37:32 pm
content: For what it's worth, I quickly costed out a couple of alternatives to implement USB D+/- isolation: one using a dedicated USB isolator, and the other using a USB-USART bridge and a pair of plain optocouplers.Using a Microchip USB-USART bridge and a pair of optocouplers ends up being around 2x cheaper than using an ADUM3160 active USB isolator, $3.09 vs. $6.71. I can also save a few more bucks on the microcontroller, by going with an xMEGA E series, which doesn't have onboard USB, instead of the A series.Bringing over the isolated power is quite expensive: the ADUM5000 alone is $6.75, although it has the benefit of being an all integrated solution. I suspect I could get slightly cheaper by getting an isolated DC-DC controller instead, and wiring up the transformer and rectification stage myself... But $6.75 isn't high enough to make me go through that pain and increased part count.I'm looking at one final option now: use discrete DAC and ADC chips, and isolate the SPI line from them to the microcontroller. Doing so would let me use a cheaper 30mW power isolator to power them and the op-amp, and use cheap digital coupling for all my signals. I'll let you know how that comes out.Thanks again for the widsom!

author: danderson
author_rank: Contributor
timestamp: November 23, 2014, 09:22:42 pm
content: The option of using discrete ADC/DAC chips comes out to about the same as the USB-USART bridge + isolated SPI. The lower power requirements mean I can use the ADUM5010, which is much cheaper than the ADUM5000. However, the cheapest ADC/DACs are all I2C, so the savings are sunk in an I2C isolator. It may actually be worth going for slightly more expensive ADC/DACs that do SPI, so that I can do all the isolation with plain optocouplers.Thanks again.