Introduction: Make an Arduino Controlled Motorized Camera Slider!

This project shows you how to convert any ordinary slider to an Arduino controlled motorized slider. The slider can move very fast at 6m/min, but also incredibly slow.


I reccomend you watch the video to get a good introduction.


Things you need:

Step 1: Drill the Mounting Holes for the Stepper Motor.

Picture of Drill the Mounting Holes for the Stepper Motor.

The stepper motor needs to be mounted underneath the track. The closer to the end, the longer your length of travel. The easiest way to transfer the hole pattern from the motor to the track is by tracing it with painters paint. This is a very useful tip for all kinds of applications.

The pulleys were quite high, so I had to drill large holes to accomondate for some of their height inside the track. That can be easily done with a drillpress and a stepped drill bit.

Make sure you use a center punch to mark the locations of the holes. This makes drilling them easier and more precise.

A 90° chamfer bit cleans up the edges nicely.

Step 2: Mount the Motor on the Track.

Picture of Mount the Motor on the Track.

Nema 17 motors useually have 3mm threaded holes at the top. I used some washers to reach the perfect hight for the belt. The belt needs to ride quite low in the track to clear the carriage.

The pulleys are fixed to the shaft with a set screw.

On my slider the holes collided a little bit with the round surfaces of the track. I had to do some filing to get the screws in propperly. If you plan ahead and twist the motor a few degrees it should be alright. Two screws are enough anyway though.

Step 3: Making a Little Mount for the Idler Pulley.

Picture of Making a Little Mount for the Idler Pulley.

The idler pulley, just like the stepper pulley, needs to be mounted slightly below the surface of the track. I used a little piece of metal that I had left from a previous project. You will find something similar in any hardware store.

I used countersunk screws. They look awesome, but only when they are propperly seated inside their holes. To achieve that, I started with one hole, inserted the screw and then drilled the second one. That ensures a perfect fit. A chamfering bit is used to create the counter sink.


For an extra nice look you should paint the metal. Using primer is always a good idea. Mine did not work very well at -10C°.

Step 4: Assembly the Idler Pulley!

Picture of Assembly the Idler Pulley!

The idler pulley needs to be at the same height as the motor pulley. I used washers for that. I strongly reccomend using nylock nuts! They have a little plastic insert that bind with the thread and stop it from becoming loose by the vibrations.

Step 5: Modify the Carriage to Hold the Ends of the Timing Belt.

Picture of Modify the Carriage to Hold the Ends of the Timing Belt.

Your belts will likeley come as a 5m length which you can be cut to size. That means that both ends need to be fixed to the carriage.

I tried a few methods of attaching them to the carriage before I found a very simple solution. I just wedged the belt against a parallel surface using a countersunk M3 screw. I drilled a number of holes to make sure that one would have the right distance to hold the belt tight.

Step 6: Admire Your Hardware!

Picture of Admire Your Hardware!

By now you should have a belt that is connected to the carriage and that loops around the motor and the idler pulley. Next come the electronics!

Step 7: Electronics Overview

Picture of Electronics Overview

I am using an Arduino Micro. This is a great little device with a small form factor and a lot of support material online. The arduino is powered by a 12V battery pack consisting of 8 AA batteries. I find this more convenient than using a LiPo. The battery pack is also directly wired to the Stepper driver since it needs a higher motor controll voltage and current than the Arduino can deliver. The stepper driver gets signals from the Arduino over 2 cables and it controlls the motor. The Arduino starts giving directions to the driver as soon as it gets power. 4 switches are used as some kind of combination lock to set the speed of the motion.

Here is the entire Code and Circuit

Step 8: Wiring the Switches to the Arduino

Picture of Wiring the Switches to the Arduino

Wiring Shematic
Its best to use a proto board to create a working circuit. You just need to copy the circuit from the link above for the switches and the power. Once this circuit works, you can transfer it over to a breadboard and solder it on.

The Arduino is usind the 12V battery pack as a voltage source. It produces a 5V voltage itself that can be used to check the state of the 4 switches. They are used to change the speed of the slider. So you kinda have 2 voltages on the board. 12V to power stuff and 5V for the controll circuit.

Wire some thin cables to the 4 switches. I used the cables I found inside an old ethernet cable. I am sure you have plenty of those lying around. Protect the bare terminals with shrink tubing.

