Bookmark, share, and hop your favorite sites with SiteHoppin Toolbar for Firefox!



Zedomax DIY 100 Make an alarm system

Posted in DoItYourself! by max on the September 19th, 2006 at 8:36 am

DIY [100]

Do it yourself !

Zedomax Alarm System -
Make an alarm system in 3 minutes!

Video of Alarm System in 3 minutes:

Parts List:

1 Magnetic Contact Switch
1 12VDC Piezzo Buzzer
1 2N3904 Transistor

Available at RadioShack

1 CB280 Start Kit
1 CLCD420-B
1 4×4 Keypad
1 Keypad Controller

Available at Comfile

Okay, today I was thinking that I needed an alarm system for my dog, so I decided to make a doggy door alarm system. Since my dog sleeps w/ me, I needed to make an alarm system for the night, to protect my apartment from other intruding dogs…

Anways, you might think I am crazy making an alarm system for furry people…

Before I made the actual system, I decided to do it with a study board that has a little breadboard.

You can get a 12VDC Piezzo Buzzer from your local Radio Shack for about 10 bucks and magnetic contact switches w/ screws for about 5 bucks.

These magnetic contact switches are neat, they are the same ones used for a lot of residential and commercial door sensors.

They are simply magnetic switches. If door is closed, the contact is open and if door is open, the contact is closed.

You can screw them into door and the wall using the holes on the switch ends.

Yes, if you got that and some CUBLOC or any type of microcontroller w/ i/o ports, you should be ready to go.

Here, we will use Comfile’s CB280 embedded computer module and a 4×4 keypad and keypad controller, which will make things easier for us since we won’t have to build from scratch.

(Close-up)

You will need to solder on your Keypad to the Keypad Controller first.

Then plug in black wire to GND, red wire to 5V, and rest of the pins to ports P0, P1, P2, and P3. (labeled 0, 1, 2, and 3 on the black IDC headers)

Once you are done connecting the Keypad Controller to your study board, connect the LCD to connector labeled, “CuNET”.

Yes, now you have a keypad and an LCD.

Now connect the black wire of the piezo to GND and red wire to the left side of the 3904 transistor.

Connect 5V to the right side of the 3904 transistor.

Connect the middle pin of the transistor to P5 of the CUBLOC Study Board (labeled “5″).

Now why are we using a transistor?
Because the piezo takes about 150mA and each I/O of CB280 CUBLOC module only can take so much (<50mA).

So when the I/O port goes on, the transistor will simply connect power from 5V pin to the red wire of the piezo.

Okay, now we have 1 more item, yes, that’s right, we can put the magnetic contact switch.

Connect one end of the Contact switch to 5V pin and the other end to port P20, labeled “20″ on the study board.

Now connect a wire from P20 to an LED on the study board.

This is to do a pull-down and we should be able to check the status of the contact switch using the LED.

All right, now you are done, you should have something like this:

Now download this source file diy100.zip and uncompress it.

You will find HomeAutomation001.cul and HomeAutomation001.cub.

Open HomeAutomation001.cul file in your CublocStudio.

Download the program to CB280 module.

When you move the bottom part of the magnetic contact switch, you should see the LCD displaying “open” and “close” while the piezo beeps.

Now enter “1234″ as password on the keypad controller.

If you mess up, you can press “CNCL” button, which will clear the password.

You should see the Alarm Status on the LCD go ON.

Now when the door is open, you will hear the alarm go off.

[Source Code]

Const Device = CB280

#define MyPass 1234

Set Pad 0,1,5

Const Byte KEY_TABLE=(0,0,14,16,0,15,0,0,0,0,13,9,8,7,0,0,0,0,12,6,5,4,0,0,0,0,11,3,2,1)

‘Key table if Keypad inserted backwards to the Keypad Controller

‘Const Byte KEY_TABLE=(0,0,1,4,7,10,0,0,0,0,2,5,8,11,0,0,0,0,3,6,9,12,0,0,0,0,13,14,15,16)

Dim X As Byte

‘Status of Alarm

Dim AlarmON As Byte

‘Status of Door

Dim Door As Byte

Dim Password As Long

Door=0

Password=0

AlarmON=0

‘Set port P5 to output

Output 5

‘Set Magnetic Switch to input

Input 20

On INT0 Gosub GETINT

Set int0 2

On Pad Gosub PAD_RTN

Set Ladder Off

Set Display 2,0,0,128

Cls

Delay 100

Csroff

Locate 0,0

Print “Zedomax Alarm System”

Locate 0,2

Print “Door is: “

If In(20)=1 Then

Print “open”

Else

Print “closed”

End If

If AlarmON=1 Then

Locate 0,3

Print “Alarm Status is ON”

Else

Locate 0,3

Print “Alarm Status is OFF”

End If

Do

If AlarmON=1 And Door=1 Then

Alarm

End If

Loop

GETINT:

Door=In(20)

Debug “Door: “,Dec Door,Cr

Alarm

If Door=0 Then

Locate 9,2

Print “closed “

