I’ve had the idea of embedding a computer DSLR camera for a couple of years now, but for whatever reason I never got around to implementing it, mostly due to the cost of small single board computers. Until now, that is. With the release of the Raspberry Pi, embedded computing has all of a sudden become much more affordable. At €35 for the computer, it’s far cheaper than any of it’s rivals.
So what I’ve done is take an old (broken) battery grip that I had lying around (for my Canon 5D Mark II), and made a few modifications to it so I could fit the Raspberry Pi SBC (Single Board Computer) into it.
The result is what I call “Camera Pi”.
I left a few holes in the case so that I could get at the USB and network ports, and video port. it’s a fully functioning computer with a Linux Operating System (Raspbian), has 2 USB, network, video, HDMI and GPIO.
- Wireless tethered shooting – attach a Wifi dongle to the USB port, so I can transmit pictures to a PC or tablet PC as I’m shooting.
- Attach a USB memory key or hard drive so I can back up the images on the camera.
- Remote control the camera using a PC, tablet PC or smartphone (from anywhere in the world).
- Intervalometer – take a picture every few seconds for those high-speed sunset sequences, including exposure adjustment as you go.
- On-the-fly image conversion for faster previews on remote display device (iPad, etc).
- Add a small LCD display to give status, allow user input via buttons, etc.
- Trigger camera via shutter release port, also allows waking up of sleeping camera, which cant be done via USB.
There’s plenty of work to be done on the software side of things but the prototype is working. I can pull images from the camera and transmit them via either Wifi or ethernet. There’s a significant problem with the current USB drivers on the Raspbian linux disribution, though. After a few requests to the camera, the gphoto app responds with “Unknown Error”, and the only solution seems to be to unplug the usb cable and re-insert it. Not a workable solution, so I’ll have to look into that. Works fine on my other linux box, but a full-sized PC won’t fit into the battery grip!
–Note– I found a wee ‘C’ code snippet that will reset a USB port, and that seems to do the trick if I call it between each gphoto2 call. Not ideal, but it gets me away from constantly unplugging the cable….
The first pic of the three shows the original double compartment. Next shows the compartment split in two, and the third shows the compartment mounted in the grip with the Rasberry Pi. There’s just enough room above the Pi to mount the DC-DC converter, and the final result is shown below.
Update on 16th Aug 2012
I spent a few hours this evening putting together a perl script for tethering, and I now have it working. The script queries the camera for images every second, and gets a list of images. It compares against a list of already download images, gets the new ones, then sends them to my iPad which is running shuttersnitch. I can press the shutter on the camera, which is not affected by the gphoto2 queries from the Pi, and a second or two later the Pi takes the image from the camera into the Pi. Then the image is transmitted to the iPad. If there’s an interruption between the Pi and the Camera, the Pi will transfer all images that it has not previously transferred before when communications are re-established. Here’s a quick video demo:
Update on 18th Aug 2012
I popped into my local electronics superstore this morning, and picked up an 802.11n WiFi Dongle. Nice and small, about 10mm square. I’ll post pics of it later. Suffice to say, the Raspberry Pi is now associated to my 802.11b router, and pulling down new packages as we speak. It’s based on the Realtek RTL8188SU chipset, so should be good for a wifi hotspot. So, that’s another milestone achieved!
Also, I’m blown away by the interest in the project, nice to see! And lots of positive comments!
Update on 19th Aug 2012
Main news for today is that I got the camera triggered via shutter relase cable from the GPIO pins on the Raspberry Pi. I built a circuit that will allow me to trigger both pins on the shutter release port. While this may not seem significant, it allows me to wake up the camera if it goes to sleep by sending a pulse to the “half depress” pin on the shutter release port. So now I’ve two methods to take a picture, one via the USB, and the other via the Shutter Release port.
Oh, and I also got a quick script done to do a 5-exposure bracketed shot, -4, -2, 0, +2 +4.
Next to play with more tethering… or USB-key backups… There’s so much to do…
More to come….
Parts List (so far):
- Raspberry Pi – €35
- Battery Grip – €35
- 7-12V to 5V DC-DC converter (probably about €10, I had one lying around)
- 7.2v 1800mAh battery (£9.99 from 7dayshop.com)
- 15cm USB cable €4
- 802.11n WiFi Dongle €20 (much cheaper on eBay, though)
Raspberry Pi is a trademark of the Raspberry Pi Foundation
About the Author:
By day I’m a senior embedded Linux software engineer working with Emutex Ltd, an Embedded Software Solutions company in Limerick Ireland. In my spare time, I take pictures, and play with gadgets and technology.
Other interesting DIY projects:
- Macro Pi – Focus Stacking using Raspberry Pi
- Water Droplet Photography with Raspberry Pi
- Tri-flash – three strobes on one mount
- Infiniband at Home (10Gb networking on the cheap)
- Lapse Pi – Time Lapse rail using Raspberry Pi