Alarm Contact


Closed Thread
Results 1 to 17 of 17

Thread: Alarm Contact

  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.

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Thanks to all for the answers,but what command I now need to measure this Voltage I have a PIC16F870 with 20Mhz .
    What happend when i have a wire ~ 100-300 Meter long.
    I dont know how sensitive is a PIC controller.

    Thanks a lot People!!!

    Bye Pesti.

  9. #9


    Did you find this post helpful? Yes | No

    Default

    I think that I can use the Alarm circuit like on my draw !?

    I have three States,Cicuit :
    Magnetic Contact is closed: No Alarm (5K6 Ohm)
    Magnetic Contact is Open: Alarm (6K4 Ohm)
    Cable Tamper or Alarm Box Tamper is open : Sabotage
    ShortCircuit on the loop : Sabotage


    The Contacts are inside a door and on the Security side Zone.
    I think so is ok or ?
    Bye Pesti.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Well, I don't have 30 years experience at anything, except "Beer Processor". &nbsp; I just pour it in one end, and it comes out the other in about a half an hour. &nbsp; So, maybe I'm not the guy to listen too....but...


    It seems to me that most alarm systems are contained within the same perimeter that it is protecting. While the movies always seem to have a key element of the system located in an unsecured area where it can easily be defeated by cutting a couple wires and using some alligator clips. &nbsp; That's not very realistic.

    If any tampering is going to be done to the system, you would first have to breach the perimeter to get to the wiring in the first place. Which of course would set off the alarm.

    So, the time when the tampering occurs, is when then system is dis-armed, and people are walking around everywhere unchecked. If you can by-pass sensors during the day, you can come back at night and clean the place out.

    In the case of alarmbox.BMP in post #9, all you need to do is twist the two pairs of wires together, and your done.

    And, in Luciano's example, you can just bypass any switch with a short, and you're in.
    Code:
    Not secure system
    
    +5 --R2--+
             |
    AN0 -----------------S1--------S2-------S3---------S4R1--+ 
                        |__|      |__|     |__|              |                                                 
    GND -----------------------------------------------------+
    Personaly, I think you are better off using the original plan.

    And, you would use the ADCIN statement to read the input. I think that's what you're prior question was??
    DT

  11. #11
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Most alarm systems I've come across have a series Resistor in each Sensor. Attempt to bypass the Sensor (with Darrels aligator clips) and you unbalance the circuit setting the Alarm off. But hey, who am I to comment... I'm not thirty yet!

  12. #12


    Did you find this post helpful? Yes | No

    Red face Visual Basic Software

    Ok thanks people,now I know what i have to do.
    I made a Security Software in Visual Basic,for the moment for 4 Alarm Contact.
    I have work two week on this Software,the most lost time was on the PIC
    controller.

    Thanks !!!
    Bye Pesti
    Attached Images Attached Images  
    Last edited by Pesticida; - 14th October 2005 at 16:02.

  13. #13
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default

    I think this was from Forrest Mims. Intelligent Alarm.

    Alarm resisters of different values in series.
    Each window/door if opened closes across a resistor?
    Total resistance (Pic AD) indicates which resistor is shorted.
    Even with combinations of resisters shorted it can be determined which windows are opened.
    Tamper is if not one of the combinations.

    Norm

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


    Did you find this post helpful? Yes | No

    Default

    Hi,

    What about an alarm system based on RS-485 supporting up to 32 devices (even 128)
    with maximal network length of up to 1500m?

    With the master PIC you could:

    - Query the status of the slave PIC.
    - Reset the alarm status of the slave PIC.
    - Turn the light on and off inside the room via slave PIC.
    - .....
    - .....

    Also with the VB program talking to the master PIC via RS-232 you could
    dynamically define areas which are protected also during the day and monitor/log
    the activity of each slave and and therefore know which window/door you will
    have to check before you leave the building.
    What about verify the temperature of the air-conditioning in the computer server room?
    There are no limits here.....

    Best regards,

    Luciano
    Star Trek Security Systems

  15. #15


    Did you find this post helpful? Yes | No

    Default

    Hi,
    This is a very good Idea Luciano with Master and Slave ,
    did you know where can I find Schemas about RS-485.

    Bye Pesti.

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


    Did you find this post helpful? Yes | No

    Default

    Do a search on this forum for "RS-485" or "RS485".

    Luciano

  17. #17


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I found this schema I think this is ok?
    Have anybody experience with RS 485 connections.

    The Alarm Contact with the two resistors like on my Alarm Box works just fine.
    I have now three states:Alarm,Normal,Sabotage.
    Thanks People for the help!!!

    I made that my Visual Basic Software send every second data to PIC and back,the Software saves the data (Contact States+Date+Time) on one file and then the Software read the data from the file and shown on the GUI,when the State is Normal I can reset the Alarm, and so on.
    All is working very good but I must to expand the capability.
    For the moment I can adjust the time interval,map load,save the Contact coordinates on the map,text for the contacts,pictures for the contacts,Port adjustment,Sound on Alarm.
    I want to made this what Luciano mean with Master und Slave,any Slave Pic have a ID Adress and so on,I can adjust the adress with DIP switch.

    Regard Pesti.
    Attached Images Attached Images  
    Last edited by Pesticida; - 16th October 2005 at 14:58.

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 : 1

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