Introduction: ARDUINO GOPRO TIMELAPSE SLIDER

About: I'm a 36 year old DIY enthusiast from Vienna Austria with a strong background in mechatronics/automation. My DIY field is mainly video/audio/motion control. If you want to see what i do between posting it as…

This project was my first attempt at building a timelapse slider.

All parts of this Instructable are bought from my local hardware store except the Arduino of course.

CORE COMPONENTS

  1. Arduino MICRO
  2. 8x Rollerblade/Skateboard bearings
  3. 8mm rods and nuts
  4. 20x20mm aluminium squarepipe
  5. 90degree connecting rods for squarepipes
  6. a gearbox-motor (280 class with 380:1 in my case)
  7. a belt and driving wheel from a 450 class helicopters rear propeller

Step 1: THE ALUMINIUM HARDWARE

I chose to only use one rod for the slider instead of two like normal dollies and sliders.

The idea was to get the pricepoint down and also to start with the most simple idea and test that before building it to complex.

The material used is 20x20 squarepipe, thats meant to be used to build small gardeners glasshouses (i guess).

At least it was in the gardeners depot at my hardwarestore.

I bought 1piece 1m long and cut roughly 20 cm to build the slider.


RAIL

As you can see on the photos, i just took two corner elements (black plastic) put one at each end of the rail, and thats about building the rail :)


SLIDER/SLEDGE

The slider itself is the small piece i cut from the rail, plus a small piece of a 20x20 edge profile that i had laying around, that holds the electronics.

Step 2: THE SLIDER/SLEDGE

I started by drilling four holes with 8mm diameter into the sledge.

Then i took four 8mm bolts as axles, and put shims bearings and distance rings onto it.

The distance rings are from skateboard/rollerblade wheels, they are between the bearings, small metal pipes.

From the sledge outwards it goes:

  1. shim
  2. bearing
  3. distance ring
  4. bearing
  5. shim
  6. nut

So its the same procedure like with a skateboard wheel, just dont add a wheel to it.

Do this for all four axles, see the photos for details, BUT consider, that i didn´t use the distance rings in the version thats in the photos. For the distance rings watch the photos of the next step.

Step 3: ELECTRONICS/MOTOR

To drive the slider i went to a hobbystore and bought a belt from an RC-helicopter (450 size) and a toothed wheel that fits the belt.

Next i cut the belt so i got one long belt instead of a loop.

I took two wood screws and bolted the belt to one of the plastic feets aka angled connecting pieces.

After that i mounted the motor so that it aligns the belt.

Watc the photo to get a better idea.

If you just want to have a slider that moves with a motor, you got all you need.

If you want to control this with an arduino, go to the next step

If you control that Arduino with your iPad or MIDI sequencer, see my other Instructables.

Step 4: ELECTRONICS // ARDUINO

To control the whole thing i chose Arduino like always.

Because there is no motorshield for the MICRO i bought a small RC car's ESC.

Cost me 15 bucks AND all (most) ESCs have a built in PSU that powers the receiver with around 5V

Thats exactly what the arduino needs: JIPPY!

See the photo of the Fritzing diagram and everything should be clear.

I made connectors for up to three servos.

The servos and the ESC use the servo.h library.

That means that everything gets positions from 0-180 degrees in 1 degree steps.

Thats an easy task if you got servos running, but what about motors you ask?


Well thats not so easy.

In theory 0 degree is full reverse 180 degree is full forward.

But not so easy!

What if the ESC has a brake function? ABS? ETC?

The point is, that all ESCs get programmed by the remote on every startup with an initialize sequence.

So (depending of the manufacturer) it first reads full reverse then brake then full forward, or uses forward > reverse and the neutral position is going to be calculated by the ESC itself etc.

SO the first step is to find out what startup sequence your ESC needs, because if you dont initialize it, it wont work^^

What i did is write a script that does different combinations of fwrd/bckwrd/brk and holds that for 500ms and i tested that till i heard a confirmation bleep and saw a green light.

The STARTUP SEQUENCE that worked with mine is:

  1. full forward -- 500ms
  2. full backward -- 500ms
  3. mid position -- 500ms

After that sequence it made beep and was ready to go.

The next potential problem are ESCs that have a break function.

That means that if you are on <<forward>>, no matter how much power, and go into <<reverse>>, the ESC brakes without going reverse. So you need to release gas on the transmitter, let it go to zero and THEN you are "allowed" to drive backwards.

If you want to use it as a simple timelapse slider it might be irrelevant cause you won´t go forward reverse in a timelapse.

Or would you ?

Then you gotta buy the ABSOLUT CHEAPEST ESC available with no extra nothing whasoever functions.

Step 5: ARDUINO CODE

It doesn't really make sense to post my code because you might use different pins and different hardware anyway, so heres a walkthrough what to do:


First, download and install the servo.h library.

Also in the script, don't forget to include the library by calling #include at the beginning of your script.


To make it a timelapse slider you can for example use analogRead() to read a pot connected to an analog pin.
The analog INs use 10BIT A/D conversion, thats 1024 steps.
The servos read 0-180 degrees.

The intervall uses milliseconds vs 1024 steps of the pots.
You convert that by calling the "map" function.

Lets assume it's about the variable "time" so the code would look like:

time = map(time, 0, 1023, 1000, 10000); // so whatever value between 0-1023 "time" had before, it gets converted to a value where 0 represents 1 seconds and 180 represent 10 seconds

So we start with:

Servo zaxis; // that defines the variable "zaxis" as a Servo using the library

int pos = 90; // defines the variable "pos", makes it an integer, which means no decimals,
// That variable will tell the servo its default position at startup, can be a number from 0-180

a timelapse with 5 seconds delay for 180 degree would look like:


for(pos = 0; pos <= 180; pos +=1) // increments the variable pos until it reaches 180
{
zaxis.write(pos);
delay(time); // thats our delay variable aka pot
}

Easy as that.

If this would be an ESC, all you got to do is, keep in mind that the degrees mean forward speed/backwards speed in this case.


Lets assume the motor servo object is called "motorspeed", then the script would look like


{
motorspeed.write(70); //m70 of 90 available degrees in forward speed, 70/90*100= 77,8 per cent power.
delay(200); // how long the motor holds the above speed, in milliseconds
motorspeed.write(0); // stop the motor.
delay(time); // wait for the rest of the time
}

Of course you need an END button to make it stop :)

I never did this and its also not implemented in my code. Timelapse takes so long and is so predictible that i never felt the need for that.
On the other hand, if you want to make it on remote locations or timed by another device, to start at four in the morning you would want a way to stop it once it reaches the end of the track.