MakerSlide Camera Slider Control Program

There has been a ton of interest in camera slider applications for MakerSlide.  A while ago I decided to make a very simple reference design for a motorized slider.  This design only required fabrication of one part.  The rest of the parts are existing components.  The part can be made on a laser cutter, router or even by hand.  There are no tight tolerances and you can use the MakerSlide carriage as a template for drilling some of the holes.  I can sell a complete slider system including motor for less than $120 for a 1 meter setup.  It would only be $10 for each addition meter.  The longest I can ship is 2.5 meters, but I stock the material in 4.5 meter lengths if you can figure out how t0 get it.

I don’t know much at all about this type of camera work so I did not see all this interest coming.  Several people approached me about buying my prototypes and I have sold several of them.  Most of them asked me how to control the motor.  I come from a CNC background so most of my demonstrations were done using CNC software like Mach3, EMC2 or even GRBL.  This has few issues.  The first is many photographers have no knowledge of CNC or G-Code.   The second is the solution is way overkill in cost and complexity for a single axis machine.  The third issue is portability.  This will probably be used in the field where a PC is impractical and power may be unavailable.

I decided to make an Arduino based controller.  Arduinos are good because they are cheap, small and easy to program.  They also use very little power.  I wrote a similar controller for the PIC processor a long time ago and borrowed the basic algorithm from that.  The method used could work for multi-axis machines if you want to steal the code.  The Arduino is. using my Stepper Shield.  I have just one driver installed and in another “slot” I have a bread boarded switch.  The stepper shield is nice because it can act as a mother board for many future features.

MakerSlide: Camera Slider Control Program 2011 CC-A-SA

0 = Set Current Location as 0
S = Stop now!
D = Disable Motor
E = Enable Motor
H = Home (Move to 0)
M = Move to ..(M Dest Speed Accel)
J = Jog until stopped ('J 1' for forward, 'J -1' for reverse, 'J' to stop )
I = Info (show current parameters)
G = Go (start program)
P = Show Program
C = Clear Program
L = Edit Line.  Format: L Line# Dest Speed Accel)  Ex: L 0 2000 3000 1500
      Use 0 for destination and speed to indicate end of program
      Use 0 for speed to indicate a pause.  Dest is pause in milliseconds
R = Set Max Speed
A = Set Max Accel
V = SaVe to EEPROM
? = Redisplay this menu

The controller uses a menu driven interface via the USB connection.  The easiest way to talk to it is though the Arduino IDE serial monitor.  That allows a free, common interface between PC, Apple and Linux,  but most serial terminals would work.  The commands currently work in the unit of stepper motors steps.  It could be easily converted to a real world unit, but at this time it is just easier to use the same unit that the motors use.  My system has 4000 steps per inch.  That makes for a very smooth system.  Extremely slow rates are possible.  It can go 1 step per second at 4000 steps per inch, so it could take well over and hour to go an inch.  You could hack the code to easily drop this by many orders of magnitude.  Each move can have its own speed and acceleration to fine turn the affect you want.

It has several commands to interactively move the carriage around.  This would probably be done to setup the system before the actual “shot”.  These include Move, Home (go to zero), Jog and Zero (define current location as zero).  You can also create a move program.  This allows you to define a couple dozen moves that run sequentially.    These can either be moves or dwells (pauses).  Once the program is entered it can be saved.  This allows you to pre-program the device before you take it in the field.

At power up the motor disables.  This allows you to slide the carriage by hand.  This is handy if you don’t have a PC to do it in the field.  As soon as you make any move or run a program the motors enable.

How it works (programmers only)

The controller uses a timer to run an interrupt function at a regular interval.  The default is 40,000 times per second, but that be be tweaked by changing one program line.  The interrupt function determines if a step should be taken.  If you want to move at 20 steps per second, you allow the interrupt to run (40000/20) or 2000 times before the step is taken.  A counter in the interrupt counts up until it is time to step.  By varying the count on the fly you can create smooth acceleration.  All the math required to smoothly accelerate could limit the interrupt rate, so  the calculation are done once, before the move occurs.  Inside the interrupt is all simple integer counting and a few tests.

 

