I have an HCPL-7840 isolation amplifier. It's input side is connected to some high voltage (~300V) power circuitry.

It produces a differential output signal that is nicely isolated from the power side. Each of the two pins that form the signal are between 1.29 V and 3.80 V with respect to the ground of the output side.

I want to take that signal and feed it to the analog components in my MCU, which is an ATXMEGA128A3U. It shares a ground with the output side of the isolation amplifier. And it accepts differential inputs. But it requires that both voltages be between 0 V and 3.3 V, and further that the differential voltage be within +/- 1 V.

How do I glue these things together? I have some understanding of how it is done for single-ended signals, answers to that problem are crowding out the answer to this problem in my search attempts.

I have two uncommitted DACs in the MCU that can output a reference voltage for what I want the new common mode level to be, if it helps.


2 Answers 2


I think a couple of voltage dividers will fit the bill perfectly. Presuming a 'full-scale' input will produce +1.29 volts on one output and +3.80 volts on the other output (and vise versa for negative full scale), the difference between the two is 3.80 - 1.29 = 2.51 volts. If you scale both output voltages down by a factor of 2.5 to get the differential voltage on the right scale, you get 0.516 and 1.52 volts, both of these within the 0 to 3.3 volt range. So I would suggest simply building two divide-by-2.5 voltage dividers.

Let's assume the output voltages are split into differential and common mode components. In this case, the output voltages Vp and Vn would be Vp = Vc + Vd and Vn = Vc - Vd. If you use decent voltage dividers, the output voltages to the ADC would be Vp,adc = (Vc + Vd) / 2.5 and Vn,adc = (Vc - Vd) / 2.5. Then the converter takes the difference internally, Vadc = Vp,adc - Vn,adc = (Vc + Vd - Vc + Vd) / 2.5 = Vd / 1.25.

Now, if the dividers are not exactly matched, then the result is a little different. Call the divider gains K1 and K2. The ADC output voltage will be Vadc = Vd (K1 + K2) + Vc (K1 - K2). The differential gain is Adm = (K1 + K2) and the common mode to differential gain is Acm,dm = (K1 - K2). In this case, the error caused by the common mode voltage will be proportional to K1 - K2.

  • \$\begingroup\$ Datasheet says the output common mode voltage can vary from 2.2V to 2.8V. Scaling both values introduces a strong sensitivity to this common mode voltage. It would work if the part was perfect. But really what I want is to subtract the same value from each of the two signals, not divide them by the same ratio. \$\endgroup\$ Commented Dec 11, 2013 at 4:04
  • 1
    \$\begingroup\$ Presuming the resistors are reasonably precise, you should get very little common mode to differential gain through the dividers and the ADC's internal amplifier will perform the subtraction and take out the common mode influence. Otherwise, you need an external amplfier. And you still need to divide it by 2.5 to get the +/- 1 volt differential range. \$\endgroup\$ Commented Dec 11, 2013 at 4:11
  • \$\begingroup\$ Yes, as far as I can see, I definitely need an external amplifier. Even with ideal resistors, using paired resistor dividers isn't doing the math that needs to be done, it's doing different math that is sensitive to the common mode. \$\endgroup\$ Commented Dec 11, 2013 at 4:15
  • \$\begingroup\$ Why would it be sensitive to the common mode? The whole point of using a differential input is that you can minimize the sensitivity to common mode variations. What sort of math are you trying to perform? And how accurate do you need to be? If you're using the differential ADC input on the XMEGA, it will kill the common mode anyway. \$\endgroup\$ Commented Dec 11, 2013 at 4:17
  • \$\begingroup\$ Ooops, you are correct. My math was wrong. Sorry! \$\endgroup\$ Commented Dec 11, 2013 at 4:26

If you want the simplest/cheapest solution, you could use a voltage divider to divide down signals until they are within the bounds of the MCU inputs. Total parts needed is just two resistors per signal. Very simple, but in exchange for the simplicity, you will loose some resolution sampling the signal. LMK if you want details on what values you pick to maximize dynamic range.

  • \$\begingroup\$ Does that work? Doesn't the larger voltage change by more than the smaller one does? You could compensate in math if you relied on the common mode voltage staying put, but I presume it might walk around a bit. \$\endgroup\$ Commented Dec 11, 2013 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.