With a versatile platform such as the Raspberry Pi or RBPi, prototyping a project is very simple. The scale does not matter for you can start with a single blinking LED and move on to complex quad copters. If you have the necessary components, simply add a little amount of imagination, and RBPi can work wonders for you.
A practical use for the RBPi is to sense the surrounding environment. Not only is this interesting, but also gathering this data is useful in myriad ways. For example, a weather station uses different sensors to measure pressure, humidity, wind speed and temperature. The main objective in recording and manipulating such data is to predict future weather conditions. Anyone technically savvy can store this data and manipulate it to produce tables and graphs for importing into other applications or projects.
Using a PIR or Passive Infra-Red sensor with an RBPi can be an effective guard for your home. These inexpensive sensors are used with motion activated air fresheners from which, you can easily harvest a couple for building this project. The PIR and RBPi combination can act as an effective burglar alarm in homes and offices.
The PIR sensor effectively sends out a beam of infrared light into the area that it is monitoring. As long as there is no movement in the area, the beam remains undisturbed. However, the slightest movement causes the beam to change, which the PIR sensor can sense. The PIR sensor, when connected to the RBPi, sends it a signal once it detects movement. The RBPi responds to this signal in a manner defined by its program.
For this project, the PIR sensor is set up to watch over an area for any movement. As soon as it detects movement, it triggers the RBPi, which responds by capturing a picture of the event on its camera, including recording a 10-second video at a resolution of 640 x 480 pixels.
Additionally, the RBPi will send out a text message to the owner’s phone, thereby alerting the user of an intruder or whatever that triggered the event. The text message includes the picture and the video. After sending the text, the RBPi will wait for 30 seconds before resuming its watchful stance.
Apart from being an effective burglar alarm, you can use this combination of PIR sensor and RBPi with its camera in many innovative ways. For example, those who like to study birds and their habitat, can set it up near the nest to record the coming and goings of the parent birds.
Using a text message to alert the user is effective, as all phones are capable of receiving SMS. Other methods using emails or tweets usually rely on 3G or Wi-Fi coverage and may not be always useable. Additionally, you can use several alerts from the project simultaneously. The RBPi stores the pictures and video it captures in its memory. You can retrieve them later via any means convenient.
To set up, install the OS in the RBPi, enable the camera via raspi-config and test its working. Use the command “raspistill -o test.jpg” for testing. This produces an image file by the name test.jpg.