Hey, let's dig up this :P
So I'm doing a project where I'll hook up the arduino power to 12v, from the car lighter. In my project I'll have a 7805 voltage regulator, so it will break down the 12v to 5v.
I'll use 12v to power the arduino. And the 5v from the voltage regulator to a sliding switch that I'll read as input on a digital pin.
I'm afraid that over-voltage can occur on the digital input, so I was thinking about protecting the digital pin with the following circuit:
that I've read from this link:
Is this a good way to protect it?