Tuesday, August 09, 2005

CVS Disposable Camcorder Project

I saw a hacking project on Make: Blog to repurpose a CVS Disposable Camcorder and this note describes what I did.

Saturday after breakfast I dropped into CVS and paid $30 for a disposable camera. This camera is supposed to be used once and then returned to CVS for video extraction for an additional fee whereupon they will give you a DVD of your video and they'll recycle the camera.

I had read about various efforts to repurpose this camera by buying it, fabricating a cable for it, and then installing software to unlock and then extract the video onto my computer.

The project had hack value, so I bought the camera and started researching the project. Happily, others have done all the hard work, so I was able to glom onto a couple HOWTOs and download all the software.

The project seems to be well within the grasp of a technically oriented teenager. It doesn't entail anything more dangerous than cutting wires and soldering them. I should put my son to work building another interface cable and installing the drivers on my other laptop.

The first thing I did was to study the camcorder I'd just purchased. It had 3 buttons on the back and by pressing them all simultaneously while powering up the device, I was able to ascertain its firmware id. At the top of the camcorder is a sticker. Beneath it is a slot wherein you can see the edge of a circuit board and ten contacts.

Those contacts match the docking port of a Palm Pilot. Happily, I have several and I also had some surplus Handspring Prism docking stations. I decided to sacrifice one of these. That was a mistake. After I dremelled free the connector from my Prism docking station, I noticed its pins were spaced 8-wide instead of 10-wide. Ooops, discard that.

Second try I sacrificed a Palm Pilot M100 docking station. It had the right number of pins at the right spacing. I disassembled, and then desoldered it to get a little circuit board with nice plated-through holes. Sweet. I got the circuit board nice and clean and then picked around to find a USB cable to plug into it.

This is how you tell if a cable is wrong: you hook up the camcorder on one side and the computer on the other side, and nobody does anything. If the cable is good, you'll hear Windows make a bloop-beep sound of something being plugged into the USB port, and you'll hear the camera light up, beep and power on. (You don't need to install any software to get this much response.) But my cable was bad and I got nada.

Remember that Handspring Prism USB docking port? I tried that. Advice: DON'T. It has a nonstandard USB connector that doesn't pass through the red signal. More Advice: Ohm out (test continuity) all the wires of any cable you try to fabricate.

I went sorting through junk boxes and a friend gave me a USB cable for my second attempt.

The Palm docking cradle's circuit board didn't clean up as nicely the second time I desoldered all its wires. I didn't have any solder wick, and discovered that air-in-a-can works wonder on hot solder. It removed the excess and got the board relatively clean without more than a few pinprick burns. (I became a Mathematician instead of an Electrical Engineer, because when I was in High School I couldn't solder. Go figure.)

After you have a working cable, you can connect the camcorder to your Windows XP box and it'll tell you that new hardware has been detected and ask, "Do you want to install drivers for it?"

DON'T tell it you do unless the following drivers have been installed. And do tell it you want it to ask again the next time it sees this unknown device. (There's a checkbox you want to keep clear.)

Drivers are fairly straightforward, but there's not much handholding. You need two programs: one low-level usb library thang and one higher-level talk to the camcorder thang.

The low-level thang is LibUsb-Win32 on Source Forge you'll need to decide which version you like and then download, not one, but two files. I downloaded these:
  • libusb-win32-device-bin-0.1.10.1.tar.gz
  • libusb-win32-filter-bin-0.1.10.1.exe
If you just download the EXE, it'll install itself, but NOT the inf-wizard.exe that you'll need. (I suppose if you've got mad Windoze Device Driver skills, you won't need inf-wizard.) Thus you need to get the "device bin tar" file, too. I put that in a directory under the libusb-win32 install.

Once you've got this installed on your machine, you're ready to plug in the camcorder again. Still don't setup the device driver, but DO run inf-wizard. It'll look at the USB and ask you some questions you can click through, and it'll create an INF file. Pay attention to that and where you put it.

Then go back to Windoze and tell it you do want to install the device driver, and you do want to specify where it goes to pick up the device driver and you will tell it get the device driver out of that INF file.

Windows should then be satisfied and you should be ready to talk to the camcorder.

At this point, there are two perfectly suitable programs: Ops and SaturnDownload. They probably share a lot of code. Ops is a clicky windows MFC program and SaturnDownload is a command-line program. It's simpler and I think I prefer it because it leaves no room for mistakes. Just run it and it'll download your videos.

To recap, this is what you'll have to do:
  1. scrape up $30 from a paper route or something for the CVS camera
  2. scrounge parts for a cable from an old Palm synch cable and a USB cable. Learn to solder them together. If you're a True Hack, you could install a USB socket in the camcorder case. That idea has some appeal. Assemble the cable.
  3. install libusb-win32, create an INF, give it to Windows, install SaturnDownload
  4. take a lot of videos and gloat about how much cheaper this is than theKodak EasyShare that I paid 10x more for six months ago.
Further Reading:

Acknowledgements: I didn't do NOTHING except scope out what everybody else had posted and follow the instructions they left for me. This missive exists to point out the parts where I had to scratch my head and figure out what I was doing wrong.

UPDATE: some have complained of being unable to see the video despite hearing the audio. Problem is lack of the xvid codec. I found the following files in my c:\windows\system32 directory. I presume they are vital to getting the codec to work. (You probably need to google for someone who knows what he's doing.)
  • 09/06/2004 05:06 PM 53,248 xvid.ax
  • 07/03/2004 09:59 PM 524,288 xvidcore.dll
  • 07/03/2004 10:08 PM 139,264 xvidvfw.dll

No comments: