Figure 1 shows how a simple opto-isolator can be made using a small incandescent lamp and an LDR. This configuration can be used to isolate one block from another in a robotics or mechatronic project. For instance, the lamp can be driven by a low-voltage circuit, and the LDR can be used to control a high-voltage circuit.
Both LDR and the lamp, must be installed inside an opaque enclosure to avoid the incluence of the ambient light. Any small lamp with currents in the range between 10 and 500 mA can be used. You can also use neon lamps in series with a 100 kΩ resistor to drive the circuit from the ac power line. In the 220/240 Vac power line, place a 220 kΩ resistor in series with the lamp. In the figure, we indicate blocks that can be driven by this circuit.