A Optocoupler also called a photocoupler, optical isolator or opto-isolator is a small chip that transfers signals between two isolated circuits using light. A basic optocoupler uses a led and a phototransistor, the brighter the led the more current is allowed to pass through the phototransistor. For more info on how optocouplers work check out this link ( OPTOCOUPLER )...
In this instructable I will show you how to isolate and control the speed of a 12v PC fan with your ARDUINO board, This circuit could be used to control many things with minor modifications to the circuit.
IR diode’s anode
IR diode’s cathode