Step 9: Wiring the A4988 Stepper Driver

Picture of Wiring the A4988 Stepper Driver

The stepper driver is an A4988. It receives signals from the Arduino and relays them to the Stepper. You need this part.

Instead of explaining the circuit to you, you can rather watch this tutorial as it explains it very well. This is my go to reference whenever I use an A4988. My code uses exactly the same pins. So add this youtubers tutorial to the board with the switches from the previous step and it will work.

Step 10: Add the Code!

Picture of Add the Code!

Here is the entire code and the circuit for the slider. You can test it online, but only without the stepper driver.
Alternative Link
The code checks for the state of the 4 switches in the loop. After that it goes through some if statements and selects the desired delay between the steps to move through the entire length of the slider in the entered value. All the calculations are included in the code as notes.

You need to enter the length of your slider and the diamter of the pulley to ensure that the motor stops when it reaches the end of travel. Just measure those values yourself. The formulas are included in the code.

The table shows you what switches to press for a desired time period. For instance if you want the slider to move the entire length in 2min you need to activate switch 1 and 2. You can of course change these values to your preferences.

Step 11: Print the Enclosure.

Picture of Print the Enclosure.

I designed the enclosure using Fusion 360. You can download the files here and print them on a 3D printer. No support is required. I filled the details of the letters with pink nail polish to make it easier to read. You can fill the entire letter and then wipe away the access. This trick can be used for all kinds of indents.

If you want an easier option, you could just make one by hand using a small lunch box.

Step 12: Final Assembly

Picture of Final Assembly

Its time to put everything together. Place all the components inside the enclosure and mount it to the slider using double sided foam tape. This stuff is pretty strong and nicely adheres to uneven surfaces.

I also added an anti vibration mount with a universal camera mount on top. The vibration mount is fairly cheap and stops vibrations to reach the camera. This is only needed for high speed motion. In my case high speed motion is anything between 10s and 30s for the length of the slider.

I added a table with all the switch combinations on the underside.

Step 13: Admire Your Work and Shoot Some Cool Footage!

Picture of Admire Your Work and Shoot Some Cool Footage!

Weather its video or timelapse, this slider can do it all! If you build one yourself I would love to find out about it!

Comments

kelly46864 (author)2017-12-13

In Arduino your code seems to be missing a quotation mark. (It says 'missing " terminating character'). Have I copied and pasted it wrong?

polavaram46361 (author)2017-11-14

I am a bit confused about how I should make the circuit. The Autodesk Circuits page seems to have an Arduino Uno (I don't know if this will make a difference) and has yellow LCD displays. It also seems a bit hard to copy the placement of the wiring from that pages. I currently am trying to copy the circuit of the photo of your circuit. I'm sure there is a better way. Am I missing something?

Thanks.

Max Maker (author)polavaram463612017-11-15

Hey, the yellow displays are only there for checking the code online. You can see their values changing as you simulate the code. Its a debug tool.

The circuit is correct, but it is missing the parts that run the A4988. You can take that part from the tutorial by the other youtuber and add it to my sketch. Since Autodesk Circuits has no A4988, I could not add it.

You can use either an Arduino UNO, or a Micro. Both have the exact same pins. There are differences of course, but none that concern us for this project. The Micro is just a smaller physical size (plus some technical aspects).

Ill add 2 more pictures of my circuit to the instructable. Hope that helps.

kelay2 (author)2017-10-31

what is the name of the spray paint before the black paint , please

Max Maker (author)kelay22017-11-01

I am using cheap off-brand automotive spray primer. Anyone should be fine.

kelay2 (author)Max Maker2017-11-01

thanks a lot :)

ejohn (author)2017-09-25

Excuse me, I’m still trying to understand
the formula,

StepDelay = ((TravelTime / Steps) -
0.0008)*1000;

StepDelay = ((TravelTime / Steps) - 0.002)
* 1000;

May I say 0.0008 is from the TWO “delayMicroseconds(400);” of MoveStepper()

but what is 0.002 in other time options ?

Sorry for my poor maths.

Thanks

Max Maker (author)ejohn2017-09-25

I guess .002 woul be in case you had smaller delays of 100 Microseconds. If it is present in some of the "switch cases" I might just have copied them over wrong or forgot to update them, but they should not matter much for longer time intervals. The significance of the delay decreases over long time periods.

