Make your very own open-source, Raspberry Pi linux-powered digital snappy camera with built in rechargeable battery! The SnapPiCam Raspberry Pi Digital Camera is a cool project showing what you can be done with a Raspberry Pi, PiTFT and acrylic enclosure. This is a fairly advanced project, for people who are very comfortable with soldering, assembly, Raspberry Pi hacking, etc!

The Laser-Cut sets can be bought from The LittleBox Company and the other major components are available from Adafruit.

Inside is the 5 megapixel Raspberry Pi camera, this can be either the standard version or the Noir Infrared-sensitive edition. Power comes from a rechargeable 1200mAh LiPo battery. The battery is recharged via a Mini-B USB cable plugged into the built-in LiPo charger. A 2.8" TFT + Touchscreen at the back allows access to the camera's GUI.

On the outside can be attached a variety of lenses including Fish-Eyes, Telephoto Lenses, Zoom lenses, and Macro Lenses. On the underside of the SnapPiCam is a standard 1/4-20 Nut for attachment to a Tripod.
This is a pretty intense project with many components required! Not all parts are available as a kit so be ready to source parts from many locations!

You'll need the following before you can begin.

Parts

Raspberry Pi, camera, and power!

Storage and a way to get the data off:


SnapPiCam Laser-Cut Set containing the following:

  • 26 x Laser-Cut Parts
  • 4 x M3 Microbarb Brass Inserts
  • 2 x M2.5 Microbarb Brass Inserts
  • 15 x M2 Microbarb Brass Inserts

You'll also need some hardware, available from mcmaster.com and others:

  • 4 x M3 45mm Screws
  • 2 x M2.5 8mm Nylon Screw
  • 4 x M2 12mm Screws
  • 4 x M2 8mm Screws
  • 7 x M2 4mm Screws
  • 1 x 1/4-20 Square Nut
  • 2 x M3 4mm Nylon Spacers
  • 1 x 3mm x 12mm x 15mm Stick Foam Pad

Some headers:

  • 2 x 0.1" Right-Angle Pin Header
  • 2 x 0.1" Female Connector
  • 2 x 0.1" Single Pin Covers

Switches:

Optional (but strongly suggested!)


Extras

The SnapPiCam has been designed to use Mobile Phone Magnetic Lenses. The standard size for the magnetic ring which the lenses attach to has a ~13.5mm Outer Diameter (OD) and a ~9.5mm Inner Diameter (ID). There are hundreds of different lenses available, I favour the Fish-Eye Lenses myself.

Tools

Soldering Iron | Screw Drivers | Needle Files | Small Hammer | Hobby Knife | Mini Clamps | Acrylic Glue | Suitable Wire | Heat-Shrink

The Laser-Cut Parts are protected on each side with a thin film layer. The film will need to be removed from both sides of each Laser-Cut part. Use the point of a knife to tease the film up.

With the film removed from both sides of all the acrylic parts we can begin to assemble the SnapPiCam.

The SnapPiCam is built up in 3mm layers, we'll start with the front Fascia. In the Fascia must go 4 x M2 Microbarb Brass Inserts. These inserts act as bolt anchors for screws, instead of using nuts. The inserts are captive which means they won't fall out when the screws are undone.
The four holes where the Microbarbs fit might need enlarging. This can be done with a round needle file.
The brass inserts fit into the back of the Fascia. A lip on the inserts stops them from being pulled through the acrylic if the screw are over-tightened.
Do not use excessive force when fitting the brass inserts into the acrylic. There is a risk that the plastic might crack & break if too much effort is applied.
The inserts can be gently hammered into the acrylic. If the inserts do not fit with a light tap of the hammer use a needle file to make the holes slightly larger.
Each layer after the Fascia is numbered with a small dot in the lower left corner. The layers need to be assembled in the right order or your SnapPiCam won't go together correctly.
Several of the smaller components are glued together to strength the assembly.
Two corner pieces are glued together and then they are glued to layer 9.
Check the correct orientation before bonding the corner pieces together.
The two U-Sections of layers 6 & 7 can be glued together. They can be left unglued if you wish.
The Back-Plate must be glued to layer 15. Check the orientation before bonding. The numbering dots must be face down with the Back-Plate glued to the rear of layer 15.
Four 2mm layers make up the lens assembly. The order of the layers doesn't really matter at this stage as we will need to disassemble and reassemble them at a later stage.
The layers are held to the Fascia with 4 x M2 12mm screws.
Layer 1 | This layer needs no modifications and can be placed directly behind the Fascia.

Layer 2 | Four Brass inserts must be fitted into the back of the layer. Use the same methods as described in the First Steps. The Raspberry Pi Camera rests on a 15mm strip of 3mm x 12mm foam. The foam strip is measured and cut to fit between the 4 x M2 Brass inserts.
Be careful to keep the Flat Flexible Cable flat and to avoid crushing or kinking the cable.
The Flat Flexible Cable (FFC) which connects the camera board to the Raspberry Pi fits through special holes cut into the layers.
4 x M2 x 8mm Screws hold the camera flat against the foam strip.
Do not over-tighten the screws as you can bend and damage the camera board.
Do not remove the protective cover on the camera lens at this stage.
Layer 3 | This layer needs no modifications and can be place directly behind layer 3.

Layer 4 | 4 x M2 Brass inserts fit into the back and 2 x M2.5 Brass inserts fit into recessed holes on the front of layer 4.
Make sure the two M2.5 Brass inserts pressed into the recessed holes are not protruding above the level of the acrylic. The Charger could be damaged if they are.
4 x M2 x 4mm screws secure the LiPo charger to layer 4. Make sure the Mini B USB socket is facing outwards.
The wires need to be disconnected from the 1200mAh LiPo so they can be extended during assembly.
First we need to peel back the Kapton tape protecting the PCB and the solder pads.
Using a pair of sharp small scissors make two cuts at the outer edge of each solder pad.
Hold the tape clear of the solder pads and using a good quality Soldering Iron remove the two wires from the LiPo
The PiTFT needs to be soldered together before it can be installed into the SnapPiCam. To make this process easier we will remove the TFT panel from the PCB.
Editors note: we dont suggest removing the TFT, even tho the author of this tutorial shows it, instead, you can flip the TFT out of the way while you solder, its much easier than fiddling with the FPC connector!
Lay the PiTFT face down and using a screwdriver unclip each end of the ZIF socket holding the TFT's FFC in place.
Carefully remove the FFC from the socket.
Do not pull the FFC free by tugging on the TFT, instead grip the FFC with your fingers and pull gently until it comes free.
With the TFT safely removed we can now fit the 2x13 extra-tall female header to the PiTFT's PCB
Fit the header to the PCB, thread a length of scrap wire between the pins at each end of the header.
Place the PCB face-down keeping the PCB square to the female header. Solder one pin at each end of the header to hold it in place.
Remove the wire from between the PCB and the header and solder the remaining pins.
When you have finished there should be a gap between the PCB and the header.
Solder four 6mm Tactile Switches to the top of the PiTFT's PCB.
The Step-Up DC DC Converter comes with three Right-Angle 0.1" pin headers. They need to be split up with a sharp knife.
Two pins are soldered into Pin 2 (5v) & Pin 9 (gnd).
The GPIO layout on the top of the PiTFT PCB is reversed, make sure you solder the pins into the correct holes.
Reinsert the TFT's FFC into the ZIF Socket.
Remove the covering on the two sticky strips on the back of the TFT and carefully attach the TFT to the PCB. Do not remove the protective film on the TFT.
When attaching the TFT to the PCB make sure the edges of the TFT do not come into contact with any of the soldered pins.
Fit three M2 Brass Inserts into the three recessed holes in layer 13.
Attach the PiTFT to layer 13 with three M2 x 4mm screws.
Follow the next six steps to finish building your SnapPi.
The LiPo Charger comes with a JST cable, plug this and the cable removed from the battery into the LiPo Charger.
Place layer 3 on to layer 4, and then place layer 2, with the camera board, on top of that. The wire plugged into the Load socket on the charger runs inside a channel in layer 3. The camera's FFC fits through it's own cut-outs.
Make sure the camera FFC does not get bent or damaged when putting the layers together.
Place the Step-Up DC/DC Converter into the cut-out in the upper right corner. Measure and cut the wires from the Load connector on the Charger. We need to do this for both the Red & Black wires.
Solder the Red wire from the Load connector on the Charger to the VIN hole on the DC/DC Converter.
Solder a length of Red wire into the VOUT hole on the DC/DC Converter.

The DC/DC Converter uses a common ground (GND) so you will need to solder the Black wire from the Load connector on the Charger in the GND hole on the DC/DC Converter along with another length of Black wire.

