How do devices archieve floating voltage?

What I mean by this is that how can the difference between two points can remain at the same voltage,for example always having a difference of 24v between two points,even although one of them is touching the ground.So let there be two points A and B.
One of them (A) has a voltage difference of 12 V regarding the ground,the other (B) has a voltage difference of -12 V regarding the ground.If A or B touches the ground their voltage difference,between them is still going to be 24V,how is that archieved?
 
A voltage measurement is inherently a differential measurement, the difference in potential between point A and point B, red probe (+) with respect to the black (COM) probe.

It's easier to make voltage measurements 'above or below' ground with a battery powered, plastic-cased voltmeter because such a voltmeter 'floats and does not reference a ground potential itself.
 
Although this is an older post, I thought I'd comment as I didn't feel the original question was really covered. If a 24 volt dc system is operated ungrounded, there is often a ground detection system installed. These will have two relatively high impedance relays or other ground detecting loads connected in series across the load. The center point of these two loads will be connected to ground. This places 1/2 of the supply voltage across each load. The positive side will be +12 volts above the ground reference while the negative side will be 12 volts below the ground reference. If the positive side of the system should accidentally become grounded the positive side relay will be de-energized as both sides of this relay are at the same ground potential and the negative side will receive the full 24 volts. Likewise if the other side becomes grounded instead, then the relays reverse.
Another way you can get the measurement to ground on an ungrounded system is with just surface leakage (dirty battery for example). Of course this is less likely to be + and - 12 voltage, unless the leakage to ground is in the middle of the battery string.
Hope this helps someone with a similar question.
 
Water pressure.jpgJust thought I'd add my two cents worth, inspired by someone who used a water analogy on another thread. See my quick pencil sketch.

Measuring voltage is like measuring pressure. You're measuring the difference between two points. One of those points may, or may not, be at ground (the potential of earth). In the sketch, the water pressure difference is measured at three different places. One is higher than ground, one is centered above and below ground, the last is entirely below ground. The pressure difference (similar to voltage) is the same at all three levels. The voltage with respect to ground, of course, is not.

Hope this helps.
 
Devices that achieve floating voltage typically use battery cells designed to be discharged and recharged repeatedly. This is done using a control algorithm that alternates the current supply between the charging and discharging currents. When achieving a stable power output, this method is usually more reliable than traditional batteries with a finite number of charges.
 
Devices can achieve floating voltage through a variety of techniques. Here are some examples.

  1. Isolation transformers: Isolation transformers can create a floating voltage. The transformer separates the input and output circuits electrically, creating a floating voltage at the output.
  2. Voltage regulators: Some voltage regulators, such as linear regulators, can create a floating voltage by regulating the output voltage relative to a reference voltage. This allows the output voltage to be independent of the input voltage.
  3. Op-amps: Operational amplifiers (OP-amps) can create a floating voltage by amplifying the difference between two input voltages. By connecting the two input voltages to two different reference voltages, the output can be made to float at a voltage between the two reference voltages.
  4. Battery-powered devices: Battery-powered devices can create a floating voltage by using the battery's voltage as a reference voltage. As long as the device is not connected to other circuits, the battery voltage will float relative to ground.
Overall, there are many ways to achieve floating voltage, depending on the specific requirements of the application.
 
This is done with a system of capacitors and resistors that balance the voltage between the two points to keep the desired voltage difference, even when one point is grounded.
 
Top