Tag Archives: Gadgets

Raspberry Pi Camera Case – from a Holga

Here’s version 1 of the Holga Raspberry Pi Camera – a hackable, programable camera with a 5 megapixel sensor and HD video capabilities, in retro camera form.

My original concept was to do something like this:

Pi Camera Module camera case sketch
Everything and the kitchen sink

And I managed to build something like this:

Pi Camera Holga Case
And here’s how it turned out..

The Holga is an ultra-cheap medium format camera – if you shop around you can get one for about £15-20 – the model I used for this was the Holga Camera 120N (120 N) (Plastic Lens / Hot Shoe) with the Raspberry Pi Model A – although with a bit of modification it would work with the larger model B. Potentially by soldering the power supply and USB directly to the Pi you could make this a slimmer fit, but I wanted something that didn’t modify the Pi in any way.

The model A Pi fits quite well – you just have to remote the 2 plastic struts inside the case, and peel off the foam that secures the film reels inside the case. I had to remove the plastic panels that enclosed what would have been the flash (my Holga came without one). I cut up a cheap USB extension cable to mount on the top of the camera – and to plug into the side of the Pi. In order to make it fit with the right angled micro USB on the other side I needed to solder and make my own USB cable (you’ll need the shortest USB plug available – I used a poundland retractable USB cable as the source for mine).

If you don’t want to bother with the soldering you could probably just drill holes in either side of the case – there is room, and the plastic is easy to cut through.  

I also added a couple of plastic struts to locate the Pi in place – it’s a snug fit so doesn’t rattle around inside the case.

With the Pi removed you can see how it sits in the camera:

Pi Camera Case without Pi (rear view)
Here it is with all the wires

The yellow wires go to the flash hotshoe – the green to the trigger button on the side of the lens housing, and the red to the power button.

Pi camera case with Pi fitted
Here it’s sitting in it’s case. Snug.

The camera module sits inside the lens with the ribbon cable carefully wrapping around the board and over to the socket – I experimented with Sugru to hold the camera board in place (which would work) but wanted it to be removable, so opted to cut up a piece of spare plastic and drill a hole for the module to peek through – it’s a fairly firm push fit which holds it in place. The lens can still be rotated a little to make it easy to level the Pi camera.

For the power switch I used the same circuit as for the Motorola Lapdock, and added it to the lens mount. I’ve also added a press button on the other side to use to take photos – this will be (eventually) wired to the GPIO.

Pi Camera Detail
Here’s a closeup

Despite it’s cheapness the case feels solid – most of the modifications could be done with a sharp craft knife, apart from a few places where the plastic was thicker or I needed to make holes and a dremel was needed. There’s a lot of empty space inside this case so plenty of room to add things later (I wanted to add a speaker and a few other outputs and inputs, so will do later..)

Overall this was a fun project – all the messy cables and glue are neatly hidden (I went a bit overboard on the glue gun when soldering my USB extension cable) and the case was fairly easy to work with.

The case also has a nice screw mount for a tripod – handy for securing the Pi with camera to things.

Making it more than ‘just a camera’

Replicating a simple Camera with the Pi and Holga (HolgaPi? Piga?) would be a bit boring so my aim with this project is to provide a nice case with the possibility of extending it beyond what I could achieve with a normal compact camera.

At the moment the GPIO isn’t connected to the shutter button or flash trigger – i’ll do this next and write up the method in another blog post.

Things to do:

  • Think of a name
  • Calibrate the viewfinder
  • Write / find some code to make the camera operate over a network. As it lacks a screen the idea of putting all the camera controls into a web app makes sense
  • Add an LED indicator to the viewfinder
  • Add a speaker and think of some sound effects for the camera to make
  • Make use of the flash hotshoe (I’m thinking of using an opto-isolator for this, as some flashes have high trigger voltages running through them)
  • Add some more inputs – this could make the basis of a camera trap. Would be fairly easy to make this rainproof. As it is it would work with a Makey Makey…
  • Write some code to make the GPIO stuff work. I’m relying on this blog post to learn how.
  • Spray it red / green to match with the Pi look, neaten up the lens mount where the glue has discoloured the plastic
  • Investigate batteries or solar power
  • See if I can add a filter mount
  • Send a detailed proposal to the Lomo people to ask them to make a modified Holga case for the Raspberry Pi

Update: check out the following posts in the series.

MaKey MaKey + Moleskine notebook + Graphite pencil = sketchy controller

