I am working on a project where I have a solar panel connected to two battery chargers.

One battery charger looks after an old car battery which powers some lights in my garage and a small circuit. The circuit turns the second battery charger on and off, and is used to charge a motorcycle battery.

In the second revision of my circuit I had hoped to use some ADC channels to measure the voltage of the solar panel, as well as the two batteries. Statistics of the voltages would be uploaded over LoRaWAN so I could graph them and keep an eye on things, while the solar panel voltage and motorcycle battery voltage would be used to determine when to turn on the second charger to top up that battery.

My problem

The chargers I am using have a common positive rail between their inputs and outputs with MOSFETs switching the ground instead - this is opposite to what I would ordinarily expect. I designed my circuit assuming that ground would be common, so when I measure voltages at the moment I am just getting the same reading for all 3 points in the system.

I need to redesign my circuit to be able to measure voltages at points where the ground is different.

I had thought about using an analogue multiplexer, like a 74HC4052, to change the ground reference presented to the ADC module of my microcontroller, but this is getting a bit beyond my knowledge, so I need some assistance to work this out.

My question

Does anyone have any suggestions for components that have a kind of isolated voltage input (something which can have its own independent ground reference for the input) which either act as an ADC themselves and could be read over SPI/I2C, or can produce an analogue voltage on the "digital side" which I could then read from my microcontroller?

I have seen some components that act as combined voltage/current sensors, but so far all of the ones I have looked at have only a single ground connection that is shared between the analogue and digital sides.

Any info would be appreciated, and I am happy to expand on any of the above as required.



3 Answers 3


The safe solution is: isolate, isolate, isolate. It's not cheap but each 'section' has its own ground reference: you massively reduce noise/interference and, depending on your layout, you avoid hazardous ground potential differences.

Depending on the voltages on your panels the offset (common mode) can ramp up quite fast on the distance.

If you do not want to isolate and you have your common mode under control you could try difference amplifiers (especially useful for shunts, a little less for voltages) or floating capacitor systems (very good if you know what are you doing but still somewhat expensive). They are somewhat niche components however, but Analog Devices makes them. A difference amplifier could be a perfect solution if you are 100% sure of your common mode (i.e. everything on one board and everything properly bonded to safety ground)

The 'modern' isolated approach is to put the analog frontend and the ADC on the 'floating' side and send a digital stream to the processing block: if you can process a sigma-delta bitstream (usually with a DSP or a FPGA) only one channel needs to cross the border, otherwise plan for two to four channels (typically some kind of SPI). If you are lazy and can afford the premium price they even make converters with the isolation barrier inside. I personally don't think they are worth their price, but they could be handy.

  • \$\begingroup\$ Thanks for your reply. On your last point there, I suppose I could have something like a microcontroller which is powered by the voltage rail that it is monitoring, and then I just need some kind of isolated digital interface to speak to it. Perhaps something like a UART via optocouplers? That microcontroller can just sit there and make continuous readings and transmit them when asked. \$\endgroup\$
    – Tom S
    May 26, 2022 at 13:13

There are different aproach. You can implement an isolated system but you can also implement a ground references.

What is grounding? it is a potential you take as a references, the others potentials has a value with regards it.

There are 2 types of ground. The service ground and the protective ground. The services ground is the source's potential you refers to earth or a common conductor, the others potentials will have a value with respect to this common conductor. Keep in mind that what matters is the potential difference. For example, if we have 2 batteries and one of them we connect the positive to ground and the other the negative to ground. The first will have a negative potential difference at electrode with respect to ground, and the second will have a positive potential different. YOU HAVE TO TAKE CARE OF THIS POTENTIAL DIFERENCES.

On the other hand, if you connect the positive to ground to both batteries, both will have a negative potential difference and you can connect them in parallel without problem.

Does anyone have any suggestions for components that have a kind of isolated voltage input (something which can have its own independent ground reference for the input)

Regarding the voltage measurement, knowing that the ground is our potential that we take as reference, the reference of the ADC has to be connected to the ground.

If we have an isolated system with multiple sources, the ADC will have a reading based on the potential difference between the ADC ground and the ADC input.What is the problem here? is that if you have many isolated sources, the ADC must have a ground (voltage reference) with respect to one of these sources. If you want to measure voltages in several sources, the adc must share a voltage reference between all of them, so there you would be implementing a system that is not isolated but has a common reference. The ADC will not measure anything if you connect the ground of the adc to the negative of a source and you want to measure a potential of another source isolated from the first.


Differential probes can measure a different ground reference and both positive and negative signals (but to stick the signal into a unipolar system you will have to bias the output from the probe) without isolation:

They basically work squishing down the entire signal via a voltage divider such that it now fits within the input range of the hardware. It then runs the signal through a differential amplifier to extract the voltage difference by removing the common mode and reamplifying the difference to the full input range of the receiving hardware.

It' not quite as robust as an isolated system in that the difference between the grounds needs to fit within the input range of the probe, but it has better bandwidth than an isolated probe/

This link goes into detail about how to build one and how it works: https://circuitcellar.com/research-design-hub/high-voltage-differential-probe/


Your Answer

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

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