DIY Rotating Timelapse With Arduino

by rj2006 in Circuits > Arduino

570 Views, 2 Favorites, 0 Comments

DIY Rotating Timelapse With Arduino

Screen Shot 2022-01-16 at 3.47.57 PM.png
Screen Shot 2022-01-16 at 2.22.50 PM.png

I saw some timelapse videos where the camera slowly rotates as time passes, giving the shot a really cool effect. I wanted to try building my own rotating Timelapse setup, so I came up with this simple 3D printed tripod on which I could mount a servo and camera.

My project is designed to be light, small, and simple, making it easily replicable. You can even add in your own features and design it to your own application.

Supplies

My version used:

  • Action Camera
  • Servo
  • Arduino
  • 3D printed tripod

If you can't 3D print your tripod, you can build one out of household materials (e.g. popsicle sticks) or use a premed tripod.

If you don't have a camera, you can use a cellphone camera, you just need to create a compatible mount.

Design Your Setup

IMG_5535.PNG

The first step is to figure out how you want to use your tripod, and design the features and build accordingly.

I just wanted a camera that would turn a certain amount over a time period of my choosing. This was the most simple to create, but I also came up with a few other uses that add a little complexity.

One possible variation is adding a potentiometer (knob) to your Arduino circuit, allowing you to turn the camera however you want.

Another variation is adding a feedback controller to the code, making your camera turn extremely smoothly.

Design Tripod Mount

Screen Shot 2022-01-16 at 3.39.51 PM.png
Screen Shot 2022-01-16 at 3.40.10 PM.png

Once you know what your building, we can start to design the tripod to hold the servo and camera.

I wanted my tripod to be very space-efficient, so I made it small and light and cut out weight anywhere I could. Also, I didn't want to deal with assembling it, so I needed to print it in one piece.

The end result of all of the above was this design, a circular disc with three square profiles lofted down and away. I filleted everything to either make it less sharp to touch or to add strength to the joints. I also carved out the inside of the legs using the shell function, significantly reducing the weight.

I put a hole in the middle of the disc to hold the servo. I didn't put enough of tolerance into the design and the servo was just a little too big, so you'll see a different, smaller servo throughout the design.

I printed it upside down (disc on the printer bed), and the entire thing printed in one piece.

Mounting Servo and Camera

Screen Shot 2022-01-16 at 3.40.20 PM.png
Screen Shot 2022-01-16 at 3.41.12 PM.png
Screen Shot 2022-01-16 at 3.41.21 PM.png
Screen Shot 2022-01-16 at 3.41.32 PM.png

Hot glue doesn't adhere very well to shiny, smooth PLA filament, so you need to sand the top of the tripod a little bit to give the glue something to grip.

Once you do that, gluing the servo is easy, using the tabs on the servo to stick to the base.

If you know the orientation and position of your servo arm, you can glue the camera or camera mount onto the servo now. My servo wasn't centered, so I waited until I had created the code to center it and mount the camera.

Code!

Screen Shot 2022-01-16 at 3.43.27 PM.png
Screen Shot 2022-01-16 at 3.43.36 PM.png

This is the part where you might have additions from your own design. I am showing my code for the simplest version.


I started off by defining the servo parameters, as well as setting a few of my own parameters that I could change for different timelapses. Two of the parameters were the maximum position and minimum position, which set the angular extremes for the camera.

I also set a variable called photolength, which was the total time for the Timelapse.

I used those variables to do some math, taking the difference between min and max position and dividing that by the total number of seconds, giving me a small step value to increase the servo position by every second.

I put the entire thing into an if loop which made the program stop (i.e. enter into a useless loop) once the servo was at the desired position.

Finished!

Screen Shot 2022-01-16 at 3.46.37 PM.png
Screen Shot 2022-01-16 at 3.32.37 PM.png

After doing some testing with 10 and 60 second periods, the project was complete! I haven't gotten a chance to get outside and record something worth posting, but I hope you take inspiration from my project and build something cool for yourself!