Hacking A Keychain Digital Camera for Arduino Control by smb
Photography options for the Arduino are few and far between. Webcams aren't practical for applications like kite photography or public photography, unless you feel like buying a 200 foot USB cable. And current techniques for stand-alone Arduino photography typically try to capture raw image data from CMOS cameras popped off of cell phones...and believe me, unless you need to digitally upload or alter those photos in real time, you don't want to go down that road. Why isn't there a normal, cheap, run of the mill digital camera that's controllable by Arduino? 

Turns out there is at least one - and they sell it at your local drug store (CVS/Rite-Aid/Walgreens/etc.) 
It's those chintzy little keychain cameras that they sell for $10-15 a pop. The photography on them isn't half bad with a resolution of about 300 by 200, they can store between 20 and 240 photos (depending on the one you find), and it turns out the little guys were just made to be hacked. You can also do this same hack with a cheap 1 or 2 megapixel camera that takes SD cards if needed (see below), but we'll be stepping through the process used on the more commonly found 300 by 200 cameras.

This Instructable will walk you through the process of disassembling, modifying and reassembling an off-the-shelf keychain camera. It will then walk you through wiring a simple set of transistor switch circuits that can be used by Arduino to turn the camera off and on and snap photos whenever your program desires. It'll also have sample code and plenty of pretty pictures.

Before we start, a few notes: 

*The camera being hacked may change from blue to silver and back in the photos. Don't fret, the internals of both cameras are the same (I'm working with both at the moment for research.). This same camera is sold across the country in different colors, under different brand names and even with slightly different physical casings.

*If this technique sounds familiar, it might be because what we're doing to the camera itself is very similar to the technique used by the CatCam, a project that went viral two years ago by putting small, time-lapse cameras on the collars of outdoor cats and watching where they go. The CatCam's technique uses a camera that's not easily available in the United States, and was written before Arduino really took off - hopefully this revisiting of the technique will help the DIY community rediscover and repurpose it in their projects. I discovered the CatCam as this project wrapped up, and both techniques were developed independently - so my technique likely varies from the CatCam technique; feel free to pick and choose techniques from the two.

*If you are outside the US or willing to order directly from CatCam, the hackable camera they sell is of a higher quality - 1 or 2 Megapixel - and can save photos directly to an SD card. Very nice for many projects (but not necessary for all.) But if you want a camera today, head to any Rite-Aid, CVS, etc and pick up the camera shown here - a Digital Concepts camera, usually distributed by Sakar international.

*My research actually has me controlling this camera via a stand-alone ATMega chip. If you're interested in learning that technique for some reason, let me know - if there's enough interest I'll whip up another Instructable. (I figured there'd be more demand for doing it via Arduino.)

UPDATE: By request I've added the circuit diagram to wire the stand-alone ATMega chip to the chip as the last photograph below. It won't be helpful for many of you, and I apologize for that - I hope to give this step its due diligence - but for those who are determined, it's better than nothing (I hope). 

*This technique is being documented as part of my research at Carnegie Mellon University's Master of Tangible Interaction Design program, in Pittsburgh, PA. If you are considering going back to school, enjoy making things and are interested in the intersection of technology and design or art, drop us a line! :)

Hope you found this helpful - comments on both technology and application are welcome! Feel free to write me directly or comment if you have any questions or want any clarifications.


 
Remove these adsRemove these ads by Signing Up

Step 1: Assemble Supplies and Tools

IMG_0865.JPG
IMG_0814.JPG
IMG_0818.JPG
IMG_0721.JPG
You'll need a few tools and supplies before you can hit the ground on this Instructable. Let's run through them now, shall we? 

Tools:
*A tiny Philips-head screw driver. (About the size of one you might use to repair glasses, or in a computer repair kit.)
*Helpful, but not critical if you have long fingernails - a tiny flat-head screw driver to use as a plier.
*Wire cutter/wire strippers
*Helpful, but not critical - multimeter.
*Soldering iron and solder. (Now, now, don't fret. All you'll have to do is heat up some existing solder and stick a few stripped wire ends into the existing connections. Only rudimentary knowledge of soldering necessary. You might even be able to get away with wire glue on some models, but soldering is safer.)

