DSLR Camera + PI

DfgDfg Admin
edited August 2012 in Tech & Games
There are times when I wish I didn't have such a massive penis... oh wrong start.

Ahem, If your not living under pygar butthole you would know what Raspberry Pi is, so I will skip everything and just paste the article. IMO this project has a huge potential.

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.
IMG_0631-300x300.jpg
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. 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.
Possibilities include:
  • 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.



MG_0403-150x150.jpg
MG_0399-150x150.jpg
MG_0401-150x150.jpg


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! icon_smile.gif
–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….



MG_0396-Edit-300x300.jpg
I initially started by powering it externally, so then I tried the device shown on the left. It’s the guts of an iphone car charger, which converts 12v to 5v, so I tried to see what it would put out if connected to 4xAA batteries, which is the end goal for power,as I want to be able to swap batteries during a shoot. Unfortunately, the DC-DC converter drops a volt from the 5.25v set of batteries I tried, giving me 4.25v. Not enough for the Pi. Putting it on a 12V supply gave me a nice 5.02v, but it’s more difficult to source a 12v battery that’s small enough for my purposes. However, I then spotted the parts lying on my workbench, and as I sat there looking at the parts I’d already taken out of the battery grip, I realised it might be possible to use some of them to make a compartment for a Canon 5D Battery, which runs at 7.2 volts. A quick test with one of those batteries showed the output of the DC-DC converter at a steady 5.02 volts, so I then attempted to boot the Raspberry Pi. And up it came. I measured the current at 450-480ma, with a Microsoft wireless keyboard/mouse USB adapter in the USB port. I could ssh in, so the network port was fine with that PSU. Great, Next to mount one of those batteries in the grip. Check out the following pic to see what I did there….









MG_0404-150x150.jpg
MG_0411-150x150.jpg
MG_0413-150x150.jpg


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.


MG_0420-300x300.jpg
This image shows the Canon 7.2v 1800mAh battery. I’m not sure yet how long it will drive the Raspberry Pi when in use, but the initial measurements of 480mA when idle looks promising. So I should get a few hours anyway, which is ideal.


MG_0421-Edit-300x300.jpg
And the whole setup put together. the white tab you can see on the right hand side is a spring loaded hook that keeps the battery locked in. Once you hold back the tab, the battery can be removed. I’d like to have a door on this to further hide the battery, but this is fine for the moment. I can boot up, and log in using a Microsoft wireless keyboard/mouse combination, connect to the network, browse the web, etc.


usb-300x249.jpgI’ve ordered a nice neat USB cable for connecting the grip and the camera together. It’s 15cm long, with right angled connectors.



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! icon_smile.gif
Also, I’m blown away by the interest in the project, nice to see! And lots of positive comments! icon_smile.gif
Next to play with more tethering… or USB-key backups… There’s so much to do… icon_smile.gif
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

Amazing: http://davidhunt.ie/?p=2641
Sign In or Register to comment.