Time-lapse photography is cool, and I like both photography and cool things, so I made my own time-lapse camera based on a Raspberry Pi Zero W. That's a little computer that's half the size of a credit card with built-in WiFi -- it's very similar to what's in your phone without the telephony or the screen, but with a good camera available as an add-on.
Other people have done similar things, but when I started this project I didn't see any other projects implementing exactly what I wanted, and the solution to that is to do my own.
There are hardware and software components to this project, obviously. In this article I'll describe the hardware design, but I'm not going to provide a pin-by-pin guide for soldering this together. If you have experience with adding buttons and LEDs to a microcontroller (it's not hard to learn), you could design your own. Basically it's a Raspberry Pi computer with built-in WiFi and an add-on camera, and to which are connected the equivalent of seven buttons, one LED, and a two-line monochrome LCD character display.
The software and system configuration will be described in a follow-up article. That's where all the functionality is implemented, where I provided for some cool features, and where further improvement could be made. The hardware just gives the software the tools needed to interact with the user and with the photographic subject.
As you can see, there are three buttons, a number wheel, and an LCD display on the back for the user interface. Using a transparent back meant that I could solder the LCD display to the circuit board within the case rather than attach it to the project case back, so no extension of wires to the display were needed. That made fabrication much easier since the LCD alone has twelve connections, and it's easier to make a point-to-point connection on the circuit board than it is to solder free wires directly to the LCD board.
The LCD display has two lines of 32 characters. It's a very common and inexpensive component, and the AdaFruit software libraries for the Pi make interfacing to it easy. I use it to display how much free space is left on the SD card, how many frames it's taken in the current sequence, for setup menus, etc.
The red button stops and starts the taking of a timed sequence of images. When in setup mode it's used for selecting a setting. The leftmost button enters setup mode and cycles through the menus for resolution, shot interval, video frame rate, etc. The middle button cycles through the list of options for one menu.
A cool feature is the number wheel on the upper-right. This wasn't in my original plans, but it leaped out at me at the electronics store. It scrolls through the digits 0 to 9, and I use it in conjunction with the setup menu to set the number of seconds between frames. Select Seconds or 10 Seconds or Minutes in the setup, then set the number of those units with this wheel. It has four contacts with a common ground that are read by the Pi just as if they were buttons, and the value is determined by treating them as four binary digits. Unlike the menu settings, this can be changed while a time-lapse sequence is in progress if for any reason I want to adjust the interval.
There's nothing on the front but the camera lens poking through a hole in the case where it's glued in place from the inside. The camera is the standard original camera for the Raspberry Pi which connects to the Pi's board with a flat ribbon cable. There is no viewfinder or video preview screen for the camera, but I can use my phone for that with WiFi.
The Pi is attached with posts and screws to the front of the case. A circuit card "hat", is attached to the GPIO pins, providing a place to attach other electronics and to connect them to the GPIO pins. The LCD display is soldered to the hat with a set of pins. The buttons and wheel are attached to the case and connect to the hat with individual wires. There is a red LED on the board, which the program blinks whenever a frame is taken. You can see peeking over the LCD display a little photoresistor connected to a pin on the display that controls its brightness.
The "hard drive" for both the operating system and the captured images and videos is a 64 GB micro SD card. That's inserted into a slot on the Pi, which is at the bottom of this stack of components. It is not reachable without removing everything from the case, and that could be difficult to do since the camera is glued onto the front of the case. There is no access to the Pi's USB port, so all access to the device and the images and videos it creates is via WiFi. I must be careful when making any modifications to the system to not break its ability to at least boot to the point that WiFi is up and properly configured. Otherwise I'd need to disassemble it to get to the system on the SD card or to connect a keyboard and monitor.
Power and mount
Power is through a USB cable coming through a hole in the side of the case, better seen in the image of the front above. It has a USB Type-A plug so that it can be plugged into a power bank for portable power. My 10,000 mAh power bank easily keeps it running for several hours. Captures that take longer than that require wall power for which a USB Type-A extension cable is needed
It sits on a base made from FORMcard thermoplastic which was shaped around a bolt to make threads for attachment to a standard tripod. A buckled strap was set into the plastic when it was soft, and that holds the camera in place. I added a little epoxy to help secure the strap to the base, and some of that seems to have seeped through and permanently attached the camera case to the base, too. That wasn't my plan, but since a time-lapse pretty much requires a stable base, it works fine to just keep it on a lightweight tripod. The legs on this one can extend to a normal height. A plastic baggie hanging on the tripod handle looks a little ghetto but serves as a holder for the power bank.
Software and system
What all this can do when put together is determined by the software. It looks like a camera, but it's really a computer with a camera module attached. The software is on GitHub. An article describing the software's design and use will be in a follow-up article here soon.