Build your own matchbox sized DIY timelapse spy camera for only $30

Feb 2, 2017

John Aldred

John Aldred is a photographer with over 20 years of experience in the portrait and commercial worlds. He is based in Scotland and has been an early adopter – and occasional beta tester – of almost every digital imaging technology in that time. As well as his creative visual work, John uses 3D printing, electronics and programming to create his own photography and filmmaking tools and consults for a number of brands across the industry.

Build your own matchbox sized DIY timelapse spy camera for only $30

Feb 2, 2017

John Aldred

John Aldred is a photographer with over 20 years of experience in the portrait and commercial worlds. He is based in Scotland and has been an early adopter – and occasional beta tester – of almost every digital imaging technology in that time. As well as his creative visual work, John uses 3D printing, electronics and programming to create his own photography and filmmaking tools and consults for a number of brands across the industry.

Join the Discussion

Share on:

I’ve been a huge fan of the Arduino for quite a few years now. It allows me control cameras and lights in ways that would be otherwise impossible. As an open source project based on the Atmel AVR microcontrollers, compatible boards come in all shapes and sizes now. One such incarnation is the Adafruit Trinket, a tiny Arduino clone based on the ATtiny85. It’s extremely small, and ideal for projects like this one.

To show off the Trinket’s abilities, the folks at Adafruit built a tiny timelapse camera. Using a mini spy camera module with a built in microSD slot, the Trinket controls all the timing for when shots are taken. The whole thing fits inside a matchbox, but Adafruit are a little more practical than that. They designed a custom case for 3D printing and made the plans for that available, too.

YouTube video

To make the camera, you only need a few components.

Total cost is around $30 plus a memory card. The camera module accepts microSD cards up to 32GB in capacity. Given the relatively low resolution (1280×720 for stills), that will let you record for hours. This camera module has three connectors. One is positive power, one is ground, and one is the trigger signal. When the trigger signal is connected to ground for a brief moment, it fires a shot and saves it to the microSD.

This is the mechanism the Adafruit Trinket takes advantage of, as there doesn’t need to be any real communication between it and the camera. And it’s also not having to process any image data itself. This is essentially the same way I’ve controlled DSLRs and other cameras with Arduinos myself.

Power comes from a 100mAh 3.7v LiPo battery. This goes into a little charging circuit, so that it can be charged while the system is in use. Otherwise, it would probably run flat in about an hour. To charge the battery, power simply comes from a USB cable plugged into the Trinket. Power to the system, then gets sent back out from the charging circuit to the Trinket and the camera module. This way, whether the power is being pulled from the battery or USB, everything gets the power it should.

You could actually save yourself a little money if you already have a USB battery or intend to keep it permanently on USB power. You can completely eliminate the 100mAh battery, charging circuit and on/off switch, saving yourself about $12.

As ground is common, only a single wire is required between the Trinket and the camera module. The camera module’s trigger goes into digital pin 0 on the Trinket, and then it’s just a case of programming it. The code is extremely simple.

The init and setup() function tells the Trinket what port we’re using and to set it as an output. The loop() function runs continually while the Trinket has power. Every five seconds, it sends the signal low for 50ms, causing it to take a shot which then saves out to the microSD.

There’s no manual control over things like exposure, although the camera seems to do a pretty good job of metering exposure all by itself. You do get to choose your interval, although if you want to change it, you’ll have to edit the code, recompile and upload again.

As mentioned, they also build a 3D printed enclosure for the camera, which you can see in the animation above. Adafruit also posted a video showing how it was designed, and have made the plans available here to print your own.

YouTube video

While you’ll only get the equivalent of 720p footage, there are other camera modules out there that you could use. Although they do tend to increase in cost quite rapidly, and most don’t have internal storage. So, then you’re moving onto something like the Raspberry Pi Zero and suddenly your total cost has gone from around $30 up to around $100.

So, it’s a handy little project for a basic timelapse camera. It’s small, unobtrusive, and cheap to build. I could see a few of these being very handy as wildlife or security cameras with slight modification, too. All you’d need to do is hook up a PIR sensor to the Trinket, and modify the code a little, to have it send a shot when something moves in front of it, rather than on a timer.

[via Adafruit]

Filed Under:

Tagged With:

Find this interesting? Share it with your friends!

John Aldred

John Aldred

John Aldred is a photographer with over 20 years of experience in the portrait and commercial worlds. He is based in Scotland and has been an early adopter – and occasional beta tester – of almost every digital imaging technology in that time. As well as his creative visual work, John uses 3D printing, electronics and programming to create his own photography and filmmaking tools and consults for a number of brands across the industry.

Join the Discussion

DIYP Comment Policy
Be nice, be on-topic, no personal information or flames.

Leave a Reply

Your email address will not be published. Required fields are marked *

5 responses to “Build your own matchbox sized DIY timelapse spy camera for only $30”

  1. ext237 Avatar
    ext237

    This is pretty cool diy project. Would make for a good life-capture camera that you could clip on your shirt. Thanks for sharing!

  2. Tim Costello Avatar
    Tim Costello

    Love the project and the video! I want to make a timelapse camera with a little higher resolution that can run for up to 3 months. I realize it will end up being larger and costing more, any ideas as to how I could accomplish that.

  3. tedstur Avatar
    tedstur

    I know this post is a year old… but how many pictures can this take between charges? I would like to time lapse a building site and want to know how often I would have to change out the battery.

  4. sb4 Avatar
    sb4

    It is a great project. Can you tell us how rapidly it could take and save 1280×720 stills? What the largest SD card it can use?

  5. The 1 Avatar
    The 1

    Why does every project that contains a DIY camera have to be adruino or raspberry pi or some sort of middleman to execute these projects. I could understand if building from ground zero than adruino or pi ok.
    But if you have camcorders, digital cameras, cell phones lying around that could be integrated with one another, than that type of info would be most valueable. I know cameras are at fair prices. But than there’s those that would love to dive into configuring our own cameras are own way, with a little help. But this world seems to be filled with cock blockers that would do anything from keeping the people from learning the raw but important material that they make to seem complicated, but in reality to some would be very interesting & fun. The kind of information they beat around the bush if taken in class enviroment & speak so vaguely when time is given to present. After all what would be the diy if we really can’t DIY!