Question One
Working on inputting signal from a PIR (passive infrared motion detector) through an
optocoupler to an Arduino. The optocoupler is a PC817.
Can the input pins on the Arduino take 12 volts? Have looked everywhere for this spec. There is lots about how much voltage is allowed to power the Arduino Uno itself but can't find a spec on maximum voltage the Arduino input can take without damage. Is twelve volts too much? Is a resistor needed to reduce the voltage to the Arduino input pin?
Question Two
How does one search for info on the Arduino forum?
Is that your schematic? A look at the data sheet for the opto would suggest a circuit or two that wou,d be more plausible or even complete and not already headed in the wrong direction.
The input pins are limited to 5 volts assuming you are using a 5 volt Arduino.
The opto can work, on the Arduino side, with just 5 volts. Again, the data sheet is your friend.
Remove the existing signal to the Arduino. Replace the 12 volt supply to R3 with 5 volts, from wherever. Place a ground connection between the Arduino ground and the E emitter of the opto and takes you signal input from the C collector of the opto.
Expect your signal to go LOW when the LEDs light up.
Question One
Working on inputting signal from a PIR (passive infrared motion detector) through an
optocoupler to an Arduino. The optocoupler is a PC817.
Can the input pins on the Arduino take 12 volts? Have looked everywhere for this spec. There is lots about how much voltage is allowed to power the Arduino Uno itself but can't find a spec on maximum voltage the Arduino input can take without damage. Is twelve volts too much? Is a resistor needed to reduce the voltage to the Arduino input pin?
Question Two
How does one search for info on the Arduino forum?
Thanks.
Allen Pitts, Dallas TX
What you are asking for can be found in either the documentation of development board that you are using. If it's a bare chip you can find the information in the datasheet, usually under electrical characteristics.
Though I think it's pretty safe to assume that 12V is too much in your case, unless you have some specific rugged/industrial version.
alto777:
Remove the existing signal to the Arduino. Replace the 12 volt supply to R3 with 5 volts, from wherever. Place a ground connection between the Arduino ground and the E emitter of the opto and takes you signal input from the C collector of the opto.
This. And Q1 is the wrong way around and needs a current limiting resistor on the base.
Seems over complicated.
Why don't you remove all the parts, and connect the opto LED directly to the PIR output/ground and the opto transistor between Arduino pin and Arduino ground.
Don't use any resistor. The PIR already has a 1k current limiting resistor built-in.
Use pull up on the Arduino input pin, and drive the indicator LED from another Arduino pin.
Leo..