A circuit for isolating a variable resistor is shown. An optoisolator that has an LED arid a photo-conductive cell (or photoresistor) is used. The current through the LED controls its brightness, which in turn determines the resistance between terminals A and B. The LED current is set by the voltage of the dc power supply and the value of the two resistors (Rl and R2), The fixed resistor (Rl) is used to limit the current to a maximum of 20 mA (when the resistance of the potentiometer, is set to zero ohms), otherwise, the LED might burn out.
Very heavy hmdx, which can`t be powered directh by an optoisolator, might require the use of a rela as shown in A. You can sometimes i;el a way with using a circuit like that shown in B, hut it won`t turn itself off.