Thank you for your responses. As for my name, the name I wanted was already taken, so I used my kid's initials.
My original thought was to use a voltage divider setup with a filtering cap and a 5 volt zener in parallel with the cap going to ground. This way, the cap would filter out the ripple effects and the zener would protect the pic by regulating the input to 5 volts. As this is 12 volts from a vehicle, I'd like to protect the circuit as best as I can. This part of the circuit will not be detecting a momentary input. It's setup so that when it receives its input, it is constant, like a light switch. When the pic sees this, it goes into another routine until the input is removed.
With the optocoupler, if you have your resistor in place for the LED, any voltage spike would kill the LED. You could setup the same cap and zener across the LED portion of it, and this should provide the same protection, right? The zener would have to be a 12 volt zener though.
Tony
Bookmarks