piBeacon: 23 - optical isolated input to GPIO

Posted on
Sat Jun 27, 2020 12:58 pm
kw123 offline
User avatar
Posts: 7085
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: 23 - optical isolated input to GPIO

here a circuit for an opto coupler input to a RPI-GPIO
connect
GND --> ground on RPI
OUT1--> GPIO
the RPI has to be configured with the pull-up resistor you select in device edit
Screen Shot 2020-07-05 at 21.49.48.png
Screen Shot 2020-07-05 at 21.49.48.png (250.48 KiB) Viewed 35 times

And the input side goes to a switch with supplied voltage Vin (switch open: Vin=0, closed Vin=X) . The LED needs ~5-20mA to switch on fast
Values for R for different voltages Vin (the internal LED has a voltage drop of ~ 2.5V itself ):
12V: ~2k -470 Ohm ((12-2.5)V/0.005 /0.02A)
5V: ~500-120 Ohm ((5-2.5)V/0.005 /0.02A)
3V: ~100-25 Ohm ((3-2.5)V/0.005 /0.02A )


Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron