DIY Method: How to Build a Raspberry Pi Action Camera

Here's a very simple guide on how to build your very own Raspberry Pi Action Camera.

First, let's see the camera in action:


Design

The design of the action camera had to be based on off-the-shelf components. If you have access to a 3D printer and soldering iron, you can build this project. With that in mind, start with the Raspberry Pi A+, the newer, low-power version of the Model A. Having the A+ as the platform meant having access to hundreds of parts designed to work with Raspberry Pis; the most important being the camera module. A quick Google search told me it possible to build so the DIY-er took it from there. The first prototype built used an open-source case and was just to make sure the camera would actually work.

From there, my design goals were simple:
  • Long battery life
  • Wireless communication
  • Simple, durable enclosure
The first goal meant having a large battery. The hour to hour and a half battery life of the GoPro wouldn’t cut it for longer, multi-hour rides. The second meant having both Bluetooth and WiFi so that additional hardware wasn’t needed to interface with the camera. The last goal also played a big role in determining the first two. While designing holes/slots to make every port available outside the case would have made things more convenient, it would also have reduced the structural integrity and water/dust resistance. The parts used can be found below:

  • Raspberry Pi A+
  • Raspberry Pi Camera Board
  • Edimax WiFi USB Adapter
  • Wireless Bluetooth to Serial Slave
  • 32GB Micro SD
  • 2000mAh LiPo
  • LiPo Charger/Booster
  • Momentary Pushbutton Switch
  • 1/2″,1/4″ 2-56 Machine Screws/Nuts
  • Rocker Switch
Hardware

Start by trying to package the peripherals as tightly as possible on the Pi. The largest obstacle was the USB WiFi adapter, which stuck out quite a bit more than everything else. Remove the USB jack with some side cutters and my iron and attached ribbon cable to the exposed data and power lines. Remove the WiFi adapter from its plastic case and soldered the wires directly to its board. Next, hot glue the Bluetooth module to the top of the Pi and ran more ribbon cable to the headers underneath.Then, attache the two pushbuttons with slightly longer pieces of cable.

Space was already pretty tight and still need to attach the LiPo charger/booster. Do some quick measurements and printed out a support for the board.
It took a couple of tries but at some point, it got one that fit.

Once everything mounted on the top of the Pi, design a case to go around it. Print off a quick base to see if my measurements lined up.
You can see the support piece in the picture above on the top right of the board

You will then have value of the final x and y dimensions were going to be. To keep the camera as close to the size of the Pi as possible, which meant the large battery had to fit snugly underneath the bottom of the Pi. Print out a few spacers so that the LiPo wouldn’t get punctured by any of the protruding headers. After that print off a few more test pieces to make sure that the Pi, battery, charging port, buttons, and switch would fit.
Here you can see a few iterations of cases
A cutaway showing the orientation of components

Once you are sure everything would fit, print the bottom half of the case. The two pushbuttons were attached via hot glue, while the Pi was mounted to the case using screws.
A good fit

With the bottom of the case completed, now figure out a way to mount the camera module to the top. The previous camera case used tension to hold the camera via its four mounting holes however, you need something a little more secure. So design platforms for the camera board to rest on which held the board in place with screws.
This design has the added benefit of allowing the screws to be reversed such that the threads on the outside of the case can be used to mount the camera or attachments

The screws are partially recessed in this orientation to prevent anything from catching on the front face


Software

The Pi runs a script by Alex Eames that, on startup, listens for one of two button presses. The button closer to the edge starts the recording, while the center button stops it. I had to make a few changes to the script so that it would work on the A+, which can be found on my github.

While the Pi still has its HDMI output, as well as access to many of the unused GPIO, the primary method of communication is ssh. The A+ only has one USB port and no Ethernet so there is not much of a choice. Files can be sent and read from the Pi using an FTP/SFTP client, or accessed via the command line. The card can also be accessed via a hard connection by using the method described here. The Bluetooth to serial module can be paired to and used to trigger start and stop for recording, and alleviates the limitations of the two hardware buttons. There is also the possibility of adding features such as time-lapse or motion-triggered alerts.

Credits: Special thanks to Connor Yamada for this guide on how to make your very own Rasperry Pi Action Camera.