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.
I have several features I want to add.
- Android smart phone control via the Arduino Mega ADK
- USB shutter control of cameras.
- CHDK control of Canon cameras
- IR remote control for the shutter.
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.