As part of my ongoing kickstarter addiction I’ve recently acquired a MaKey MaKey – a sort of universal keyboard adapter gadget based on an Arduino-type microcontroller, that lets you turn virtually anything that conducts electricity into a USB keyboard or mouse.

MaKey MaKey board
It even lights up when you plug it in..

The board comes supplied with a pack of crocodile clips and a nice long USB cable – on the MaKey MaKey website there’s a list of ideas to try (apparently bananas work well as a piano). All you have to do is find something suitably conductive, connect them up with the clips, and away you go.

The simplest interaction is creating a space bar input – this Olympic hurdle game from the ONE Campaign works well as something to try.

I’ve done a bit of experimenting to see what conducts with the aim of making controller doodles in my moleskine notebook. Conductive paint from these guys works – interestingly metalic effect paint and ink doesn’t work (I suspect as the metal is in a suspension).

The easiest and most sketchable I’ve found is using a big chunky graphite pencil like this one KOH-I-NOOR Jumbo Woodless Graphite Pencil 6B available from amazon for a couple of quid:

image of moleskine jump button and MaKey MaKey
hitting the gap between the U and the M creates a space bar press

You have to press quite hard with the pencil to get a good circuit – shorting the gap between the U and the M with your finger is enough to register as a space bar press:

Playing the race against hunger game with a MaKey MaKey
Ignore my score, it’s hard to hit jump and hold a camera at the same time..

So there you are – a sketchable, moleskine portable control interface! (even if it does get a bit smudgy after extended play).

Check out the ONE Campaign race against hunger game here.

How to turn the eeePC into a media centre (and get iplayer to work in fullscreen)

I must admit to being a bit of a fan for the Asus eeePC. I have a black 701 model which I impulse bought after the price hit £150, and i’ve found it to be a really superb machine.

Although the default Xandros boots up very quickly and is handy for checking emails on the fly, I eventually installed Ubuntu eee onto a removable SD card. It took me a while to work out how to get it to work, so I’ve added some instructions to the Ubuntu eee wiki to make the process easier.

I remember when I first got my eee one of my friends commented on using it to watch BBC’s iplayer – now one of the most popular ways to watch telly in the UK. However when I tried the video was very choppy – and only worked when not running in the full screen mode.

Initially I put this down to the eee’s fairly paltry celeron processor – at 600 mhz it’s fine for a simple bit of web surfing and word processing, but for anything more taxing it’s a bit underpowered, so I assumed that full screen video was beyond the reach of the eee. However after a bit of digging I found a discussion of Linux v Windows on the eee Forum here, which indicates that it a problem with the firefox / linux flash plugin. Rather than install Windows XP – which once i’d spent additional money on buying anti virus would be almost as much as I spent on the machine itself, I wanted to find an open source way of getting round the problem.

I’ve been running XBMC (X Box Media Centre) on my old modded xbox for some time now – hooked up to a telly it makes a handy way of watching DVDs, online media and networked media off a NAS drive. Given that XBMC works flawlessly off a machine with 64megs of ram and eeePC should be no problem.

So a visit to http://xbmc.org/ later and an install I got xbmc working – and it works really well.

Note that there are a few steps to go through rather than rely on Ubuntu’s built in add new software tool – you have to add the sources to the software sources control panel:

deb http://ppa.launchpad.net/team-xbmc-gutsy/ubuntu gutsy main

deb-src http://ppa.launchpad.net/team-xbmc-gutsy/ubuntu gutsy main

then type the following into the terminal application:

sudo apt-get update
sudo apt-get install xbmc

but once I’d got that over with XBMC appeared in the applications folder like normal.

Next step is to install the iplayer plugin:

See http://code.google.com/p/xbmc-iplayer/

The iplayer plugin works by using the BBC stream intended for ipod / iphone users .

(See comment below) The iplayer plugin uses the same streams as the Flash interface on the iPlayer website, in all it’s VP6 quality (higher-res than the iPhone stream), and with future improvements to the XBMC RTMP client, may also be able to stream the high-quality H264 streams also offered via the Flash interface instead.

Which explains why it looks better on the eeepc than on my iphone.

And I can report that it works in full screen no problem with the eee. Which makes the possibility of the eee becomming a handy ultra portable media centre. There are a few issues – very occasionally it freezes after watching a programme, and it doesn’t work smoothly with compiz, but these are really minor – the more I play with XBMC the more it impresses me.