How to build a Raspberry PI security camera using a Raspberry PI camera and a USB camera. I built these two cameras using older Raspberry PI B and B+ boards (not the version 2 or 3) using motionEyeOS for the operating system.
The camera live video, recorded video, recorded images and settings are accessed by connecting to the camera with a web browser. Cameras are connected to the network by either wired Ethernet or WiFi from the Raspberry PI boards. The camera can be set to start recording as soon as motion is detected.
RPI Camera Raspberry PI Security Camera and WiFi
The first camera uses a Raspberry PI camera and Raspberry PI model B+ board. Connection to the network is via WiFi. The image below shows the Raspberry PI board set up with the RPI camera, USB WiFi dongle and micro SD card.
Raspberry PI Security Camera with WiFi Connection
USB Camera and Wired Ethernet
The second camera uses a Raspberry PI model B board, full sized SD card and an external USB camera as shown in the following image.
Raspberry PI Board with USB Camera and Wired Ethernet
A cheap USB camera is attached to the board via the black USB connector in the above image.
Cheap USB Camera
Installing and Setting up the motionEyeOS Software
Details on setting up the Raspberry PI camera and motionEyeOS software can be found on the Starting Electronics website. The article shows how to set up the Raspberry PI camera and wired Ethernet connection.
Security Camera Video Image in Web Browser
The motionEyeOS software is a complete operating system and camera motion detection software all in one. A SD card image is simply installed onto the SD card to install all the software. The Raspberry PI board and camera can then be accessed from a web browser.
Even if WiFi is to be used, the board must first be connected to a network using wired Ethernet so that the board can be accessed from a web browser and settings changed to use WiFi.
Further details and settings can be found on the motionEyeOS wiki pages.
Raspberry PI Security Camera Performance and Issues
I have found that the camera, whether USB or RPI, does not reliably trigger and start recording every time that motion occurs in front of the camera. This problem occurs even with a fairly modest frame rate and fast SD card. I suspect that it is due to the performance of the Raspberry PI board. Performance should improve with a model 2 or 3 board.
Triggering on Unwanted Motion
If there is a tree or anything that moves when there is wind, this is a problem. Because of this, the camera will detect unwanted motion and start recording. On a windy day this is a big problem as the SD card will start to fill with unwanted recordings.