Time Lapse Camera

So, on a Sunday night I was pretty much alone. I had been wanting to make my old digital camera into a time-lapse camera for a while now. Seeing as there was nothing better to do I tore apart and figured out my old camera. The idea of being able to take time-lapse photos with a portable device that could be battery powered, or in the least not require a computer was really a neat one. Every time I have an idea for a time-lapse photo to make, I have to use my laptop, install drivers, webcam software and generally waste a whole lot of time. Since I hadn’t been using my old digital camera, it seemed perfect to put it into use again.

Just as I suspected, it was very easy to control the camera power switch and make it take pictures. Basically just shorting the control wires to ground would cause the desired effect. I brought wires out for power and ground as well as the power switch and the shutter release. I designed and soldered up a simple circuit using a PIC18F252 microcontroller. At first I considered using transistors to drive the control wires on the camera, but then I decided to just hook them directly up to the PIC. I also made a power supply to give 6 volts to the camera in place of batteries. After writing a bit of code, I had the camera turning on and off and taking pictures.

Power Problem

Because the camera has a flash, the power requirements on startup are very huge. So huge that it caused my voltage regulator to go into shutdown and crash the PIC. I disconnected the flash itself, but the capacitor is buried so far inside the camera that I can’t easily disconnect it without zapping myself or destroying the camera completely.

In order to solve my power problem I installed an extra capacitor and voltage regulator for the camera. Now it still takes a few tries before the camera comes on, but it doesn’t crash the microcontroller.

This unreliable camera booting led to the problem of the PIC not knowing whether or not the camera was actually on. It would turn the camera on, take a picture and then turn it off, but this could easily get reversed if the camera didn’t respond or didn’t boot properly. Then the camera would be off when it should be on, and vice versa.

I decided to add another connection to the camera so that the PIC could tell if the camera was on or off. For this I just connected a wire to an LED which is on when the camera is on. I also did away with the “turn off the camera after taking a picture” code, since I feared that after taking hundreds or thousands of pictures, it might quickly wear out the gears on the camera from moving the lens in and out so many times. So, now the code just makes sure the camera is on before taking a picture, and even if it takes a few tries before the camera boots up, the PIC just sits there trying over and over until everything comes to life.

Apart from the turn-on surge that the camera takes only when it’s first booting, the power consumption for the entire circuit is very low, less than 2 watts. Also, it can run directly from 12 volts DC, so long-term battery operation is quite plausible. With code that turns off the camera, taking pictures every 30 seconds or more could take even less power by shutting the camera off completely.

Time Lapse Control Board

Controls

To make lots of different types of time lapse fun possible, I used a set of DIP switches to adjust the time between exposures. The time delays for actually taking a picture and waiting for it to save are fixed, and based on how long my camera takes to turn on, take a picture and save it. But the time that the code waits before taking the next picture is configurable. There are seven bits which select between 1 and 127 seconds of delay.

Another switch is used as an inhibit switch, which stops the code from trying to control the camera. This is very important when you’re trying to use the menus on the camera without being interrupted by a pesky circuit trying to take pictures for you. Just flip the switch and power stays on but the code doesn’t do anything.


Downloads


Conclusion

Well, now that I’ve tried taking some action shots of driving around town with the camera in a car, I really wish that it could save pictures faster. This would make it much more fun. Although for longer time-lapses, like a whole day, this system would be fine. At 640×480, a 128MB memory card holds over 900 images.

I’d like to add a tripod mount as well as a weatherproof housing. Also, I got a 2AH 12V gelled cell for $4 which I think I’ll try adding. Total battery power would be really handy.