Reader small image

You're reading from  Practical Python Programming for IoT

Product typeBook
Published inNov 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838982461
Edition1st Edition
Languages
Right arrow

Building the optocoupler circuit

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:

  1. Place the LED into your breadboard, taking care to orientate the LED as illustrated regarding its cathode leg.
  2. Place a 1kΩ resistor into the breadboard. One end of this resistor connects inline with the cathode leg of the LED.
  3. 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.
  4. Place a 1kΩ resistor into your breadboard. One end of this resistor connects with pin 1 of the PC817.
  5. Connect the anode leg...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Python Programming for IoT
Published in: Nov 2020Publisher: PacktISBN-13: 9781838982461