Arduino Central Locking State Monitor

Hi,

I am working a project that need to monitor the state of the central locking, Locked or Unlocked.

Circuit Works as below.

  • This circuit is 12V.
  • The lock and unlock wire are pulled to GND at rest.
  • When Lock is pressed the Unlock wire is pulled to GND and the Locked wire goes to 12v.
  • When Unlock is pressed the Lock wire is pulled to GND and the Unlocked wire goes to 12v.

I wanted to use octocouplers to feed these wires to the arduino as per attached. Will this work?

Unlocked.png

Locked.PNG

How to post an image
Unlocked.png
Locked.PNG

How much current do the opto-coupler LEDs need? Will 10kOhms provide that current?

I would put the opto-coupler transistor between the input and 0V and use the built in pull up resistors. You don't need the capacitors, if the signal needs debouncing you can do that in software.

With only 1mA in the opto coupler the output pullup resistor needs to be quite large, but I think 100k is
plenty, most opto-couplers have a current transfer ratio around 25% to 200%. And that capacitor is likely
to be necessary to prevent noise coupling to the high-impedance secondary side of the opto coupler - the
automotive environment can be very electrically noisy.

If going to use built-in pull-ups, I'd reduce the input resistor to 3k3 or so to up the opto coupler input
level.

I might consider some 100nF caps across the opto coupler inputs too in case there are inductive spikes
zinging around from the latch solenoids.

If I understand correctly, you would have something like the below when all wired up?

lock unlock opto.png

I believe this will blow the opto LEDs due to reverse biasing - 12V applied vs. 6V PRV.

Wired as below the most reverse voltage either LED would see would be the forward voltage drop of the other, well below 6V.

Happy to be proven wrong/corrected.

lock unlock opto.png

Hi Guys,

Thanks for the replies. I was thinking something like what dougp has suggested but was unsure of the implications. When I measure between either the Unlock or Lock wire and GND I measure 7v.