Raspberry Pi Camera

Personal Project
Summer 2020 - Present

Since summer 2020, I have been working on my own project to design and build a handheld digital camera using a Raspberry Pi Zero. Hardware assembly and electronics are now almost finished, so my focus has shifted to the on-board software and user interface.

The camera features a 3.2 inch TFT touchscreen, an illuminated shutter button, and an RGB status LED. The device is powered by a 6700 mAh USB power bank, held in a custom-made chamber inside the device. The housing is designed to work with the Raspberry Pi high-quality camera and standard camera modules. For testing purposes, the camera currently installed is a 5 megapixel ZeroCam mounted to a 3D-printed adapter so it matches the RPi camera geometry.

The CAD model was made in Autodesk Fusion 360. Most of the plastic parts were 3D-printed from PLA, except for the grip, which was salvaged from an old phone case, and the light tubes, which were cut from acrylic sheet and polished. The rest of the bespoke parts were made by hand using a pillar drill, belt sander, hand tools and good old-fashioned elbow grease!

Gallery

This project has no images :(

Why?

I've always thought most modern cameras look the same: boring, generic black plastic boxes plastered with buttons and dials. Having used a typical DSLR in the past, I also knew how much of a learning curve it was just to get used to the dozens of controls. This got me thinking: why does the visual and user-interface design of most cameras seemingly lag so far behind other modern technology, like laptops and smartphones? It's the 2020s now, Alexa can practically read my mind and yet my camera doesn't even hint at how to set the clock!

At this point, it might have been wiser for me to just shrug and get on with my life, but I was looking for something to do last summer so I took it upon myself to build a better-looking and easier-to-use digital camera. Suffice to say, it has been quite a challenge!

Design

I began by selecting the components and materials with which to build the camera. Being a student, I didn't have much to spend so my budget for the project was just £80, although this wasn't so unreasonable given that the Raspberry Pi Zero cost just £12.50 (and that's with WiFi!).

I did of course have a 3D printer at my disposal, but since part of the point was to make the camera look good, I wasn't about to settle for budget white PLA as my exterior finish. My only real option, therefore, was to make the housing by hand out of wood and/or metal. Luckily, I found some offcuts of 4.5mm thick aluminium channel and 0.5mm aluminium sheet lying around, along with plenty of hardwood offcuts, so my material cost was zero (maybe that's cheating, but it helps save both my bank balance and the planet, so it's a win-win!). I also had a few bits of veroboard and wire I could use to build any electronic circuits I needed.

The main components I did have to buy were:

  • Raspberry Pi Zero W V1.1
  • Waveshare SpotPear 3.2" SPI TFT Touchscreen
  • The Pi Hut's ZeroCam (for testing purposes, in case I broke it - one day I'll replace it with the new high-quality camera)
  • RavPower Luster 6700mAh portable power bank (this is just a standard smartphone power brick, way cheaper than a purpose-built Pi power supply and holds several times more charge - I chose this one for its compact form factor)
  • A 40-pin GPIO ribbon cable and a super-short USB cable to connect up all the components
  • A big metal pushbutton with a white LED ring, to serve as a shutter button
  • Some RGB LEDs, because even on a budget you can still have a little bit of fun, right?

Whilst I waited for the components to be delivered, I started sketching out how I wanted the camera to look, eventually settling on a wooden housing with metal plates on the top and bottom - a configuration which I hoped would make assembly a bit easier (it was still incredibly fiddly though!).

Once the electronic components arrived, I did a bit of reverse-engineering to produce CAD representations of them in Fusion 360, then arranged them to fit in the approximate desired envelope whilst trying to keep the design as compact as possible. The housing and other components were then designed around them, with a few very important considerations:

  • The only external fixings were to be on the bottom or hidden inside the battery / SD card covers (after all, I was going for aesthetics here)
  • The plastic parts should be printable with minimal support material
  • Any fixings had to be accessible when the components were assembled in the intended order
  • Most parts should be separable; glued joints should be minimised
  • I had to be able to actually make the wooden and aluminium parts, by hand

Many days of head-scratching later, I finally had a CAD model that, at least in theory, would work. In theory...

The Build

To make the housing, I started off by laminating a few pieces of offcut sapele to produce a blank of roughly the right shape. Although I mainly chose it for the colour, sapele turned out to be a rather good choice as it is both reasonably hard and fine-grained, which allowed me to achieve the under-5mm wall thicknesses I was aiming for without the wood breaking or splintering. I then spent many a warm summer day chiselling into this blank, gradually hollowing out the cavities that would house all the internal components, before carefully shaping the outside with a belt sander to achieve the smooth form I had designed.

With a pillar drill as the only large machine I had access to, I had to improvise with some of the metal parts. I soon realised that hollowing out a pocket without a milling machine is incredibly difficult, and a job that would have taken 10 minutes on a vertical milling machine took a good few hours with a file and a cordless drill. However, the result was a camera surround that nicely finished off the front of the camera and doubled as a back plate to screw the camera module into, all whilst keeping the screw heads flush with the inside wall.

Meanwhile, I kept my 3D printer busy with all the structural plastic components that fit inside. By far the largest and most challenging of these was the battery chamber, which not only had to align the USB connector perfectly with the socket on the battery pack, but also incorporated a captive ejector pin designed to print as part of the assembly. This was the first time I had used my Ender 3 for a print-in-place mechanism, so I was unsure how it would perform. However, after a little... encouragement with a penknife, I was able to free the pin and it slid back and forth with just enough travel to fully eject the battery - not bad for a first attempt!

With other parts, I was not so lucky - the circuit board cover, which acted as a diffuser for the RGB status LED, took 8 iterations to get just right. Several weeks were spent going back and forth between the garage and the 3D printer in an effort to be as productive as possible, but in return for the countless trips up and down the stairs, I got from a block of wood to an almost-finished camera in around 6 weeks.

Now came the most difficult part of the entire project: assembling it. I had made the design as compact as I possibly could, which is another way of saying I made it as fiddly as I possibly could. This threw up no end of problems, especially when it came to fitting the circuit board into the top of the housing without pushing the top plate up and leaving a gap. Even now, this problem still pops up (no pun intended) whenever I have to reassemble the camera - something I try to avoid as much as possible!

What Have I Learnt?

The short answer: I've learnt a lot.

There is, perhaps, no better education in design for manufacture and assembly (DfMA) than to design something that you will have to make and assemble yourself, especially something as complex as a camera. When space is at a premium, tolerances matter. Though I never formally specified a tolerance for the project, the rule-of-thumb I worked to was to expect anything I made by hand to be up to 1mm out - probably a fair estimate, but in hindsight I would have left just a little more room, if only to make assembly a bit less frustrating.

Wiring takes up more space than you think. Epoxy resin never sets exactly where you left it. Human eyes are annoyingly good at telling when things aren't circular. Or straight. Or parallel. The list of little realisations goes on, but the experience will mean that in future, I will be more wary of them and design to accommodate the inexactness that inevitably comes with making and assembling physical parts.

Would I recommend this kind of project? It depends. If you have several months to spare, if you're prepared to suffer setbacks and if you're determined to see it through, then by all means do it! The joy of making something really cool from scratch is well worth it - and the experience you'll gain along the way is invaluable.