ejohn (author)Max Maker2017-09-25

Thank you max.

I will test it when I get all the items a few days later.

Max Maker (author)ejohn2017-09-25

Well spotted though!

Zburhop (author)2017-09-23

I made one. Stepper motors are way worse for this than i thought. Even a time lapse has all sorts of funky artifacts from the stepping. Im probably going to get rid of this controller and just use it as a general purpose stepper controller for experiments. Has anyone found a motor that mounts to a nema 17 stepper mount. Would be really nice if i just mount a motor like that and use a variable speed controller.

Zach

mvelentzas (author)2017-09-21

The concept is great, but a full schematic (that includes the stepper driver and switch connections) would have been nice for us noobs out there :(

Max Maker (author)mvelentzas2017-09-21

You are right. Sorry about that, but I am working on a more simpler solution.

mvelentzas (author)Max Maker2017-09-21

No worries! Would love to see the new version when it's ready. Thanks for all the effort!

gccvideos (author)2017-09-01

Hi there.. can i use this speed remote in Nema 17 Gearbox? if yes how do i do it? i have no idea how to do the wiring's etc.. and is there any chance that when the camera reaches then other end it will automatically go back to the other side without using the remore? just moves back and forth? thank you so much

http://www.ebay.com.au/itm/222430902994?_trksid=p2045573.m570.l5999&_trkparms=gh1g%3DI222430902994.N36.S2

rene14 (author)2017-08-22

Hy I wanna do a timelapse so is it possible to use lcd to see interval betwean shots (to make it move every 10sec or every 2 sec) and to make it adjustable on the go? plz help

TomDeBruyn (author)2017-08-13

I was wondering, could you change the switch inputs with a variabele input lile touchpad, variabele encoder etc.?
Also would it be possible to combine the code to make a camera trigger/controller + slider controller

MikeK269 (author)2017-06-21

where are your switchs going to on the Arduino. I just want to make sure.

Thanks :)

Max Maker (author)MikeK2692017-07-12

Hey. They go to Pin 2 to Pin 5.

"bool s2; ///s2 stands for switch2_status. It starts at 2 so we can match the pin.

bool s3;

bool s4;

bool s5;"

muk34 (author)2017-07-12

Hello. I have the same question as MikeK269 : where are the switches going? I have some trouble understanding the schematics. Thanks in advance

Max Maker (author)muk342017-07-12

Hi, they go to pin 2 to pin 5.
"bool s2; ///s2 stands for switch2_status. It starts at 2 so we can match the pin.

bool s3;

bool s4;

bool s5;"

QuddusW (author)2017-06-17

is it possible to use micro adruino ATmega32u4 5V/16mhz?

Jpconover (author)2017-05-02

Following your advice, I am considering a NEMA 17 14:1 geared Stepper motor. Supposedly this is the best overall choice for vertical climbing and ultra low speed for time lapse. The driver is a bipolar constant current H-bridge with microstep resolution from 1 to 128 with 8 options. The microcontroller would be an Arduino Uno R3. My question is, will the code for your slider motion control apply to the above combination? Also, when I download the code from Autodesk, the file extension is: .ino. What application do I use on a Mac to make this code readable? I have not downloaded the Arduino IDE yet so could that be the problem? Thanks.

John

Jpconover (author)2017-04-27

I have a question regarding camera weight and it's effect on travel. It appears that a DSLR and lens with a combined weight of roughly 3 to 3.5 pounds should move smoothly along the slider when level. If the slider is aligned obliquely or vertically, is the stepper motor you use powerful enough to lift the camera and lens in these orientations?

Max Maker (author)Jpconover2017-04-30

For vertical movement of anything heavier than a phone or gopro, you should get a geared stepper motor. Look for "Nema 17 Gearbox". There are motors with built in gear ratios from 1:5 up to 1:51. The top speed will be reduced though.

Jpconover (author)Max Maker2017-04-30

Thank you. That is exactly what I will do. I appreciate your quick reply.

FedeC11 (author)2017-03-16

What is the name of that iron?

Max Maker (author)FedeC112017-04-30

What iron?

airdronez4hire (author)2017-03-31

Hi I love this idea, I somehow bought the wrong board, I end up buying this one,

