Alarm Contact


Closed Thread
Results 1 to 17 of 17

Thread: Alarm Contact

Hybrid View

  1. #1

    Default Alarm Contact

    Hi People I have a great Software and Hardware problem !
    I want to make one Alarm contact like in this photo:
    When I open the contact i need on the pic, state "Alarm",when i make a shortcircuit between the two wire i need the state "Sabotage".
    How can I do this ,I have tryed with Pot command but the entire system is too sensible.I dont know if I can connect like in the image direct to portA.
    I need the 10K Resistor while without resistor i have just one state ex. "Sabotage".
    In professional Alarm Ciruits they all use 10 K or 12 K Resistors.
    I need that the PIC recognize that a 10K resistor is on the portA.
    Please for help.
    Thanks !!!
    Bye Pesti
    Attached Images Attached Images  

  2. #2
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    Just put another 10K-resistor from PortA-Pin to Vdd.
    Then You can measure the voltage on the pin.

    >= 0,7 * Vdd - the circuit is broken (Switch is open)

    <= 0,3 * Vdd - the circuit is shortcut
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  3. #3
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Your description lost a little in the translation. Are you looking for two statyes out of your loop, or three? For two states, make your pin an input, and it it is on a port with weak pull up, enable it. If not, place a 47K resistor between the pin and B+. Drop the resistor to ground to 1K and when the switch is opened, the port will read high, when closed, it will read low.

    Hope this helps,
    Ron

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Hi,thanks for the help,
    Sorry my english is very bad,Yes what I mean is three states Switch is:
    Closed = Normal State,
    Open = Alarm State,
    Between the wires is a Shortcircuit = Sabotage

    I want that the PIC recognize when a 10 K is in the loop or not,when is not a 10 K then is alarm ,when i have on the port ~0 Ohm then is sabotage and when I have open loop then is Alarm.

    BigWumpus what commands I need to measure the voltage,what you mean with 0,3 and 0,7?

    Thanks a lot !!!
    I hope you can help me.
    Bye Pesti.
    Last edited by Pesticida; - 11th October 2005 at 18:26.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I think this is what BigWumpus meant. But the tolerances are a bit tighter than the 0.3 and 0.7 times VDD. Catches more hackers. And still leaves room for 5% (or worse) resistors.


    And, it's better to take a Reading when the system is Initialized, and use an even tighter tolerance from that reference point to determine if a TAMPER has occured.
    <br>
    Last edited by Darrel Taylor; - 13th October 2005 at 07:33.
    DT

  6. #6
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Good morning to all responding to this post.

    The purpose of an "end of line resistor" is to supervise the loop. What you are working on here is fine but the supervision resistor needs to go between the ground point and the switch. This way if the wiring to the switch gets scraped while installing or the staple goes thru the cable and shorts out the contact it will be detected properly. Most modern day systems use either 1K or 2.2K resistors as the EOLR. A few use 1.5K.

    BobK (31 years as alarm installer)

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Darrel's schematic:

    The components R1 and S1 are grouped into a dotted-line box,
    corresponding to a physical unit. (R1 is inside an enclosure with S1).

    * * *

    It dosen't matter on which contact of the switch S1 the resistor R1 is soldered.

    The system is secure only if the switch S1 and the resistor R1 are
    in the same enclosure and coated with resin. (One physical unit).

    If you put more than one switch in series on the same line, the system won't be secure.

    Code:
    Not secure system
    
    +5 --R2--┐
             |
    AN0 -----┴-----------S1--------S2-------S3---------S4R1--┐ 
                                                             |                                                 
    GND -----------------------------------------------------┘ 
    
    
    Secure system
    
    +5 --R2--┐
             |
    AN0 -----┴-----------------------------------------S1R1--┐ 
                                                             |                                                 
    GND -----------------------------------------------------┘
    
    (R2 is inside the microcontroller enclosure).
    Best regards,

    Luciano
    Last edited by Luciano; - 13th October 2005 at 17:14.

Similar Threads

  1. INT2 anomaly in DT_INTS-18??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th February 2010, 20:07
  2. Continuous Interrupts when using DT_INTS and an INCLUDE file
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th January 2010, 21:42
  3. DS1307 and a LED array, need ideas
    By peu in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 30th December 2009, 18:45
  4. Replies: 14
    Last Post: - 26th September 2007, 05:41
  5. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts