Making a DIY time-lapse and video slider

Here is a lengthy article about why I made my own custom DIY time-lapse slider, how I made it, tuned it, refined it and now use it.

How it all started

I really enjoy how time-lapse videos look. They are beautiful and they convey a sense of movement is a way still photography cannot. Most of the time, they are shot from a static point of view (i.e. the camera sits on top of a tripod) and the movement in the final time-lapse only comes from the moving elements in the frame (clouds, people, cars, the sun, etc.).

To make it a bit more interesting and dynamic, it is possible to also move the camera while shooting, giving you the possibility to rotate the camera or play with perspectives. This is what really makes a good sequence look more professional.

I am always trying to get better at what I do, learn new techniques, and get better-looking results so I really wanted to get this kind of shots. I had a look at the equipment needed to get those shots. That’s when I realised why they are hard to get and why they look so  professional: you need proper professional equipment… I am talking really expensive and bulky gear that would set me back hundreds (if not thousands) of dollars… That was a bummer!

Why is this so expensive? It’s just moving the camera, right? The problem when moving the camera while doing a time-lapse is that the movement needs to be small and very precise between each shot, and the system needs to be very stable not to introduce camera shake. A human cannot get to this level of accuracy which is why every solution out there is computer-controlled or automated in some way. We’re talking sliding a few millimetres at a time or rotating the camera by a fraction of a degree precisely between each shot.

What exists out there

The most common time-lapse movements are rotating the camera or sliding the camera.

To rotate the camera there are devices that you put between the tripod and the camera like the Genie Mini from Syrp or the Radian 2 from Alpine Labs. These devices are battery powered and have a small motor you can control via an app on your phone to rotate your camera.

The same principle exists for sliding the camera. There are sliders with a moving platform powered by a small motor. Syrp also makes one of these, the Magic carpet. Other examples include the SliderPlus from Edelkrone or the Slider EVO from Rhino.

There was no way I would spend that kind of money, so I decided to look around and see if DIY solutions existed. I know the internet is full of creative people that must have been in the same situation before. I few Google searches later I found some promising DIY projects but none of them addressed everything I wanted to do, so I decided to combine a few of these projects and take them further.

My own build

Specs

Here is a list of the main features I wanted to have:

  • Sliding motion
  • Panning motion
  • Battery powered
  • Easy to configure on the field
  • As sturdy as possible

Mechanics

This was the most challenging part for me to build. I live in a small apartment with no workbench and limited tools so I had to do with what I had. It wasn’t easy at times but it worked out pretty well in the end.

Most of the mechanical parts of the slider are based off a DIY camera slider from DIY Perks who made a great tutorial on YouTube. I modified his design to make a motorised slider with a timing belt.

Instead of copper pipes, I chose to use curtains rods from IKEA as they are cheaper, have greater tensile strength, and are already painted black. I might switch to carbon fibre tubes in the future if I decide I want the slider to be even stiffer than it is now.

It started off like this:

The start of the timelapse slider

I took my time during the winter months to slowly build it up. The first version did not have panning capabilities and used MDF for the platform. It turned out not to be stiff enough as the weight of the camera combined with the sliding motion would make the whole thing wobble way too much for me to correct in post. It is probably OK for a small camera or a GoPro but not for a DSLR and a big heavy lens. As I was already thinking about version 2.0, I added that to the list of things to improve. Here is a few pictures of what V1.0 looked like

For V2.0, I added the panning capability and addressed the wobbling issue. As mentioned earlier, I used another motor to rotate a platform that would sit on top of a 120mm Lazy Susan bearing. This bearing gives good support to the platform while enabling smooth rotation.

To address the wobbling, I redesigned the whole platform using carbon fibre plates instead of MDF. It was a lot harder to cut, drill and file but it was worth it. The whole thing is as stiff as it can be, it is much more durable and looks better than the MDF version.

While doing the mechanical side, I also experimented with the electronics to decide which solution was the best.

Electronics

I chose to use a 12V rechargeable battery pack with enough capacity to run a time-lapse for a few hours. You can find them for a few quid on Amazon or eBay.

As the output of the battery is not stable enough as the battery discharges, I connected 2 LM2596 DC-DC Buck Converters, one for a 5V supply to power the Raspberry Pi and the display, one 10V supply to power the H-bridge and the motors. These are adjustable, small, very cheap and reliable enough to power the Raspberry Pi without risking frying it. On that note, I chose to power the Pi via GPIO pins 2 and 6 instead of using the recommended micro-USB port as I didn’t want to have anything plugged into the ports (other than the GPIO interface). Doing this is a bit more risky as it bypasses the supply fuse found on the micro-USB line so there is no short-circuit protection, but I was OK with it as the LM2596 has a built-in output current limiter that should hopefully kick in if needs be.

For the motor driver, I went for a L298N Dual H-Bridge motor driver as it can easily drive 2 DC motors using the GPIO pins of the Raspberry Pi.

For the motors, I hesitated a long time between stepper motors and DC motors. Stepper motors have better accuracy and torque but I wasn’t sure the minimum angle (step) would be precise enough for the movements I was going for without requiring external bulky reductors, so I went with DC motors of 10 RPM for the slider motor and 0.6 RPM for the rotating motor. I could tweak the power supply or use PWM to adjust the speed of each one as needed.

For the shutter release circuit for my Nikon camera, it is simple enough to build one. I had a few resistors and 2N2222A transistors lying around so it was just a matter of connecting things up to the focus and release wires of my camera using a prototyping board.

Here is a quick&dirty diagram of the electronics.

Electronics Diagram of DIY Timelapse Slider

And here is a view of the ABS box that holds all the electronics and the sliding motor.

Timelapse Slider Electronics

User Interface

This is arguably the most important part of any system from a user point of view. You can have the best system in the world with the best features, but if it has a rubbish user interface, it is seriously crippled. To me the best way to check and control the system was to use a touchscreen.

I looked online for touchscreens that would be compatible with the GPIO interface of the Pi and would still leave some GPIO pins accessible for me to connect the rest of pins to the motors and shutter release circuit. I found a cheap one on Amazon with a 3.5 inches LCD touchscreen and a 480×320 resolution. It’s far from HD quality but good enough for my simple UI.

I spent quite some time designing the user interface. I wanted it to be practical in the field and nice to look at. It doesn’t hurt does it ? 😉

As I have never designed a UI before, it was quite a trial and error process but I got there eventually. I used Affinity Designer to make it and here is a screen shot of the process.

UI Screenshot DIY Timelapse Slider

Here are some screenshots of the different screens I have created to control every aspect of the time-lapse:

Programming

Now that the system had a skeleton, muscles, eyes and a pretty face (OK, OK, I got carried away here), it needed a brain to make it all work. That’s were the programming comes in.

The program is written in Python using the Pygame UI library and WiringPi to control the GPIO pins. I used the code of a similar project called LapsePiTouch by David Hunt as a starting point. I modified the code to adapt it to my new UI, I added new configuration parameters to finely control every aspect of my system, added some feedback to the user to see how the system is behaving and I added multi-threading capabilities to be able to run multiple things in parallel. The main program controls the UI and spawns the main thread that runs the time-lapse. This thread spawns one thread for the sliding motion, one for the rotation, and one to drive the display back-lighting (it turns out my display does not support turning the back-lighting off but the thread is coded in case I switch to a better display in the future). All these threads communicate via global variables (I know, it’s not a great coding practise) and built-in inter-process communication for synchronisation points.

Making it even better

At that point the slider was working and I was very happy with it. A few days later, I realised that my Raspberry Pi 3 had WiFi capabilities and a bright light bulb went up in my head. How cool would it be to use the WiFi to connect to my system and control it remotely using my smartphone?

I was really excited about this. This was the feature that would make that thing on par with professional equipment. And the best part is, it wouldn’t cost me a penny other than figuring out how to make it work and spending time configuring everything.

The easiest way to do it was to use VNC to connect to the Pi. By default, the Pi connects to my home WiFi network so it is just a matter of running a VNC server on the Pi and connect to it via my home WLAN. It’s all well and good but it doesn’t work on the field where I have no WiFi network to connect to.

