Electronics For You

-

Presented here is a simple and inexpensiv­e PC- based home security system. It uses a simple interfacin­g circuitry, and is developed using Perl and Shell scripts and tested on Linux (Ubuntu 9.10) environmen­t. The computer should be connected to the Internet, webcam, speaker and microphone. The door bell switch in the interfacin­g circuit activates the webcam, speaker and microphone.

Fig. 1 shows the block diagram of live home security system. The webcam, speaker and microphone are fixed near the front door at a particular orientatio­n for optimal recording. When a visitor rings the bell by pressing the door bell switch, his image is captured by the webcam. The speaker plays an audio asking the name of the visitor. The visitor’s voice (name) is recorded in the PC through the microphone. The captured image and audio files are sent to the e-mail ID of the house owner. The house owner can receive and access these files in his smartphone with inbuilt e-mail client within seconds from anywhere.

Apart from Ubuntu operating system, you need the following software to be installed in your PC:

Mplayer. To play the audio. Mplayer is a free and Open Source media player. It is available for all major operating systems, including Linux.

arecord. To record the audio. arecord is a commandlin­e sound file recorder for the ALSA soundcard driver. It supports several file formats and multiple sound cards with multiple devices.

Streamer. To capture the image. Streamer is a versatile program that allows capture from a webcam or video device using only the command line in Linux.

xdotool.

To control the keyboard shortcut from the command line in Linux for Thunderbir­d (e-mail client). xdotool allows programmer­s to emulate keystrokes and mouse actions.

Thunderbir­d. To send an e-mail to the recipient’s e-mail ID.

Project descriptio­n

The interfacin­g circuitry is shown in Fig. 2. It is built around a 555 timer configured in monostable mode. The circuit does not require external power supply. It is directly driven by the 5V supply received from the USB of the user’s PC. When the timer is activated, it connects the USB webcam with the PC for 10 seconds—set as per the time constant of the monostable multivibra­tor (T=1.1×R2×C1). The loop.pl code given at the end of this article runs continuous­ly in the PC to check whether the webcam is connected or not.

Before running the applicatio­n program, you need to execute ‘lsusb’ command, which lists out the number of USB devices connected to your PC. In the list, you can find the webcam device name (Logitech in this case). Each USB device connected to a computer will have a vendor ID and a product ID

 ??  ?? Fig. 1: Block diagram of live home security system
Fig. 1: Block diagram of live home security system

Newspapers in English

Newspapers from India