Supplies:
*An off-the-shelf Keychain Digital Camera. Often sold under the brand names "Digital Concepts" or "Shift." Sold at CVS, Rite-Aid, Walgreens, some Walmarts, and all over the Internet.
*Helpful but not critical - a few spare AAA batteries. The camera should come with one AAA battery. But if you intend to use your project more than a few times or over long periods of time, you'll need spares - the camera eats them.
*A few feet of insulated wire. (Either normal-gauge plastic insulated, shown, or thin-gauge paint insulated is fine - both have their pros and cons; I tend to use paint insulated because I sometimes make custom male headers for my connections.)
*Breadboard or other protoboard.
*Two longish pieces of white wire (for connecting transistors to Arduino)
*Two longish pieces of black wire (for connecting ground from Arduino to breadboard)
*Two longish pieces of red wire (for connecting high power from Arduino to breadboard)
*Helpful, but not critical - an LED (for debugging output).
*Two transistors (I use NPN 2N3904 transistors.)
*An Arduino with USB cable.

peter6961 says: May 3, 2013. 5:22 AM
hi there, ive been wanting to do this for a long time with a Samsung L100 Digital camera, your instructible is very close to what i want to do BUT the only diffrence is my camera like most has the on/off button but the shutter and focus is in one button! now ive worked out that button (focus/shutter) works by shorting ground with focus (like a normal button) but then press it further and it shorts on more time to activate the shutter!
My question is can it be done and why a cheep camera and not something like what i want to do?
Marcaine Art says: Apr 9, 2013. 7:41 AM
Great instructable. I found this one while reading the motion sensor camera that references you. I just ordered a few of these cameras and want to make some inexpensive security cameras for around the outside of my house. Any thoughts on attaching a solar battery and charger to the camera for power?
gkern says: Jul 16, 2012. 6:05 PM
Anyway to keep the LCD Display...
Multhjoned says: Jun 14, 2012. 8:32 AM
Any resolution to the issues below? I'm new to Arduino and want to know if anyone has tried this with a ATtiny chip?
venzorc says: Jan 18, 2012. 3:18 PM
Is the newspaper for static discharge?
benashbe says: Dec 25, 2011. 10:27 PM
Did anyone ever find a driver? This is a great project - my first experience soldering. Thanks!

Ben
starvinartist17 says: Nov 15, 2011. 6:25 AM
I have done all of the wiring and the camera was working fine until I tried to download the images to my computer. I installed the CD and it doesn't recognize the device. I've uninstalled, rebooted, done pretty much all I can think of. What more can I try?
robonerd says: Dec 8, 2011. 6:57 AM
Did you figure it out? I put an email in to the company, but no response (go figure) I may actually have to bite the bullet and call them! I really want this to work! The only thing that doesn't is the stinkin driver for the "el cheapo" camera! lol!
robonerd says: Dec 3, 2011. 6:33 AM
Same problem here. Must be a software issue? did you find a solution by any chance? BTW, this is an awesome instructible! Everything is documented quite well. THANKS!!! I'm wondering if I can use this on an old fuji finepix camera of mine?
magikid says: Aug 24, 2011. 11:23 PM
Thanks for this awesome article! I was looking into the possibility of lifelogging with the arduino and realized that it's possible with something like this. A quick question though, what type of image does the camera output ie jpeg, raw, png?
pcooper2 says: Sep 13, 2011. 8:35 AM
Keychain cameras produce JPEG files, if memory serves.
pcooper2 says: Sep 13, 2011. 8:33 AM
The reason many of the "keychain" digital cameras eat batteries is that they store the images in cheap DRAM, not flash memory. They need to be always on. If the battery dies, so do your pictures, so plan on recovering them from the camera within an hour or two after you shoot them. If the application isn't weight or size sensitive, you could also rig up a HUGE external battery with alkaline D cells that could power the camera for days.
Build_it_Bob says: Apr 12, 2011. 7:04 PM
Excellent work ! I have one of these cams ...just need to find the time to hack it and try your code.

Thanks!
Build_it_Bob
EmptyFlash says: Feb 17, 2010. 5:15 PM
For some odd reason I can't view the pde file. I'll try to make one on my own though.
marthaaa says: Mar 1, 2010. 4:57 AM
 i also can't view the pde file. can you help??????
