I have a 12V signals that I need to get to PIC port.
The thing is that I would like NOT gate. Meaning that when there will be voltage present on foto diode there will be no voltage on PIC input and vice versa.
Will ILQ5 optocoupler be fine. Can I use below schem found in datasheet, and I use 1kohm resistor?
what about this one ACPL-847-W00E? It's four chanel cost half €, compared to ILQ5 that cost 4 times more.
Slightly off topic question. Should I use optocoupler, voltage divider (2 resistors), or zener diode to bring slightly fluctant signal (round 12V) with possible spikes to the controler's input? The application will be in a car electrical system - spikes at cranking.
If you need to isolate microcontroller from the car’s ground then an optocoupler is the answer, otherwise you can just use a resistor with a Zener diode .. see this url:
**broken link removed**
If cost is a factor, look at 4N35.
At Mouser, each is $0.21 and $0.13/pc for 1000 pieces. Have a look at it.
Another common one is PC817.
Overhere in Bangladesh, each 4N35 is $0.2 and each PC817 is $0.1