UNO R3 PLUS, will this still work, or do I need to purchase the one you have listed?

Max Maker (author)airdronez4hire2017-04-30

It should work just as well.

Javi Roces (author)2017-03-07

I think this one is VERY interesting. If you add a move-pause-shoot-move- function it could be one of my favourites timelapse gadgets ever ^_^

O:-)

Max Maker (author)Javi Roces2017-03-08

That would be cool! Somebody on Youtube told me that he is going to pair the Arduino with an Infrared Transmitter which will trigger his DSLR. I belive you can trigger an iPhone over the headphone jack. The code woule be simple. Just tell the Arduino to trigger the camera after every step when its going slow, or every 200 steps if it´s going fast.

Javi Roces (author)Max Maker2017-03-09

How smooth is the move when , for instance, 8 hours is selected?

I use DC motors (with reduction, of course) when i want to make continuous movement, i think this reduces 'stepped-like' movement when shooting video... I just use stepper motor in move-shoot-move inventions, mmm.....

Is your slider capable to move a DSLR camera? Is it capable to use some inclination? :)

I think you can include an end switch to stop current when the dolly reaches the end, it's easier than programming lengths i.m.h.o.

Anyway, your idea is VERY clever and your instructable's gonna be open in my navigator for a while ^_^

Max Maker (author)Javi Roces2017-03-13

Not smoot at all since it moves in step, but that does not matter for the time lapse. The slider is 100cm long, the pulley diameter is about 2.5cm. So We need 40 rotations. Each rotation consists of 400 steps with 1/2 microstepping activated. So we have 16000 Steps over 8 hours which means it will move every 0.5s and stay still in between.

Imanolddogwithnewtricks (author)2017-03-02

Nice one Max. I've really enjoyed following your instructable. You have inspired me to have a go at this myself. Many thanks.

Thank you! I wish you the best of luck! Would be cool if you could upload some pictures of your build!

I certainly will upload pictures when it's done....but I'm planning to make the slider first, before I motorise it. It's a pretty ambitious idea for me, and I've still not sourced any suitable extrusion to base it all on. But once it's made I'll be returning to your instructable for the tech input.
Thanks again Max.

What extrusion do you plan on using?

Chuckwilcox (author)2017-03-02

Great one, nice job. Thanks for mentioning the 'challenges' with the build. Awesome video instruction.

Max Maker (author)Chuckwilcox2017-03-02

I do what Larry Willmore told me: Keep it 100!

usear (author)2017-03-02

Hi very nice project, I guess the cheaper version of the arduino like https://goo.gl/q9xmxf will work just as well right?

Max Maker (author)usear2017-03-02

Yes it will work. However I rather spend 20$ for an Arduino and can be sure that there will be nothing wrong with it. It is incredibly hard to troubleshoot if you cannot trust your micro controller.

usear (author)Max Maker2017-03-02

Fair point. I asked as I have used a ton of clones and never had an issue. Nano is pretty much an AT-Mega 328P with a regulator on a breakout board. I get your point though.

macshout (author)usear2017-03-02

Yes, that should work perfectly.

TareyW (author)2017-03-02

Is it possible to make this so that it will reverse directions, travel back and forth in other words?

macshout (author)TareyW2017-03-02

Yes, but you will have to make some minor changes to the code. The change involves the variable 'dirPin' which is set to HIGH to set travel in one direction. If you put another switch on another digital input, and check whether the switch is open or closed, you could then write that value to dirPin. Or without code changes you could instead wire the direction pin of the 4988 to a switch with a pull-up resistor (say 200 Ohms) connected to the 5v rail, and the other side of the switch connected to ground.

Max Maker (author)macshout2017-03-02

You actually just need to switch out 2 of the 4 motor wires with themselves if that was your question.

Max Maker (author)TareyW2017-03-02

Sure, you can program pretty much whatever you want. At the moment the codes checks if it has reached the end yet.If it has not, it goes another step. You could tell the code to go back to its origin when it reached the end.

dgoock (author)2017-03-02

Great instructional!

Max Maker (author)dgoock2017-03-02

Thank you!

About This Instructable

48,140views

317favorites

License:

More by Max Maker:Make a Small Parts Organizer!Make Some Drawers for Any Wardrobe!Resuce
Add instructable to: