Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Detect switch closure in live circuit

Status
Not open for further replies.

Schmez

New Member
I am trying to detect when a switch is closed to trigger a relay that will then power the circuit. I cannot seem to utilize the switch for the dual purpose.

I have a power relay (12v) that is before a switch that then turns on relays. I want to turn on the power relay when I detect the switch is turned on - thus providing 12v power through the switch and to the relays.

This is part of a bigger project. The power relay will be turned on and off via a transistor and when detecting the closure of the switch, I cannot put 12v on the line - do not want the relays to energize - that is where the power relay comes in.

Below is the drawing for the configuration - i cannot change this - seems that I am just over-thinking this whole thing. I appreciate any comments.
Thank you.
 

Attachments

  • SwitchDetect.JPG
    SwitchDetect.JPG
    29.8 KB · Views: 177
Is it possible to change the switch to a double-pole switch so you can use one of the poles to sense the switch position?
 
Shouldn't the 12V+ terminal connect to something?
One way to detect closure of the switch would be to connect a high-value resistor across it; high enough that current through it would be much less than the operating coil current of the relays.
 
Last edited:
Is it possible to change the switch to a double-pole switch so you can use one of the poles to sense the switch position?

No - this is the circuit to a ignition system basically. The key switch is being replaced with a key card reader - want to use the run switch to turn on the reader and then that will energize the power relay but the run switch must stay on as well.
 
Shouldn't the 12V+ terminal connect to something?
One way to detect closure of the switch would be to connect a high-value resistor across it; high enough that current through it would be much less than the operating coil current of the relays.

I have been playing with that but once the circuit is energized voltage drops out I believe. What would the rest of the circuit look like in your mind?
 
You can monitor the voltage across the switch using a comparator.

Add a bias resistor from the +12V to the left side of the switch that would give give a small voltage (say a little over 0.5V) across the relay coil on the right (resistor value about 20 times the coil resistance). This will not affect relay operation.

Monitor the right side of the switch with a comparator (such as one in an LM139 quad comparator).
Connect 12V and ground to power the comparator.
Connect 0.5V from a voltage divider to the comparator negative input (24k from 12V to the negative input and 1k from the negative input to common).
Connect the positive input from the comparator to the right side of the switch.
Connect the comparator output to a 10k resistor that goes to +12V.
When the comparator input is at 0V the comparator output is low (0V) indicating the switch is open.
When the comparator input is above 0.5V (either from the bias resistor or +12V) the comparator output is high (+12V) indicating the switch is closed.
 
Last edited:
You can monitor the voltage across the switch using a comparator.

Add a bias resistor from the +12V to the left side of the switch that would give give a small voltage (say a little over 0.5V) across the relay coil on the right (resistor value about 20 times the coil resistance). This will not affect relay operation.

Monitor the right side of the switch with a comparator (such as one in an LM139 quad comparator).
Connect 12V and ground to power the comparator.
Connect 0.5V from a voltage divider to the comparator negative input (24k from 12V to the negative input and 1k from the negative input to common).
Connect the positive input from the comparator to the right side of the switch.
Connect the comparator output to a 10k resistor that goes to +12V.
When the comparator input is at 0V the comparator output is low (0V) indicating the switch is open.
When the comparator input is above 0.5V (either from the bias resistor or +12V) the comparator output is high (+12V) indicating the switch is closed.

This is great - thank you. Right now all looks good - I appreciate you help. I will wire it up tomorrow.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top