The solution was to write a small script that would run when the Pi boots and scans all the available networks. If my home network is in reach, it would connect to it and if not, it would create its own access point so that I could connect my smartphone directly to the Raspberry Pi WiFi hotspot. Once done, I always had a way to connect to the Pi and remotely control my system. Very cool and practical!

I could have written a dedicated app instead of “just” using a remote VNC connection but the time I would have spent on this was not worth it in my opinion.

As everything else, it did not work at first but I persevered and managed to make it work. Now I have time-lapse slider I can remotely control with my phone or tablet, check the status when capturing a time-lapse, and abort it if needed.

It turns out that this feature is absolutely necessary for something I did not anticipate before trying it in the field. You see, I used a cheap touch-screen that has very limited contrast and luminosity. It is OK in most cases, but when using it on a very bright day, the screen appears completely black and I cannot see a thing on the screen. Because smartphone screens are of way better quality I can still see something on it in the same conditions. So when it’s too bright outside, which admittedly doesn’t happen very often in the UK, I use my smartphone to control the slider.

Video Slider update (June 26th, 2020)

I have been thinking about how the slider could be used for shooting video instead of time-lapse for a little while. Because of the specific move-stop-shoot-move behaviour required to get perfectly sharp pictures suitable for a time-lapse, the slider is not very suited for video use. The hardware is all there but the controls are not and you would end up with very jerky footage.

A recent comment from SCOTT was all I needed to motivate myself to update the code to enable that use case. I have spent a few hours updating and testing the code, updating the UI to reflect the new video mode and I am happy to report that I have got something that works and the slider can now be used to shoot video.

What I did is create a separate video thread that smoothly controls the motors and that’s it. Well, technically it was not that simple 😉 . To still be able to control the speed of each motor, I switched the sliding motor control to PWM control. The panning motor was already using PWM so there were no modifications needed there. Unfortunately, all the hardware-PWM GPIO pins are already in use 😐 . As I didn’t want to rewire the GPIO pins to support hardware-PWM on the sliding motor, I decided to use software-PWM. While a bit less accurate than hardware-PWM, it can be implemented on any digital GPIO pin. The accuracy is not really an issue for the motor control and after some testing, it seemed to work great so I went ahead and modified the main Python code.

As I didn’t want to modify the main time-lapse feature, I decided to change the UI to show it as a completely different mode on the start screen (even though the code underneath reuses most of the existing features).

When selecting “New Video” on the start screen, you are now presented with the same sliding and panning controls as the time-lapse feature with a slight difference: while the motor controls in time-lapse mode are a pulse in millisecond, it doesn’t make sense for a video so I changed that to a “motor speed” which is now a percentage (from 0% to 100%). Setting the speed to 50 will make the motor move at 50% of the maximum speed. I’ve put some safe-guards in the code to cap the input value at 100 in case the user enters a greater value by mistake.

I have removed the first screen where you would set the number of frames and the interval between each frame because it doesn’t make any sense for a video. I have also removed all shutter controls in video mode because the external shutter release on my camera only works in photo mode. So you would need to press record before starting the slider and stop it manually at the end but that shouldn’t be an issue. Every other control and feature stays the same.

I have updated the downloadable archive with the latest code and icons. I hope you enjoy this new feature and make good use of it. 🙂

The finished slider

Here are some pictures of the finished project in its environment:

It was a lot of fun to do and it kept me busy during the winter months. The whole thing cost me around £150, which is way cheaper than anything similar on the market.

With it, I was able to capture much more interesting time-lapses, some of them can be seen in this time-lapse of Bristol.

Download link

If you want to re-use my code for your own slider, I created an archive with all the code and resources to run the controller. I have also added templates of all the Raspbian configuration files that I modified to make the whole thing work and a list of the external packages I needed to install. You can download it here:

Room for improvements

I have been using this system for more than a year now, and there are a few things I could improve to make it even better,

Build precision

I built the whole thing in my flat with a very limited set of tools. On top of that, materials like carbon fibre are notoriously hard to cut or drill. Even with all the accuracy I could muster, some of the build could be more precise and accurate. A real workbench and a vice would have help me a lot but I didn’t have those. Ideally, cutting all the parts using a CNC machine would be perfect but the cost of those was too much for me. In the end, the slider is very strong and stable (as Theresa would say 😉 ) but there is a bit of wiggle room in the rotating platform. It would have been nice to get rid of it but it’s not a big issue and I can deal with it in post-processing.

