Page 1 of 1

Resistor Question

Posted: Mon Apr 15, 2019 4:42 pm
by walterwoj
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!

Re: Resistor Question

Posted: Mon Apr 15, 2019 5:58 pm
by Burngate
The schematic isn't quite as useful as it might be:
wr.jpg
wr.jpg (25.23 KiB) Viewed 209 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

Re: Resistor Question

Posted: Mon Apr 15, 2019 7:31 pm
by drgeoff
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.

Re: Resistor Question

Posted: Tue Apr 16, 2019 1:37 pm
by walterwoj
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.