-
Notifications
You must be signed in to change notification settings - Fork 1
Guide: Motion Sensor Surveillance Box
Motion Sensor Surveillance Box is a cost efficient way to tell a story with video snippets that have been triggered by sensors. The snippets can be captured in one sitting or over the course of several days. Later, the footage can be edited together and set to music to share the story of a family or friendly gathering. The prototype here is housed in holiday packaging and can be placed near a Christmas tree.
Complete instructions (including set-by-step photos) to build your own Motion-Sensor Surveillance Box will be linked in coming days.
This project was created with the following questions in mind:
- What kind of storytelling can happen when sensors, and not humans, trigger video recording?
- With sensor-triggered video, what is the quality and consistency? How does it compare to other footage?
- What is the human-user experience of sensor-triggered video? Does the user feel empowered or helpless? What is it like interfacing and interacting with the prototype?
Motion Sensor Surveillance Box is a tier of gift boxes housing a microcomputer which powers and controls an infrared camera. The coin-sized camera module is taped to the side of the middle box and rests against a pin-hole cut out. The computer runs a Python script that uses computer vision to detect motion above a specified threshold. To determine motion, the camera continuously compares two consecutive images to detect a change between the former and latter. The camera compares the delta of the images to the threshold. At the threshold, it considers this a detection of motion, launches into preview mode and records that preview for one minute. Otherwise, it continues comparing images.
The microcomputer can run without a display, keyboard and mouse following initial configuration in a new location. This is often referred to as operating “headless”. The accessories are initially required to connect to a new location’s WiFi network and establish remote access. Once remote access has been established all functions of the microcomputer will be executable from a designated desktop or notebook on the same network. Remotely sharing a computer’s desktop is achieved through a process called virtual network computing (VNC).
VNC requires a client, host and viewer. The client is usually a web application or a piece of software while the host and viewer refer to the connecting computer and destination computer, respectively. VNC allows full operation of the hosting machine as if it were another window your own computer. With VNC you'll have very few concerns over digital storage on the host machine because files can seamlessly be transferred between host and viewer.
- Raspberry Pi 3 Model B + power supply ($40)
- Raspberry Pi NoIR Camera V2 ($20)
- 32 Gb Micro SD card + Adapter ($20)
- Bluetooth Keyboard & Mouse ($20)
- LCD Color Monitor (HDMI)
- "Rainbow Pibow" Raspberry Pi Enclosure ($20, optional)
- Cardboard boxes and wrapping paper or other housing ($10)
- Download & install RealVNC Viewer (client) on the viewing machine.
- Identify camera pinhole in middle box. Place gift set under the tree with a good view and near an outlet.
- Plug in the gift set, monitor and accessories.
- On RPi desktop, navigate to the upper right corner and connect to your WiFi network.
- Launch VNC Server from upper right corner (look for VNC logo).
- Launch terminal and enter
vncserver
to start VNC server and determine RPi’s IP address. - On the viewing machine launch VNC Viewer. Begin a new session (CTRL + N).
- Enter the RPi’s IP address then press enter. Double-click the icon containing the IP you just entered.
- Bypass/accept security warning.
- Prototype connection credentials: there is no username, password: 'buzzfeed'
- With RPi accessories removed, use the viewing computer to establish VNC connection to the RPi desktop.
- Navigate to folders through a series of double-clicks - PATH:pi/santa_cam/raspxmas.py
- Double click the Python script to open (raspxmas.py).
- From the Run menu, select 'Run Module'. You will see a spew of numbers! This is good, very good.
- The script will initially detect a false positive and launch into record and preview mode for 1 minute. (Preview mode only happens when launching the script directly from the Raspberry Pi.)
- Next, the program will record for one minute following the actual detection of motion. Video files will save to that same folder. PATH:pi/santa_cam
- With VNC Viewer you are able to select any file on the host and use the drop menu to move them to the wastebasket. You can also empty the wastebasket afterwards.
- Use the VNC Viewer to select "Transfer Files" from the drop-menu (bottom, right drop menu).
- Select the files you'd like to send to your viewing machine and transfer.
- You may follow above directions to delete the video files after successfully transferring.
- Project files will output in a .h264 format. You may need a special media player to view them.
- If so, download & install VLC (http://www.videolan.org/vlc/download-macosx.html)
- Launch VLC and drag & drop the .h264 videos to watch.
- Adobe Premiere (adobe.com)
- MPEG Streamclip (squared5.com)
- FFMpeg (ffmpegx.com)
A list of common issues (read: things that drove me crazy during this project) will be added in coming days.