Time lapse videos

Here recently I’ve been playing with making time lapse videos of the MPCNC while cutting things up. I bought an app for my arduino called Time-Lapse Pro (I even paid for the pro version). The only problem I have with it, is by using my phone, I can’t use my phone for other things.

I have an older Canon DSLR hanging around that’s not really doing anything, so I thought I’d do some electronics work this morning.

I taped an Arduino Beetle (Leonardo chip on a postage-stamp sized board) onto the back of a 2 channel relay and hooked a small cable up to the remote trigger port on the camera. Some quick coding later and I have a 1 second trigger for the camera. Even with the camera set to small it takes a photo larger than 1080P.

I plan on doing some cutting tomorrow night and will try it out then.

The code is stupid simple. I didn’t even bother trying to hook up an on/off switch to it. You plug the arduino in and it immediately starts triggering the relay. Hook it up to the camera and flip the on/off switch on the camera. It will keep taking pictures until the battery on the camera runs dry.

//Stupid simple camera trigger.
//Hookup the output pin to a RELAY
//Hookup the COLLECTOR and NO on the RELAY to the trigger/ground on the camera

#define tPause 250 //how long to hold trigger
#define tTrigger 1000 //how many milliseconds between triggers 1000=1sec
#define tOutput A0 //Set to output pin going to relay

void setup() {
pinMode(tOutput, OUTPUT);

void loop() {

This little setup will probably get expanded in the near future. I’ve always wanted to build an arduino based lightning trigger. I also want some type of way of selecting the delay time between images.

One small thing I’ve noticed in the little testing I’ve done is that it gets noisy. Every second a relay clicks followed by the mirror in the camera slapping up and down. I’m sure it won’t be heard over the CNC/dust collector, though.

Good project.

I wouldn’t think a lightning detector would be fast enough. In fact, I would think to do that right, you’d have to be constantly capturing images, and then when you detect lightning, find the image in the recent history corresponding to that time. The biggest difficulty with timing is that I bet the camera doesn’t take the image immediately after seeing a rising edge on the trigger.

I’ve never tried it though, maybe there are some clever tricks on the Internet.

I would also think that you shouldn’t have to use a relay, since the camera is probably doing something like shorting to ground or 3.3V. Relay is pretty simple though. Hopefully, you’ll use it enough to wear it out :). Since it’s low amperage, it should last a while.

The phono cable coming out of the camera has 3 pins. 1 for focus. 1 for trigger. 1 gnd. While technically you could trigger it by grounding the trigger pin to gnd on the arduino, if either the camera or arduino is floating for some reason, it may not fully trigger. Throwing a relay in wasn’t very difficult. Also, I don’t think you want to risk back-feeding 5V into the 3.3v trigger pin.

The lightning thing is actually pretty interesting. I read about doing this a few years ago and never got around to setting anything up. Timing-wise, most lightning strikes are longer than the speed it takes for the camera to trigger. One article I wrote, the guy set the camera to sport mode. His trigger pushes the button for a full second after registering a lightning strike. At 10-30 fps, the camera snaps a lot of fast shots meaning that at least one should catch something.

This guy goes into good detail on timing and stuff.



There is some code built in to marlin at the very end of the config file, you should have a look it triggers a camera at the same point every layer. Makes it look like the print is growing out of thin air.

That’s cool. Octoprint can do the same thing.

Looks like the trigger worked pretty good. I ended up changing the time to every 5 seconds.


Ohhh you mean for time lapse in general, not just arduino projects. That is awesome, next you gotta throw it on a rail to get those slick tracking motion shots as well.

Yeah. The Arduino project is the trigger for the camera. One issue I ran into is I was trying to run the arduino beetle off of a battery power supply. Unfortunately, the beetle draws so little power that the charger doesn’t think anything is plugged in and it shuts off after 30 seconds. I ended up dragging an extension chord over to power it.

Next project is a motion tracker so that the camera stays pointed at me… but I’ll have to win the lotto first so that I can afford the development work/time.

dj4linux made a MPCNC based camera track. Having it follow you wouldn’t be that great with a timelapse… I guess you could make the movements very very slow…

I’ve done some computer vision in the past, and if you had another camera that was stationary, looking for movement (image - background average image, with some smoothing in there) you could detect where you were, but doing that with a moving camera is pretty tough. Detecting you in the image based on what you look like would be more difficult.

A long time ago, I wanted to put a top down camera above a hockey rink (they always have really high ceilings) and have that detect where the 10 skaters and puck were, and control cameras at the edges to track the game. Mostly because I play ankle benders hockey, and we want to feel like we are all stars, but certainly won’t pay for camera operators.


These work pretty good for me. Generates video, not a bunch of stills.

Here’s a project video where a switch closure is used to capture a 3d print using a brinno camera. https://youtu.be/8n5II7OO7JM

My thoughts were a little less techie.

I was thinking a bracelet that put out a faint radio signal. Have a receiver under the camera with two receivers at 45 degree angles to each other. Have it control a stepper motor so that the signal level matches between the two receivers.

RC quadcopters have setups that use RSSI from the quad to do the same thing.

My little baby drone just follows the phone around… :slight_smile:

That’s a good idea. I could just take a quad and hack the hardware on it.