zoltzerino says: Mar 5, 2010. 2:30 PM
 I'm guessing your problem it that it downloads as a .tmp?

You need to change the extension of the file once it has downloaded to a .pde and open with the Arduino developing environment.
jonnyboy323 says: Feb 13, 2010. 10:24 AM
 Thanks for the fantastic Instructable. It worked like a charm :D
I now understand transistors too.
Jon
NXTreme says: Feb 12, 2010. 1:22 PM
Great idea! I have two of those exact cameras (blue and silver) that I got for about $6 each. I do have one question though as I am a bit new to transistors. Would any NPN transistor work? I have a couple different ones just lying around that I have taken out of random electronic things and I was hoping I could just substitute those. Thanks!
smb (author) says: Feb 12, 2010. 3:32 PM
 I suspect any NPN would work. One way to find out I suppose. :)
NXTreme says: Feb 13, 2010. 6:17 AM
True, very true. Thanks!
mmalham says: Dec 28, 2009. 2:07 PM
I love this instructable. Going to buy a keychain cam tonight. Can you add a schematic for the wiring of the arduino?
Ora says: Dec 16, 2009. 2:12 PM
This is a great instructable. Really simple and easy to do, but still super cool.

Another instructable, or maybe just an additional step, explaining how to build the circuit to use a standalone Atmega would also be helpful.
smb (author) says: Dec 20, 2009. 9:43 PM
Thanks!
I should indeed. To start you on your way I'll at least toss my EAGLE circuit diagram onto the last page. (Unfortunately, I can't seem to embed it in the comment - maybe I have to be a Pro member to do that.) That should help you on your way if you're already familiar with the Atmega-Arduino pinouts.
exabopper says: Dec 20, 2009. 5:58 PM
I've been thinking of doing one of these myself. The camera I chose is by Vista Quest (as used by the Cat Cam www.mr-lee-catcam.de/cc_index_en.htm).  They make (or made) a couple of cameras that have no display for keychain use, but they have 3 megapixel capability, take videos, and output to an SD card, so you can take thousands of pictures or hours of video. Perfect for a kite cam.  I picked up a few at Toys R Us, for about $30 each clearance.  One other thing I thought about is taking the little beeper output of the cam and making it and input for the u-controller, so it would know when the camera had taken a pic and was ready for the next.

Great job overall!  Do you have a cat?  or a kite?  They also use these connected to a motion detector (Deer Cams, or wildlife cams).  Lots of applications here...
smb (author) says: Dec 20, 2009. 9:38 PM
 I actually did ran into the CatCam stuff as I was wrapping up this project (it's cited above somewhere, I think towards the bottom.) I could have avoided some mistakes reading his story first. :P It's good stuff. 

The VistaQuest camera looks swell, but I have yet to find any like it here in the US. I hit all of the major shops in Pittsburgh and chose to hack the Digital Concepts because it seemed the most commonly available.

That said, I really do want one with all of the VistaQuest fancy specs. I wrote the CatCam guy directly, and he generously offered to get me a VistaQuest untouched from his distributor - but I'm opting to try first with a Vivitar, which currently seems to be a much more common option here in the US. (I picked up the Vivitar 5022, a nice 5MP with preview screen and SD card reader up to 8 gig for $30 on sale at Target this week. Moreover, they have plenty of Vivitars at Toys R Us.)

The main downside is that the Vivitars take 3 AAA batteries, as opposed to 1 on the VistaQuest (probably to run the screen) - so the weight difference is significant, possibly too heavy for kite or kitty. I'd have to switch to a lithium ion (one protected from kitty bites at that) to reduce the weight before saddling flyers or felines with that thing.

Using the beeping as an input to make a feedback loop is a slick idea. I'd love to see that in action - I think if each out immediately triggered an in, you'd get a picture about once every second or so. I wonder if you could literally pipe or otherwise hook the beeping straight to a transistor across the shutter and skip the chip all together? That could be a super quick, super cool kite camera construction trick if you're not picky about how frequently photos are taken.

And no, I sadly have neither cat nor kite. Fortunately, I have friends with both. :)
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!