Posts: 28
Joined: Fri Mar 15, 2019 10:46 pm

Resistor Question

Mon Apr 15, 2019 4:42 pm

I am looking at purchasing this board to use as a kind of input buffer in my project. I want to employ sensors (micro switches) to check the open/closed state of several doors and to take input from motion sensors. These boards have 3k resistors (according to the schematics) on both ends so I wanted to make sure 3k was enough for the pi. I plan on powering these externally. Thanks!

User avatar
Posts: 6100
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Resistor Question

Mon Apr 15, 2019 5:58 pm

The schematic isn't quite as useful as it might be:
wr.jpg (25.23 KiB) Viewed 219 times
But the resistors are there on the input side to protect the LED in the optoisolator; it depends on the voltage you're going to use on the driving side.

The resistors on the output side are pull-ups, though quite where the output connection is, isn't clear!
3K is quite adequate - anywhere from 300R to 30k would do equally well, in all probability

Posts: 9926
Joined: Wed Jan 25, 2012 6:39 pm

Re: Resistor Question

Mon Apr 15, 2019 7:31 pm

Looks like the two output terminals are the output pins of the optocoupler - collector and emitter of the internal phototransistor.

With the jumper on, use the collector as output and you have a low to ground when the opto is on.

With the jumper off, use the emitter as output and you have a pullup to positive volts when the opto is on. But you should also configure the RPi GPIO with internal pulldown.

Posts: 28
Joined: Fri Mar 15, 2019 10:46 pm

Re: Resistor Question

Tue Apr 16, 2019 1:37 pm

That is good news. I didn't want to hack in a bunch of resistors. :ugeek: I'm going to drive the PI side with 3.3vdc from a buck transformer. The input side is going to be mixing a bunch of voltages (all DC) from 5 volts (microswitch) to 24 volts (the motion sensor requires 24vdc) Since each 'lane' is isolated I can make mix it up a little. :mrgreen:

PS - Once this is all done I'll make a big post about my project to share with everyone including my code... I think you all will find it cool.

Return to “Beginners”