Security Cameras - Building an Enhanced Security System...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
http://www.devx.com Printed from http://www.devx.com/dotnet/Article/32638 Building an Enhanced Security System with a Web Cam and a Servo Once you crack the surface of what's possible using .NET to control hardware devices you may find yourself quickly sucked in to this kind of programming. In this article, learn to control a Web cam mounted on a servo to create a sophisticated monitoring application. by Wei-Meng Lee n my previous article: " Teach Your Old Web Cam New Tricks: Use Video Captures in Your .NET Applications ," I showed you how to integrate your Webcam into your Windows application. And in my last couple of articles on DevX.com, I showed you a few ways to control external electronic devices from within your .NET applications. And so, equipped with this knowledge, I am next going to show you how you can build an enhanced security system using a Web cam mounted on a servo, which can be controlled to turn the Web cam in any direction you desire. The system I am building in this article can be deployed at home or at the office to monitor the surroundings. In this application, you will: l learn how to control a servo using a microcontroller l learn to program a microcontroller using the PBASIC language l learn how to interface a .NET Windows application with a microcontroller so that it can control how the servo turns What is a Servo? A servo is basically a motor, except that it allows you to position the output shaft at any specific position you desire. Servos are very useful in robotics and are often found in toys such as remote controlled cars, airplanes, robots, etc. There are two main types of servos you can use for this project—a standard servo or a continuous rotation servo. A standard servo only allows a limited angle of rotation, while a continuous rotation servo allows the servo to rotate continuously in either direction. For this article I chose a standard servo from vendor Parallax. Connecting the Servo Like the two sensors I discussed in my last article , the servo I used cannot be directly connected to the serial port of the PC. Hence, you need a microcontroller to serve as an adapter between the servo and the serial port of your PC. For this purpose, I used the BASIC Stamp 2 (BS2) Module ($49), also from Parallax. The BS2 is a microcontroller that runs at 20MHz and executes roughly 4000 instructions per second. You also need a board to house the BS2 module. I used Parallax's USB Board of Education (BoE) Development Board ($65). You will control the servo directly by writing code that runs on the BS2. And in this case, the language for programming the BS2 is PBASIC (Parallax's version of the BASIC programming language). To connect the servo to the BoE, use three jumper wires and connect as follows (see Figure 1 ): l Connect the black cable (Ground) to the connector labeled V ss . l
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/16/2008 for the course MIS 225 taught by Professor Byrtus during the Winter '08 term at Mercyhurst University.

Page1 / 10

Security Cameras - Building an Enhanced Security System...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online