A Raspberry Pi Model A is used, as it has a much lower power requirement compared to the Model B. The Model A has a single USB port, which can be used to connect mass storage if there is a requirement to store large high definition video files.
For this project I was lucky enough to get an LCD reversing monitor in a case which is already ideal for the project, and saves having to re-case it. The wires for the monitor come out of the top of the case and are soldered to a small piece of strip-board with an RCA and 2.1mm power plug which will plug directly into the Raspberry Pi and a 2.1mm power socket in the Raspberry Pi case.
The battery case is sandwiched between the Raspberry Pi case and the LCD case. The lid for the battery case is bolted to the LCD monitor case. And the battery case body is bolted to the Raspberry Pi case. This still allows access to the batteries at any time, so they may be replaced freely. A full charge of 6 AA 2400mAh NiMH batteries lasts ~6 hours with the monitor on, if the monitor is allowed to sleep a full charge should last longer.
The software is very simple, all of the difficult bits are done in the Raspberry Pi Foundation's command line utilities raspivid and raspistill. The application is just a menu system which reads the menu items data from a text file and displays it on the monitor. The only other thing displayed is a preview of the image from the camera with the selected options set, using raspistill.
The user select the options they require and the raspistill utility is restarted to display the changed command line options. When the user clicks the record button, the preview is terminated and then either raspistill or raspivid is executed to achieve the required task. The users options are stored in a file on the SD card so when the Raspberry Pi is next used, the previously used options are retained.
In addition the user can turn the illumination LEDs on or off, this just sets a GPIO pin high or low.
The monitor can also optionally go to sleep after a period of inactivity, this also just sets a GPIO pin high or low.
Finally the user can view a recorded video. A list of the files stored is displayed, when the user selects a video, the Raspberry Pi Foundations command line utility omxplayer is used to play the video full screen.
NOTE: Time Lapse and SD Card
I have found that a class 4 SD card is not fast enough to capture time lapse images of period 1 second, at full resolution and quality. If you experience this, reduce the quality or resolution of the image. Or increase the time lapse period.
The software comes configured, with nothing required to do. It is possible to modify the configuration if required. The file RPiVideoCam.ini contains all of the configuration options, including the menu information.
Additional menu options can be added or existing ones altered or removed.
A menu is defined in two lines, the first MENU_?, where ? is the menu number, which has to be unique. The first entry in this line is the menu name, followed by the menu item names. The menus are displayed in order of their menu number. This first line is the text displayed in the application. This can be altered as required, it is comma separated and each entry should be at least one character long.
The second line is the MENU_VALUE_?, this contains special instructions or command line arguments which are to be used when the menu item is selected. Each entry in this line represents the equivalent entry in the first line. The first entry is the command line argument, followed by the options text for that command line argument. The special commands are used in menus 0 and 1. In the special commands you will see references like , this means use the option which has been selected in menu 2 as a command line argument here.