Power and data over 2 wires
In the transmitting device, power and data are transmitted simultaneous as voltages over 1 wire using an inductor L1 to pass the DC component and a capacitor C1 to pass the AC component to the same wire. The inductor L1 forms a very low impedance for DC, so it will pass the DC VOLTAGE IN and meanwhile it forms a high impedance for AC, so it will prevent the DATA IN signal from interfering with the DC VOLTAGE IN. The capacitor C1 forms a very low impedance for AC, so it will pass the DATA IN and meanwhile it forms a high impedance for DC, so it will block the DC VOLTAGE IN via L1 from interfering with the DATA IN. The AC data is superimposed on the DC voltage and transmitted over the wire.
In the receiving device, the AC and DC component are separated. L2 forms a low impedance for DC and a high impedance for AC, so it will only pass the DC component to the output : DC VOLTAGE OUT. C2 forms a low impedance for AC and a high impedance for DC, so it will only pass the AC component to the output : DATA OUT.
The second wire is the ground return path.
The direction of the communication can be reversed, meaning that the receiving device can transmit data and the transmitting device will receive this data. However, the communication can only be half-duplex and not full duplex, because it is not possible to receive and transmit data simultaneous over the same wire.
In the figure above, current (Idata) is used to transfer data from the right device to the left device, while the left device delivers the power over the same wire to the right device. When DATA IN is low, a current flows from DC VOLTAGE IN to DATA IN, through Rsense and R3. The value of R3 determines how much current will flow. This current causes a voltage drop over Rsense, which is measured by the comparator U1. The threshold level at which the comparator output will go low is determined by the values of R1 and R2. When no or a low current flows, the comparator output will be high, because then it's positive input is higher than it's negative input. When the current increases, the voltage drop over Rsense increases, so the voltage at the positive input of the comparator will decrease till the point where the positive input is lower than the negative input, causing the comparator output to go low.
So U1, R1, R2, RSense form a current detector and R3 translates the level of DATA IN to a current.
The current Idc drawn from DC VOLTAGE OUT will also flow through Rsense, so the total current = Idata + Idc.
Idc should be much smaller than Idata, so it will not trigger the current detector.