Motion accuracy

I used DC motors for all the moving parts. They are more flexible to work with and smaller but they are less accurate than stepper motor. If I had to do it again, I would probably use stepper motor for the sliding motor. I couldn’t use a stepper motor for the rotating platform without some sort of reductor to be able to get a very precise angle. The problem with this solution is that a stepper motor attached to a reductor would be too big to fit on under the platform without some clever mechanical design that I cannot achieve myself.

Safety

This is something I didn’t think of when building the slider but it wasn’t long until I realised a flaw in my design when using it for the first time. There is no limit switch on the slider. It means that If I don’t set up the time-lapse correctly, there is a possibility that the platform can hit the end of the slider and damage it. I am planning to add 2 limit switches so that the slider stops itself (or goes back in the opposite direction) when it reaches one end of the slider. The source code is ready for this. I just need to find a good way to add those switches to the platform.

Updated 25/07/2018: As I will soon need to shoot a time-lapse while leaving the slider unattended, I decided it was time to add limit switches to the existing slider to avoid damaging it. Here is how I did it:

I cut two thin pieces of wood of approximately 8cm long and 1.5cm tall that would fit between the rails without touching the platform. One end of each piece has a bevelled edge. This is very important so that when the limit switch is hit, the slider can still travel for a few cm without hitting the end of the rail. That way, I was able to implement an easy in/out movement. The resulting time-lapse would be much more aesthetically pleasing than if the slider stopped abruptly when hitting the switch.

I painted those pieces of wood black and glued them at each end of the rail and glued 2 limit switches underneath the sliding platform. I made sure the system was symmetric at each end. I drilled a hole through the carbon fiber platform and the ABS Box holding the electronics to pass the wires into the box so that all electrical connections are protected from the outside world. That’s the mechanical side done. After that, I connected the output of each switch to a GPIO pin of the Raspeberry Pi (while I connected the common contact of the switches to the ground of the system). I configured those 2 GPIO pins to use the internal pull-up resistors. This way, I can connect them straight to the Pi without requiring external resistors. Neat!

After this I modified the code so that the slider stops after hitting the switches. When coding it, I decided to add new configuration parameters to control the behaviour of the system when one of  the switch is hit. I added the possibility to either directly stop the slider or have a configurable ease in/out movement. In my opinion, an ease in/out option leads to much better time-lapses. I also added the ability for the slider to go back in the opposite direction once reaching the end of the slider. This way, I can leave it loop indefinitely without risking it being destroyed. I also added a couple of error and diagnostics message so that the user knows what’s happening at any time. I have updated the downloadable archive with the new code and updated UI/icons.

Display

As I said earlier, I used a cheap display for my slider. It is fine in most situations but it is impossible to see a thing in bright conditions. I might upgrade the touchscreen in the future for one that has better contrast. It would also be nice to be able to control the screen back-lighting. This way, I could switch off the screen while the time-lapse is running to save power and limit the reflection in my camera.

Software

There are many improvements that can be added to the code. I might add a few more configuration options in the future. Here are a few things I thought about:

  • Being able to set keyframes with different speeds between them
  • Add the ability to have ease-in or ease-out movements
  • Use Bezier curves for more creative control of the speed of each motor
  • Connect the camera via USB and display EXIF data and histogram on the fly while the time-lapse is running

Some improvements are easier than others but the good thing about software improvements is that it doesn’t cost a thing. I just need time to code them.

Removable platform

Right now, the slider is not modular. I cannot remove the rotating platform even if I don’t plan to use it. The same thing is true for the sliding motion. For example, I might want to shoot a time-lapse with rotation motion only. As of today, I cannot remove the platform from the slider and fix it to my tripod. That means I have to bring the whole slider with me even if I don’t need the slider. I might modify the platform in the future to be able to do this.

Leave a comment

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

26 thoughts on “Making a DIY time-lapse and video slider”