Debug “door closed”,Cr

Else

Locate 9,2

Print “open “

Debug “door open”,Cr

End If

Delay 500

Return

PAD_RTN:

Peep

X=Getpad(1)

If X>29 Then Return

X=KEY_TABLE(X)

Debug “Key Pressed: “, Dec X,Cr

If X < 10 Then

Password=Password*10+X

If Password > 9999 Then Password=X

Debug “Password: “, Dec Password,Cr

If Password = MyPass Then

AlarmON=AlarmON Xor 1

If AlarmON=1 Then

Locate 0,3

Print “Alarm Status is ON “

Else

Locate 0,3

Print “Alarm Status is OFF”

End If

End If

‘If ENTR pressed

Elseif X=11 Then

‘If CNCL pressed

Elseif X=15 Then

Password=0

End If

Return

End

Sub Alarm()

Out 5,1

Delay 100

Out 5,0

Delay 100

End Sub

Sub Peep()

Out 5,1

Delay 5

Out 5,0

Delay 5

End Sub

Taking it Further…

You can modify the source code to change the alarm times, scheduling,
menus, etc…etc…

The CB280 module supports up to 49 I/Os, so you can add up to 49
door sensors or you can add temperature chip to monitor temperature
at the same time.

The CB220 and CB220 Proto Board can be substituted for cheaper
alternative.

The CLCD420B can be substituted for smaller LCD such as the CLCD216G
OR you can also add a graphic LCD, such as the GHLCD for expanding
your alarm system…

I will try to update w/ a touch screen alarm system for more high
tech alarm system in the future w/ CuTOUCH.

Check out PartII - adding a motion sensor!

If you are having any trouble with above app, please e-mail max@zedomax.com

If you have any cool apps you’d like to share, please e-mail to max@zedomax.com

, ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


RSS feed | Trackback URI

4 Comments »

 
Comment by Link Building
2008-03-24 03:29:22

:) reminds me of technology classes back in school…

MyAvatars 0.2
 
2008-03-28 11:53:23

[...] How to make a Stopwatch in 1 minute! How to make a G-meter 4 your car in 1 minute! How to make a computer controlled Party Light in 90 seconds! How to make a computer controlled Party Light Part II! How to build a digital thermometer in one minute! How to build a hovercraft with 4 PC Fans! How to make a Golf Club POV training aid! How to make voice activated Christmas Lights! How to make an LED Christmas Tree! How to make a Christmas LED Wreath! How to make a golf training aid for just 5 bucks! How to make your own PS3 SIXAXIS controller from scratch! How to make a music syncing Light Orb Alarm Clock! How to make an ethernet controlled Color Organ! How to make a glowing LED heart! How to make Christmas Light Controller in 5 minutes! How to use PS3 Six axis Controller in Windows! How to crack WEP and WPA Wireless Networks! How to unlock Windows XP password without any programs! How to tweak your Linksys router to go 10 times faster! How to download Windows Movie Maker for your illegal Windows! How to turn your cellphone into a Taser Camera Gun! How to downgrade your computer from Windows Vista to XP! How to convert air into electricity! How to automate your MySQL database backups! How to disable Lexus and Prius navigation lockout! How to fight DoS attacks for your linux web server! How to make an ethernet controlled temperature monitor! How to build an internet controlled security robot with GPS! How to extend your Wifi Antenna by 2-3 times! How to make a homebrewed radio using paper clips! How to download free mp3s using Google! [...]

MyAvatars 0.2
 
2008-04-16 13:04:33

[...] How to make a Stopwatch in 1 minute! How to make a G-meter 4 your car in 1 minute! How to make a computer controlled Party Light in 90 seconds! How to make a computer controlled Party Light Part II! How to build a digital thermometer in one minute! How to build a hovercraft with 4 PC Fans! How to make a Golf Club POV training aid! How to make voice activated Christmas Lights! How to make an LED Christmas Tree! How to make a Christmas LED Wreath! How to make a golf training aid for just 5 bucks! How to make your own PS3 SIXAXIS controller from scratch! How to make a music syncing Light Orb Alarm Clock! How to make an ethernet controlled Color Organ! How to make a glowing LED heart! How to make Christmas Light Controller in 5 minutes! How to use PS3 Six axis Controller in Windows! How to crack WEP and WPA Wireless Networks! How to unlock Windows XP password without any programs! How to tweak your Linksys router to go 10 times faster! How to download Windows Movie Maker for your illegal Windows! How to turn your cellphone into a Taser Camera Gun! How to downgrade your computer from Windows Vista to XP! How to convert air into electricity! How to automate your MySQL database backups! How to disable Lexus and Prius navigation lockout! How to fight DoS attacks for your linux web server! How to make an ethernet controlled temperature monitor! How to build an internet controlled security robot with GPS! How to extend your Wifi Antenna by 2-3 times! How to make a homebrewed radio using paper clips! How to download free mp3s using Google! [...]

MyAvatars 0.2
 
Name (required)
E-mail (required - never shown publicly)
URI

Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.