Introductory Video
This video is and introduction of my motion control slider project, showing the basics of what it can do and how it’s used.
Time Lapse Assembly Video
I figured that I’d record the entire assembly process of the MC slider from start to finish. This video shows about 24 hours of real time in 15 minutes, and in it I discuss some of the problems I faced and design choices I made.
Feedback
If you’ve got any comments or random abuse to hurl, please post it here on the ol’ blog.
Seriously, I’d appreciate any and all suggestions and I’m happy to answer any questions you might have. As promised in the videos, various downloads and a parts list are below.
Licensing
The YouTube videos are Creative Commons – Attribution licensed. You’re pretty much free to do whatever you want with the downloads below, however I ask that you provide proper attribution if you use them in your own project, and that you let me know about it. (Not because I’m some kind of jerk, but just because I’m really curious to see what you come up with!)
Downloads
Source Code | v0.2 | 5 KB | s.co.tt-mc-slider-v0.2-src.zip | Just the .ino file. You’ll need to already have the AccelStepper and LiquidCrystal libraries. |
Code + Libraries | v0.2 | 554 KB | s.co.tt-mc-slider-v0.2-src+libs.zip | The .ino file and the AccelStepper and LiquidCrystal libraries. |
CAD Files | v1.0 | 25 KB | s.co.tt-mc-slider-hardware-v1.0.zip | Circuit diagrams for the controller and interface box. TinyCAD required. |
Controller Decal (PSD) | v1.1 | 1 MB | s.co.tt-mc-slider-decal-v1.1-psd.zip | Controller cover decal at 1200dpi. Photoshop or compatible required. |
Controller Decal (JPG) | v1.1 | 10 MB | s.co.tt-mc-slider-decal-v1.1-1200dpi.jpg | Controller cover decal at 1200dpi. This is a direct save from the above PSD file. |
Parts List
Most of these parts are from Amazon. I’m a sucker for 2-day shipping, and they have [almost] everything I need. The prices below are what I paid; Amazon’s prices can fluctuate widely and rapidly, and I didn’t necessarily look for the best deals on this stuff. You can probably put this together for less money, and if you price these parts out elsewhere, please let me know in the comments!
Part | Price | Notes |
---|---|---|
ePhoto 39″ Inch DSLR Camera Slider | $89.99 | Not the best. Check out my Amazon review. |
BUD Industries PN-1335-DG High-Impact ABS Box | $21.50 | Controller housing. Probably too big for the project, but a very sturdy box. |
Gray ABS Project Box | $9.50 | Too small for the microstep driver that I’d used, but not a bad box. |
Arduino Uno | ~$25.00 | Available everywhere, the basic Arduino board. I bought mine a while ago — don’t remember what I’d paid. |
Arduino Proto Shield | ~$10.00 | This appears to be an updated version of the shield I used, which they no longer sell. |
SainSmart IIC/I2C/TWI Serial 2004 20×4 LCD | $13.99 | Download the library using my link above — the right lib can be hard to find. |
SainSmart Dual Output Slide Potentiometer | $9.80 | |
SMAKN Dc/dc Converter | $6.99 | |
Me 2H Microstep Driver | $19.99 | Ships from China. I believe this same controller is sold under other brand names, though. |
BESTORQ 600-MXL-025 MXL Timing Belt | $13.49 | This was a little too short. |
4x LED Lamp Momentary Push Button Switch DC 3V – Green | $11.26 | These come 2x per order — the price I listed is for 4 pcs. |
2x LED Lamp Momentary Push Button Switch DC 3V – Red | $5.63 | |
2x Round Button 2 Pin SPST On/Off Rocker Switch | $1.04 | These came 10x per order — the price I listed is for 2 pcs. |
Momentary Roller Lever Hinge Micro Switch | $2.14 | These came 5x per order — the price I listed is for 2 pcs. |
12 Volt 2 Amp Power Adapter | $6.99 | Barrel plug fits the connectors below. |
Screw metal head DC Power Jack Socket | $0.90 | These came 10x per order — the price I listed is for 1 pcs. |
2x DB25F Parallel Add-A-Port Adapter with Bracket | $13.48 | These came 1x per order — the price I listed is for 2 pcs. |
57oz-in 1Nm NEMA 17 Stepper Motor | $16.67 | |
Panel Mount USB Adapter Cable | $6.96 | You could easily do the project without this. |
Avery Clear Full-Sheet Labels 8665 | $0.67 | Comes in a 25 pack — I only used one, so price listed is for one sheet. |
TOTAL: | $196.00 | Parts only |
$285.99 | Parts + slider |
I also used some CAT 5e cable, six resistors, some miscellaneous nuts and bolts, and of course parts from my Makeblock Kit.
The Makeblock Kit
I bought the Ultimate Robot Kit back in September 2013. It was $288.99 at the time, and I’m kinda proud that I was order #311. (I ordered from them again in February 2015 and they’re up to number 23,705!)
The kit is expensive, yes, but the parts are of good quality and are extremely useful for projects like this one.
For the reason of the cost, I’m not going to say that you necessarily should use Makeblock parts. It’s just what I used. It’s hard to say what the beams, timing pulleys, motor bracket and etc. cost me for this project, but it’s probably about $50 if you were to pick them up individually.
TOTAL: | ~ $335.99 | Parts + slider + Makeblock parts |
---|
Tools and Supplies
I had to buy a couple of extra tools and other miscellaneous for this project. You might have these already, and there are other ways to skin a cat. I posted this list in case you were curious as to what you saw me using and talking about in the time lapse video.
Item | Price | Note |
---|---|---|
Neiko 10197A 5-Piece Step Drill Bit Set | $27.21 | These exceeded my expectations. I’ve since used them to drill steel wall studs, and they go right through. |
4x Stanley 15-059 Coping Saw Blade | $4.62 | I had a coping saw, but these blades have finer teeth. |
6pc Diamond Needle File Set | $11.96 | Great quality for the price. They did OK filing ABS. |
Clear Glosscote Spray Testors | $6.99 | To seal the inkjet printed label. Did a decent job, but didn’t make it water proof with 2 coats. |
Video Transcript
This is the original shooting script for the Intro video. I figured I’d just throw it in here rather than re-typing all that same information.
Hi, I’m Scott and I made this video to show how I put together a… uh, where are you going?
{Camera moves back}
In this video I’m going to show you a motion control slider that I put together… This one right here, actually.
It’s based on one of the cheapest sliders available, and it has a stepper motor hanging off of it that’s connected to an Arduino. And that’s in this rather large controller along with the user interface components.
Besides just moving the sled back and forth manually, the controller can record and play back a series of movements and speed changes so it can do its thing without having someone to operate it.
So why a motion control slider? Mostly, I made it for fun. But the original impetus came from my HPRC/Pelican review. Towards the end of that video I had a sequence which showed gear being unloaded from the Pelican.
Check it out in full size. The transitions aren’t very smooth, and there’s tons of artifacts in that last one.
That’s because I don’t have the steadiest hands in the world. I did four or five camera passes, at four or five different speeds. It was one of the last shots of the video, and I got lazy: Rather than reshooting I just threw a warp stabilizer effect on it. That smoothed out the apparent speeds, but introduced all the artifacts.
So instead of using my own shitty hands, I figured I should just build a machine to do the same job.
Here’s a reshoot with the HPRC case being unloaded, using the motion control slider. Much smoother.
Besides shots like that, motion control is just the ticket for stop-motion animation, shooting in different settings for later composition, or just to act as camera operator when you’re a one-man show like me.
Here’s a slow motion shot of me dropping some RAM on the table. It was recorded at 60 frames per second, but you’re seeing it at 24 FPS.
Listen. This was my first real Arduino project, and I’m far from a mechanical or electrical engineer. I’m going to be telling you how I did this, but it’s not necessarily the right way to do it. If you go to s.co.tt/mc-slider you can download my plans, source code, and a materials list and make your own improvements. If you do, please let me know!
First, here’s a look at the slider itself. It’s pretty simple — those aluminum bars, the timing gears and the motor — all the mechanical stuff — are from a Makeblock kit. The switches came from Amazon, and it’s wired up using plain old CAT5.
My first mistake (and I made a few) was not planning where to mount the interface box, which is why it’s just sorta hanging there. But anyway, the box has a microstep driver attached to it, and all that’s inside are some wiring splices. It interfaces with the controller using an old-fashioned DB-25 male-to-male cable.
The controller is an oversized ABS plastic housing with power and slider connections, power switch, a potentiometer to control speed, a 4-row 20-column dot matrix LCD, and six buttons to control movement, recording and playback.
If you’re interested in details of the design and assembly, I made a narrated companion video which shows the entire process from start to finish. It’s time-lapse so you don’t have to be completely bored out of your mind as I screw around trying to figure out how to put everything together for hours on end.
Anyway, here’s how it works: The camera attaches to the carriage — or sled — whatever it’s called — as usual.
As soon as it’s turned on, the controller goes into calibration mode. At each end of the track are micro switches that are closed when the sled hits them. First it finds one end, then it travels to the other end and back again. The number of motor steps in each direction is counted, and if they differ by more than one percent the controller throws an error. This is to ensure that the whole thing is mechanically sound and that the sled isn’t binding up.
Once it’s calibrated, the sled should never hit either end switch. If it does, the motor will stop immediately.
At this point the stop button is lit and the display says “stopped”. Pressing reverse will of course start the slider moving in the “reverse” direction. When designing it, I first labeled everything “left” and “right”, but I realized that would be confusing if you were standing on the wrong side of the slider. Forward and reverse aren’t much better, I guess, and if I had to do it again I’d label everything right/left but implement a switch that programmatically changes left and right.
So as you just saw, the slider stops automatically when it gets close to the end. Of course you can stop it manually or change direction mid-motion.
The slider pot does pretty much what you’d expect. When it’s set all the way to the right it’s at maximum speed — all the way to the left and it’s at zero. It can be adjusted while the slider’s moving or before hand.
One difference is that if you adjust the speed when the slider is stopped it will update the display with the speed in inches per second. That allows you to match new moves with previous moves. Unfortunately calls to the LCD library are a bit heavy, and they create a noticeable jitter in the movement of the stepper motor. If I could do it all again I’d’ve used either a Raspberry Pi or two Arduinos: One to drive the interface and one to drive the motor.
The “lock” button next to the potentiometer will lock the speed setting so that it remains constant if the pot gets jostled.
I added the “bounce” feature in case I wanted to have the camera sweep the same subject repeatedly. In fact, it’s the way I reshot the case unpacking sequence. It’s also kinda cool. As you can probably guess from the name, it moves the camera between the two ends over and over again.
I guess the coolest parts of this project are the “record” and “play” buttons. When record is pressed and lit up, any change to the camera’s movement will be saved in memory along with a time stamp. Basically it records when forward, stop, or reverse are pressed, and records any changes in the value coming from the speed potentiometer. Since it’s based on time to millisecond precision, you can have camera moves match tightly to a planned sequence.
The record button toggles recording on and off, but hitting play will also stop recording and go directly to playback mode.
Once you have a sequence of movements recorded, pressing play first moves the slider to the same position it was in when the recording started. It then begins the set of movements.
Playback can be interrupted at any time by pressing the stop button.
The decal on the case may not be the best looking in the world, but it beats my original idea of just using a label maker. I designed it in Photoshop and printed it from my inkjet onto a full-page translucent Avery label. If you go this route, I’d recommend getting a white vinyl label — I thought it would be cool to have the grey of the case show through like where it says “s.co.tt” — perfect color match and all — but really it made the rest of the printed sections appear that much duller.
Another couple of things I would’ve done differently in hindsight:
I’d have put the power input on the interface box rather than the controller. After all, the slider is going to stay in place during a shot, but I might want to move the controller around when setting up.
I would’ve also used a lighter, more flexible cable than this 25-conductor behemoth.
I was kinda in a hurry to get this project started, and the project box for the controller was the closest one I could find to the size I needed, but obviously it’s bulkier than it needs to be. If you’re building one, hold out for a better box.
I also screwed up the size of the interface box: Originally I bought a stepper motor driver that would fit in there, but it was completely the wrong type. That’s why the microstep driver is piggybacked on to the outside. The connections from the motor and the micro switches to the interface box could also benefit from removable connectors: RJ-11s or RJ-45s would work great. Not using them was just sheer laziness on my part.
I couldn’t find a reasonably priced timing belt that was long enough and that shipped from the US. So I just stapled a couple together. It’s not as bad as it sounds — the staples have actually been holding up pretty well.
The stepper motor can be pretty loud, depending upon the speed. I had it wrapped in foam when I was shooting the opening of this video, but that’s not a good solution if you’re using it a lot — the motor will overheat pretty quickly.
And again, I should have implemented this with two Arduinos or a Pi. In order to have the motor actuate smoothly, I had to set the microstep driver to 3200 pulses per rotation, which is 16 times the motor’s spec of 200 steps per rotation. Asking the Arduino to process user IO as well as accelerate, move, and decelerate without jitter is a challenge. I had to make some compromises, like only updating the LCD when it’s stopped, and reducing the resolution of the speed control and button poll intervals.
Despite all that stuff I’d do differently, I still think this project came out pretty well. There are things I’m happy with, like the layout of the controls, the simplicity of the external cabling, and of course it’s overall functionality; It does what I wanted it to do from the start without too many compromises.
If you want to make your own version of my Motion Control Slider, you can find everything at s.co.tt/mc-slider like circuit diagrams for the controller and interface box, a parts list, the controller decal template, and the full assembly video.
Thanks for watching, I hope this gave you some good ideas to create your own motion control camera slider.
great slider, i am new to the programming side of things and while i am competent at most things this seems to be above my ability. i am in the process of building a slider too and have set it upon myself to use your controller with a slight difference in the hardware slider setup. Could you please if you have the time tell me what files and code i would need to put onto the uno for the slider to run as well as your finished build.
thanks in advance
Ian M.
Hey Ian,
Sorry for taking so long in getting back to you. Thanks, and that’s really awesome that you’re using my controller. If you use the same basic wiring schematic — as in you’re connecting the same components up to the Uno on the same IO pins that I used — then you should only have to load the contents of
MCSliderController.ino
(from the files.co.tt-mc-slider-v0.2-src+libs.zip
, above).Just make sure that the libraries are somewhere that the Arduino IDE can find them.
If you’re using different IO pins or different stepper controllers and/or LCD then you’ll need to tweak things quite a bit. I can’t be more specific than that without knowing exactly what you’ll be using, though.
Anyway, I hope that helps.. Let me know!
Scott
Hi Scott
i am trying to make a slider as you`re, but i have a problem.
I buy another lcd (http://www.robofun.ro/lcd/lcd_20x4_i2c_negru_verde) wich use this library (https://github.com/adafruit/LiquidCrystal)
can you help me to make the changes in you`re code to can use this lcd?
Thanks ZSOLT
Hey Scott this is an awesome project. It’s something I’m considering doing for my kessler Cineslider. The slider itself already has a belt driven carriage but the motor systems Kessler sell are far too expensive for what they are.
I hired the Second Shooter for a weekend and ended up having to disassemble the motor enclosure because it wasn’t working but I learned something quite clever, they had a stepper motor with a rotary encoder allowing the system to know exactly where it is if the motor skip steps. Also rather than using limit switches as your stops you could use the position being recorded by the encoder.
Also John Heinz has built a parallax style camera panning attachment for his DIY slider which looks like it could be a good addition to your slider.
Sorry for ranting I’m just collecting ideas at the minute and your videos are the best I’ve seen on the subject of DIY motorized sliders. Great work man!
KrisD
Links:
Kessler’s Parallax: http://www.kesslercrane.com/parallax/
John Heinz Version: http://www.ibuildit.ca/other%20projects/camera-slider.html
Hello Scott. I found your video slider project and i made’it too. For me was too expensive to buy a slider but i have made one.
I used the same stepper driver like yours and a NEMA23 stepper.
Is working perfectly, but please help me to modify the code to work with 32 microsteps. Now is working with 16 microsteps but if i set the driver to 32micro, calibration ends’up ok, but on very low speed when i do timelapse, is not working corectly. it moves forward just a bit and then starts to go backwards, hit the end of the slider and keep pushing. It stops only if i reset the arduino.
My track lenght is 35.55inch between the limit swiches.
What i have to modify in the code to make’it work with 32microsteps?
Please help.
If you want to see my work i can send pictures, or a video, just give me an adress where to send.