Reading a floating dc voltage

Hi everyone it's Drew here.

I'm very new to microcontrollers and just need to know here to start. At the moment I have a variable floating voltage input which I will regulate from 0 to 5 volts dc depending on circuit configuration. This voltage is on a single wire sent from a dc amplifier. I'm wanting to convert these variable voltages into a scaled digital display. Eg 4 volts = .35ohm. Is it possible to measure a floating dc voltage as a analogue input or any other way? If so how would I go about it?

Thanks

Drew

Is it possible to measure a floating dc voltage as a analogue input or any other way?

No.

The term voltage is more accurately potential difference. If there is only one wire there is no difference. The concept of measuring nothing does not make sense.

There must be a common ground connection to define 0 volts potential.

And also I believe your use of the word 'floating' is improper. You say an external voltage has a voltage of some value, therefore it's not a 'floating' voltage, perhaps you meant a variable DC voltage?

What about measuring a voltage that can't have a common ground with the Arduino - for example the voltage across a shunt?

I only started thinking about this yesterday and I think the answer is to use an OpAmp as a differential amplifier? I haven't got round to doing anything about it yet.

...R

What about measuring a voltage that can't have a common ground with the Arduino - for example the voltage across a shunt?

Fine although you are not measuring a voltage you are measuring a current and you are making the arduino's ground common with the external circuit. But this is not the same as a floating voltage, if no current flows then there is no measurement. And if the voltage is floating then ther can be no current.

Voltages are DIFFERENCES. You have a couple of possibilities:

  • if you have just one wire, there is not a voltage you can measure reliably
  • if you have two wires (maybe one is implicit, e.g. your source device’s frame-ground) and one of them can be connected to the Arduino ground, you’re all set. Go measure the voltage.
  • if you have two wires and they are at some other potential (e.g. +20V or something, the classic example being a high-side shunt measurement) then it gets much harder.

In the third case, you can either:

  • use an opamp or three as an instrument amplifier only if you know that the total offset between the signal pair and ADC analogue-ground is within the common-mode range of your opamps (maybe 15V or so is reasonable), and then you need to worry about CMRR, or
  • wire the ADC (might be arduino, might be something smaller) up to the high voltage, insulate it very well, run it off an isolated power supply (see those $10 isolated 5V-5V or 12V-5V DC-DC chips; they’re very useful) and send your digital outputs over an opto-isolated serial connection.

Need a lot more info…

polyglot: - wire the ADC (might be arduino, might be something smaller) up to the high voltage, insulate it very well, run it off an isolated power supply (see those $10 isolated 5V-5V or 12V-5V DC-DC chips; they're very useful) and send your digital outputs over an opto-isolated serial connection.

This is an interesting idea. My possible project is a high-side shunt for solar panels feeding a 12v lead acid battery. I would need to power the Arduino from the same battery.

...R

Why does it need to be high-side?