Source code (Arduino 1.0)

 

 

 

Wiki Page on Slider

Wiki Page on Software

 

Buy one here at the MakerSlider Store

Future Plans

I have several features I want to add.

Drawbacks

Stepper motors draw a lot of power.  I was running my NEMA 17 at 11V and 0.1 amps.  You need a decent battery of 2000-3000 mAH to do a multi-hour run.  Steppers are also notoriously loud.  The camera will  pick up the noise if the mic is close the the motor like on the camera itself.   The motors I have are way over kill and running at less than 10% of their rated current.  I have some NEMA 14 motors on order.  Servo (not hobby servo) motors would be a lot quieter but and lower power, but are more complicated and might require gearing down.

Comments: feel free to comment below or on this forum thread.

Videos



Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

14 Responses to “MakerSlide Camera Slider Control Program”


  1. David Ditzler

    Bart this looks like a great start. I am excited to put mine together and start playing with it. You included a great diagram for the main drive unit and slider part but I am scratching my head for how have the end caps attaching with and holding the ends of the belt. Do you have some photos of that or a diagram?

    thanks
    -david

  2. bdring

    I am working on building and usage instructions on the Wiki here.

    http://www.buildlog.net/wiki/doku.php?id=ms:camera_controller&#slider_seup

    There is close up exploded view of the belt clamp.

  3. Motorized camera mount unexpectedly popular for CNC-aimed hardware - Hack a Day

    [...] a camera mount that moves smoothly along a motorized sled. [Bart Dring] created the system and was surprised by it’s popularity, having received [...]

  4. Motorized camera mount unexpectedly popular for CNC-aimed hardware » Geko Geek

    [...] a camera mount that moves smoothly along a motorized sled. [Bart Dring] created the system and was surprised by it’s popularity, having received several [...]

  5. Motorized camera mount unexpectedly popular for CNC-aimed hardware | ro-Stire

    [...] a camera mount that moves smoothly along a motorized sled. [Bart Dring] created the system and was surprised by it’s popularity, having received [...]

  6. Tom Frisch

    I had my eye on your kickstarter project in June, but then lost track. Glad to see you had a smashing success. So where can I get some of your special track?

  7. Seshan

    Wow! This would be great for photography, One way to control it is using the Cameraaxe ( cameraaxe.com ) It a open sourced project that can control camera and flashes, and there is a motor sensor for it, that could be used with this to make some nice timelaps shots. I would love to get some of this up in Canada!

  8. Plutot Photo by philipped - Pearltrees

    [...] MakerSlide Camera Slider Control Program at Buildlog.Net Blog I decided to make an Arduino based controller. Arduinos are good because they are cheap, small and easy to program. They also use very little power. I wrote a similar controller for the PIC processor a long time ago and borrowed the basic algorithm from that. The method used could work for multi-axis machines if you want to steal the code. The Arduino is. using my Stepper Shield. [...]

  9. Ben

    Hi,
    I’m working on a easy slider based on Drylin W system. I developed an iPhone app to control it for time-lapse and stop motion purposes.. Your rail solution looks great. How can I get all parts to try it ?

    great work.
    and happy christmas
    Ben

  10. Schweppes

    This is mad machinery here mate. I fully plan on making one.

  11. cameras

    Great. we should be careful to choose a good camera, and use this is wonderful.

  12. Gilles

    Good morning,

    It’s been so long that i was looking for a motorized slider ( and not a too expensive one ).

    Your slider look really cool! I try to buy it on the website makerslide, but the product seams to be off.

    Is it still possible to buy a complete slider system ?

    Best regards

  13. bdring

    It was just a proof of concept project. I sold out of all parts I made. The design is open source and can easily be fabricated on a router, 3D printer or laser cutter.

  14. Kai

    Thanks a ton for sharing the code!

    I tried to figure out how to use a timer to control a stepper motor for 2 days now and constantly failed. Your code helped me understand how it works!

    keep on going and thanks again

*