Help Circuit to detect switch opperating

Discussion in 'The Projects Forum' started by Pope John, Jan 11, 2008.

  1. Pope John

    Thread Starter New Member

    Jan 11, 2008
    6
    0
    I want to detect when a switch is opening or closing for an alarm circuit.

    I saw a working circuit to do just that many years ago but I can not recall exactly how it went. Think it used one 4069 inverter and a 4011 NAND as in the circuit attached. I would appreciate any help to get a simple workable circuit.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Greetings Pope John,

    I have deleted your earlier posting in a pre-existing thread.

    We prefer that you initiate your own threads as you have done here rather than inject your topic into an active thread. This has a two-fold benefit. It avoids disruption in the flow of the existing thread and the new thread gives your request the individual attention it deserves.

    Welcome to the AAC forum, I hope you enjoy your experience interacting with our knowledgable members. Since this is your first visit, I would direct you to the wealth of informaiton in the AAC ebook at www.allaboutcircuits.com. It is a good place to turn when you encounter an unfamiliar concept. The material it contains is structured in such a way as to permit the reader to search it for specific information. If you are just beginning to develop an interest in the world of electronics, you can quickly come up to speed by starting with Volume 1. It is a work in progress so there are gaps in the material but on the whole it is a rich source of information.

    Enjoy your AAC experience,
    hgmjr (Moderator)
     
  3. Pope John

    Thread Starter New Member

    Jan 11, 2008
    6
    0
    Moderator hgmjr

    Yes I realised that I had put my request in the wrong place

    Spent some time looking for a way to open a new thread
    It is not so obvious to a first timer to find that but after reading through the e-book I discovered that this site has a wealth of useful and well explained data that would be very helpful to anyone interested in electronics. Not too much maths and a lot of practical information I love it!

    Look forward to a lot more visits to this site

    John
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Glad you have found the website and discovered the ebook.

    As for your particular circuit attachment, I have looked over your schematic (thanks for supplying an attachment by the way, that can prove invaluable when it comes to assisting you with your question) and it appears to be a straightforward switch interface circuit.

    It looks to me like the circuit has two separate functions that it is performing. One NAND gate (output on pin 4 or 10) is being used as a power up reset generator with the length of the reset pulse set by the components C1 and R3. The other NAND gate (output on pin 3 or 11) is used to monitor the reed switch.

    Based on the arrangement of the two diodes, C2, and R4 I would imagine that the reed switch is of the normally-open type.

    The two diodes form what is commonly referred to as a diode OR circuit. That means that if either of the NAND gate's output is low, then the 555 timer's reset pin will be low reseting the 555 timer. As long as the reed switch is closed the 555 timer will be held in the reset state. I strongly suspect that the reed switch is only momentarily closed when a magnet is brought into proximity of the reed switch.

    If I understand your question, you are looking for a circuit that produces a pulse to trigger the alarm briefly when the switch closes and then you want another pulse to trigger the same alarm briefly when the switch opens. Can you tell me if I have understood your question correctly before we proceed?

    hgmjr
     
  5. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Most of the alarms I've worked on have a resistor in parallel with the switch. The switch will short across the resistor in alarm condition. In a "trouble" condition (conductors open) the system will fail to see the resistor.

    This can be accomplished by hooking one side of the switch to ground and monitoring the other side. Ground out means "alarm." One voltage out means "normal" and a different one means "trouble." A dual voltage comparator can generate logic for "trouble" and "normal," and the ground for "alarm" can be used as-is.
     
  6. Pope John

    Thread Starter New Member

    Jan 11, 2008
    6
    0
    hgmjr

    Thank you for your reply.

    What you have said is substantially correct. The switch is a garden variety reed switch or any mechanical switch or contact. Not a momentary switch.
    You have understood my question correctly. I want to generate a momentary low at the output to trigger a 555 timer to sound a short alarm when the switch is opened. Also when the switch is closed the same alarm.

    The duplication in the pin numbering is because there are enough gates in the two chips to do the thing twice and have two doors alarmed in this way.

    If the switch is open then C1 should be charged via R3 and R2. Pin 1 on 4069 would be low. pin 1 on 4011 would be low. Pin 3 and pin 4 on 4011 high and no trigger for the 555

    When the switch is closed C1 should discharge as R1 and R3 have shorted it.
    Therefore if R2 was several times larger than R3 pin 1 on 4069 would see a high and pin 1 on 4011 would still see a high for some short period as C1 discharged. So pin 1 and pin s2 on the NAND would both be high and pin 3 would go low. The desired output - a low on D1.

    Now with the switch closed C1 would charge again via R2 and R3 so pin 1 on 4069 would go low again and the output would be high to the 555.

    When the switch is opened pin 5 on the 4011 would be high and pin 4 on 4069 would be high therefore pin 4 on 4011 would go low to draw current through the second diode and put a brief low onto the 555 input

    At least that is the theory

    Can you make sense with any of that?

    Thank you for the help. I have built a breadboard circuit of the input R C network and that seems to work well. It is only when the IC chips are connected that things fail to cooperate.

    If you have any suggestions I would be grateful. Are there any differences in the IC or different characteristics because I have seen this circuit running many years ago and it is a mystery why it will not obey me now.

    I will look into the idea from thingmaker3 as an atlternative

    Thank you both
    John
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    It appears as though I mis-interpretted the schematic. I did not catch the fact that R3 is connected to the bottom of the reed-switch and the top of R2. I am accustomed to seeing a dot at the intersection of two signal lines that are intended to be connected.

    Your description of the circuit operation appears to be correct.

    hgmjr
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Can you provide us with the complete schematic and a few more details on how the circuit misbehaves?


    hgmjr
     
  9. Pope John

    Thread Starter New Member

    Jan 11, 2008
    6
    0
    hgmjr

    Too stupid to know it can’t be done !

    I want to detect when a switch is opening - OR - closing for an alarm circuit.

    The switch is a garden variety reed switch or any mechanical switch or contact. I want to generate a momentary low at the output to trigger a 555 timer to sound a short alarm when the switch is opened. Also when the switch is closed sound the same alarm.

    In other words a one second alarm when the switch changes state. There are enough gates in the two chips to do the thing twice and have two doors alarmed in this way.

    Here is the modified circuit that should work

    If the resistors and capacitor only is connected across a 12v supply –
    When the switch is closed A went HIGH immediately
    B went HIGH in about 7 seconds
    So for a short period
    B is HIGH A is below the trigger to flip the buffer
    So B is HIGH
    G is LOW
    After a couple of seconds B is HIGH and so G is HIGH

    When the switch is opened C went LOW immediately
    A went LOW in about 7 seconds
    So
    C is LOW
    E is HIGH
    A is HIGH for a short period
    F is HIGH
    H is LOW

    G or H being LOW will trigger a 555 timer and pick up alarm relay
    Alarm 1 Second

    GOT IT !!!!

    Thank you for the help. I have built a breadboard circuit of the input R C network and that seems to work well. It is only when the IC chips are inserted that things fail to cooperate.

    If you have any suggestions I would be grateful. Are there any differences in the IC or different characteristics because I have seen this circuit running many years ago and it is a mystery why it will not obey me now.

    The chips used were 4069 Hex Inverter and 4011 2 ip NAND
    Substitute integrated circuits do not seem to work

    John
     
Loading...