Simple circuit to detect open gate

Thread Starter

nchron

Joined Oct 24, 2016
1
Hello all,

I hope everyone is well and I thank you in advance for your assistance.

I am a newbie electronics enthusiast and have created a simple circuit which simply lights an LED when the gate in our yard is closed, but I wish to make it a little better and I was hoping you could help me.

The existing circuit is this. I have a small board containing an LED, a resistor and a button. This is wired up to 50' of (16 gauge I think) solid core wire [telephone wire] this is powered with a 9v battery. The telephone wire is connected to the gate and the latch. When the gate is closed and the button is pushed, the LED lights up. So, this works as intended but I am desiring something a little more....

I want to have a 2nd LED circuit in this that lights up when the gate is open (the existing circuit is open). I hope this makes sense so far.

I desire 1 of 2 outcomes ... 1st is button gets pressed and the gate outside is closed = green light on (existing LED) ... the 2nd is button gets pressed and the gate outside is open, a red LED turns on (new circuit I don't know how to create).

Here is the existing circuit .
upload_2016-10-24_23-18-45.png

I feel like I need to create another circuit with the other LED that essentially shorts to ground when the existing circuit is closed. I just don't know how to create this. Any advice would be helpful. Thanks in advance.

Nathan
 

crutschow

Joined Mar 14, 2008
30,147
If you want more info than just the opposite of the green light being on (in other words, you want fail-safe verification that the circuit is still complete to the gate), you will need some additional circuitry.
Here's my idea, shown in the Ltspice simulation below:

You add a 600Ω resistor across the gate switch to provide some current, giving a continuity check when the gate is open.
This current turns on the Red LED, D2.
Zener D1 keeps Q1and Q2 from turning on for that low current.
When the gate switch is closed, the full voltage is applied, which then turns on Q1 and the Green LED, D3.
Q2 is also turned on, which shunts the current away from D2 and turns it off.
(Note: I didn't show the momentary switch in series with the battery to energize the circuit).

Does that sound like about what you want?

upload_2016-10-25_1-7-2.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,244
Hello all,

I hope everyone is well and I thank you in advance for your assistance.

I am a newbie electronics enthusiast and have created a simple circuit which simply lights an LED when the gate in our yard is closed, but I wish to make it a little better and I was hoping you could help me.

The existing circuit is this. I have a small board containing an LED, a resistor and a button. This is wired up to 50' of (16 gauge I think) solid core wire [telephone wire] this is powered with a 9v battery. The telephone wire is connected to the gate and the latch. When the gate is closed and the button is pushed, the LED lights up. So, this works as intended but I am desiring something a little more....
What happens when you release the button and the gate is closed? Does the LED stay on?

I want to have a 2nd LED circuit in this that lights up when the gate is open (the existing circuit is open). I hope this makes sense so far.

I desire 1 of 2 outcomes ... 1st is button gets pressed and the gate outside is closed = green light on (existing LED) ... the 2nd is button gets pressed and the gate outside is open, a red LED turns on (new circuit I don't know how to create).
Are the buttons momentary action?
Do you want the LEDs to stay on in both outcomes?
 

crutschow

Joined Mar 14, 2008
30,147
.......
A simple solution is to use an SPDT switch.
That presumes there are extra wires available, which there may be in the telephone wire he is using.

Also requires the addition of a switch, whereas I think he is presently just using the continuity across the latch contact to detect the gate being closed.
 

crutschow

Joined Mar 14, 2008
30,147
hi nc,
If you could accept the normal colour convention, ie: Green = Go or Access and Red =Stop or No Access you could use this circuit.
A really simple circuit, but it doesn't differentiate between an open circuit and an open gate, which may or may not be needed.
 

AnalogKid

Joined Aug 1, 2013
10,102
Ericgibbs beat me to it. His drawing in post #7 is almost there (IMnsHO). His right hand schematic is the easiest way to go, except...

For standard little 3 mm and 5 mm LEDs, common forward voltage drops are around 1.8-2.0 V for Red and 2.0-2.2 V for green. These are too close together to discriminate themselves reliably. But if you place a single diode(1N4148 signal diode, 1N4004 rectifier, etc.) in series with the Green LED, that extra Vf is enough to make the two devices switch cleanly.

You might have to swap the LEDs to get the indicating action you want, but either way, the extra diode goes in series with the LED that is connected directly to the battery neg.

ak
 

ericgibbs

Joined Jan 29, 2010
15,746
Hi Analog,
I considered using a higher working voltage Green LED, as you know they are available, failing that, say a second Green LED in series.
GMTA as they say...;)
Eric
 

Attachments

Top