I'm upgrading the interior lights on an older model vehicle. The plan is to tap into the very simple lighting circuit (always hot with a switch for on-off-door) to detect each scenario. Light switch on, stock lights come on = Arduino does something; Light switch in door position and doors open = stock lights come on, Arduino does something different.
In response to a similar question a few years ago, Phil Frost uploaded the following diagram, which uses a pull-up resistor before the optocoupler:
I would like to modify this circuit, such that current only flows on the Arduino side if it is also flowing on the 12V side. Here's what I've come up with:
There are a lot of other details to this project, but the questions I have are just regarding this circuit:
- Will this work just as well as the original?
- Is there any benefit to using the modified version over the original?