My background in electronics is limited
Are you using a switching power supply for the project?
What voltage are you applying to the Arduino input pin?
On an automobile, the 12 storage battery smooths out the pulses, which are the rectified signal from the 3-phase alternator. If you don't have the battery, then you need the equivalent: a very large capacitor.Paul
I'm experienced in electronics, less so in the programming. However what comes to mind is just using a debounce routine.Cleaning the signal up electronically could be done with an electrolytic capacitor at the 12V signal input.
You are seeing the result of the charging regulator built into your alternator. It charges the battery just fine with pulses. Find one without the builtin regulator. But then you will see voltages up to 16 or more volts.Paul
Where in your post do you identify exactly where the 12 V is coming from ?
The ~12V source is an automotive lamp.
To achieve that, I would use a 47uF capacitor and 33 ohm resister.
A lamp is a load, not a source.Are you tapping off a lamp connector to obtain the 12V?
Why such a small resistor ? How much current do you need ?