To help keep things tidy I have soldered the wires from the Load connector on the Charger in to the holes on the DC/DC Converter from the top of the PCB, and the wires leading out from the DC/DC Converter through the holes from the underside of the PCB.
Feed the wires from the DC/DC Converter along the channel taking the red wire off to the side where a switch will be fitted.
Make sure the DC/DC Converter is in its approximate position before measuring and cutting the red wire to length.
The switch is a SPDT Sub-Micro Slide switch. Connect the red wire from the DC/DC Converter to the middle pin on the switch. Solder a length of red wire to one of the other pins on the switch.
Slide the switch into the Off position (slid away from the soldered pins) and fit the switch into it's socket in the layers.
Place layer 1 on top of layer 2.
It is very easy to trap the wires between the layers. Do not force the layer together, use a long bladed knife or other thin object to push the wires into their channels.
Place the Fascia on top of layer 1.
Fit an M3 45mm Screw into each of the corners and lay the assembly face down.
Bend the Camera's FFC as shown in the photo.
Solder extensions onto the two power leads. Insulate the joins with heat-shrink.
Place two M3 x 4mm Nylon Spacers over the two M2.5 Brass Inserts.
Fit the Raspberry Pi Model A. Secure it with two M2.5 Nylon Screws.
Do not over-tighten the Nylon screws as doing so could strip the threads.
Be careful not to trap either the Camera's FFC or any of the power cables when fitting the Raspberry Pi.
Fit the previously glue U-Section, and the glued corner to the assembly.
Fitting the Camera's FFC is a very delicate operation and there is a risk the cable may become damaged.
Line up the cable with the ZIF Socket on the Raspberry Pi.
Press the FFC into the socket and close the latch.
Carefully bend the FFC flat against the ZIF Socket.
Place the clear 1mm thick layer 9, with the other parts pre-glued to the corner, onto the assembly making sure to thread the power cables correctly through the layer.
Slot the 1/4-20 Square Nut into the hole in the lower left corner.
Measure and cut the power cables which go to the LiPo. Solder them to the battery and replace the Kapston Tape over the contacts.
Fit the 1mm thick clear layer 11, then layer 12, and then place layer 13 with the PiTFT on top of the assembly. Make sure to correctly route the cables.
Take care to align the PiTFT Header correctly to the Raspberry Pi's GPIO Pins.
Cut the two power cable to length to match up with the pin headers on the PiTFT GPIO. Attach grimps to the end of the cables. I prefer to use Needle-Nose Pliers to do the crimping.
Slip covers over the crimps and attach to the pins on the GPIO
Remove the protective film on the TFT and place the last layer onto the assembly. Tighten the M3 screws.
Remove the lens assembly from the Fascia.
Gently peel off the protective cover on the camera lens
If you have some Magnetic Lenses attach one of the supplied sticky metal rings to the second layer of the lens assembly.
Rebuild the Lens Assembly with the rings in the correct order.
Check the Magnetic Lenses fits correctly.
If you have a wrist strap undo the M3 screw in the lower left corner, slide it out so the gap opens up and place the strap loop into the opening. Refit the M3 screw.
Connect a USB cable to the SnapPiCam and allow the battery to fully charge.
When charging has completed remove the USB cable from the SnapPiCam.
You will need to follow the Tutorials showing you how to enable the PiTFT with a Raspberry Pi and how to install the Camera Software.

First Tutorial | Adafruit PiTFT - 2.8" Touchscreen Display for Raspberry Pi

Second Tutorial | DIY WiFi Raspberry Pi Touchscreen Camera

You will need to enable Standalone Mode during the camera installation to make the camera software will load automatically at boot.

I have also set one of the Tactile Switches to work as a Power Button, the instructions for this are in the Extras section of the First Tutorial.


Once you have the software installed you can slide the switch to the On position.

The screen will be white for a few moments until the framebuffer is initialised and the TFT is enabled.


Tweeks


It is possible to disable the red LED on the camera board. To do this you will need to edit config.txt in the /boot/ folder on the Raspberry Pi SD Card. You can do this from a Windows PC with an SD Card reader. The /boot/ folder is readable in a Windows environment.

Simply add the following line to the end of the config.txt file.

disable_camera_led=1

Once your SnapPiCam is up and running it's time to give the camera it's stamp of approval.

Undo and remove the four M3 screws. Lift off the Fascia.
Stick the Raspberry Pi sticker to layer 1.
Replace the Fascia and refit the four M3 screws.
The Raspberry Pi Noir Camera is Infrared-Sensitive. The Noir camera is supplied with a square of blue coloured plastic.

By fitting the blue square to the SnapPiCam we can make an Infragram camera.

For more information about Infragram please visit their website at Infragram.org


To fit the blue square to the lens assembly we'll be sandwiching it between two black card layers.
The Magnetic Ring has been stuck to the second card layer instead of the second plastic layer. This means that we are able to use all the lenses while the camera is in Infracam mode.
Try not to touch the blue square with your fingers.
The SnapPiCam is now enabled to take raw Infragram images. You can process the raw images online, for free, using the Infrgram.org sandbox.

Using A Fish-Eye Lens

With No Additional Lenses

The photos of the Swans have been edited in Photoshop.

Infragram Photos

This guide was first published on Mar 06, 2014. It was last updated on Mar 06, 2014.