I'm having problems with local hoodlums nicking the spotties of my 4wd.
Given no car alarm has a feature to monitor if my spotties are still electrically connected I thought I would build my own with an arduino in the center.
So the alarm part is simple, but I am a little stumped on the best way to check the spotties are still part of the circuit; as a simple continuity test would expose the arduino pins to the 12v battery power when the lights are turned on.
So I need to test if a circuit is closed, the circuit may or may not be carrying power, and of course the test can not interfere with the car electronics in any way.
I'd run a wire from an Arduino pin to the lights and back to the Arduino ground doing nothing more than making a complete circuit. Make it only look like it's part of the light's wiring. It will basically act like a closed switch which they will open when cutting the wires or unplugging the lights. That way you avoid your light's wiring entirely.
I was thinking about wiring a large value R [maybe 100K-220K] from the 12V battery to the lamp, so
bypassing the normal switch. This will run a tiny tiny current through the lamp constantly. Then monitor
the voltage across the lamp using an Arduino pin [digital or A/D works], using a 12:5 [or better 15:5]
voltage divider, eg 100K:33K.
Zoomcat already suggested using a diode to prevent the Arduino being back-fed by the lamp when it was turned on. All you need is a digital input with a pullup resistor which is connected to the spotlamp +ve via a diode so that the lamp acts as a pull-down resistor. Presumably your Arduino is going to drive some sort of alarm output which suggests you may be wiring an output through a transistor. If you're up for that sort of thing, I expect you could actually eliminate the Arduino entirely and use your pull-down circuit to turn on a transistor directly.
The arduino may seem like over-kill but the system also needs logic like:
-turn off after 30 seconds so as not to drain the battery or annoy the neighborhood after the spotties are long gone.
-keep alarm going for 30 seconds if spotttie is immediately plugged in.
And besides, once I wire in an arduino, I have a platform ready for other car related projects.
I appreciate the diagram heaps boffin1; I am starting to get an idea of how to approach the problem now. For some reason I hit a massive mental blank approaching this problem and this stream of ideas has cleared that, so again thanks