We're about to build the circuit illustrated in the following diagram. This circuit uses the PC817 optocoupler to electrically isolate our Raspberry Pi and the LED subcircuit:
Figure 7.7 – Optocoupler circuit
The step numbers here match the numbered black circles in Figure 7.7:
- Place the LED into your breadboard, taking care to orientate the LED as illustrated regarding its cathode leg.
- Place a 1kΩ resistor into the breadboard. One end of this resistor connects inline with the cathode leg of the LED.
- Place the PC817 Optocoupler IC into your breadboard. The white dot on the IC indicates pin number 1 of the IC. Your IC may have or not have the white dot, however, there should be a distinct marking on the IC to tell you the first pin. Please refer back to Figure 7.6 for all pin numberings.
- Place a 1kΩ resistor into your breadboard. One end of this resistor connects with pin 1 of the PC817.
- Connect the anode leg...