Shop OBEX P1 Docs P2 Docs Learn Events
Help with alarm project — Parallax Forums

Help with alarm project

Gabe82Gabe82 Posts: 3
edited 2008-03-27 02:52 in BASIC Stamp
I working on·a project for work.· It has been a couple of years since I have even touched a Basic Stamp and I can't remember much of the code.

What I am trying to do is set up a counter/timer so that if I get an input from an outside contact such as a pushbutton it will count to 4.·However I want it to time to, if it doesn't get to 4 within one minute I want the counter to reset.· If the counter does make it to 4 within 1 minute I want to enable an output, possibly to an opto isoloator which will go to another relay I have.

Comments

  • ercoerco Posts: 20,260
    edited 2008-03-26 23:46
    Simple, Gabe. What Stamp are you using? If you're going to buy one, get the Stamp 1 Project Board for $15. Programming is the easy part. You need to round up your pushbutton and relay, that's where to start. You don't need an optoisolator, probably just a cheap switching transistor. Get your parts and check back in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Gabe82Gabe82 Posts: 3
    edited 2008-03-27 00:06
    My boss picked up a board and handed to me today, it is a Basic Stamp 2 homework board, we are using it for an alarm system, a cheapo one until the real one is installed whenever that is.· There is a dry contact on the receiver of the alarm we have.· I want to use that contact and bring it into the basic stamp.· We have been having false alarms with the existing alarm.· So we want to trigger a counter/timer so if it is triggered 4 times in one minute then I can trigger an output.· If I can get that far I think I will be set.· I was just going to use a pushbutton to simulate the contact from the receiver to make sure it worked until I hooked it up.·
  • Gabe82Gabe82 Posts: 3
    edited 2008-03-27 01:40
    I guess what would solve my problem is if I could figure out how to use a pushbutton to count up everytime it is pushed up to 4.· If the button is pressed within 1 minute then it would pulse an output.
  • FranklinFranklin Posts: 4,747
    edited 2008-03-27 02:52
    You will need some way to time the pushes as the stamp can't keep track of random button pushes and keep time at the same time. set to toggle at one minute intervals probably would work and not be too expensive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.