Arduino Motion Control with DragonFrame

Motion control is quite common place in stop motion animation. Using stepper motor controlled rigs to move the camera step by step as you animate to create smooth pans, tracks and tilts to create elaborate camera moves.

My only experience of this prior to this project was manually moving the camera on a slider of DIY rig. This works just as well, if you’re really patient and have a great memory, but i don’t, and am very liable to forget to move the camera and ruin the whole shot. Add in more than one axis and it practically becomes impossible!

So that’s why I wanted to make a motion control rig. Also, I couldn’t afford to buy one.

Thanks to the brilliant DragonFrame which I think everyone who does stop motion uses now, controlling stepper motors with an arduino is relatively simple. It did take me a fair bit of googling but there are some great tutorials out on youtube about how to do this. Mix that with a bit of fiddling and getting to grips with the motion control settings in DragonFrame and you can get things working pretty quickly.

I started by designing the smaller 2 axis. The pan and tilt at the head of the jib. Then sticking them into DragonFrame and seeing if I could get a response.

  1. Load the DFMoco sketch onto your arduino of choice. (I used an arduino Mega). This sketch can be downloaded from the DragonFrame site or directly from github.
  2. Connect the stepper motors to the stepper motor drivers. Finding the right stepper motors and drivers can be a bit of a minefield, but there’s lots of info online about it. I opted for nema 17 2A for my first 2 axis. These are commonly used in 3d printers, so quite cheap. And I used some cheap but sturdy 4A 9-42V drivers. All the electronics are easy to find on ebay or Amazon.
  3. Connect the stepper drivers to the Arduino. If you look in the DFMoco sketch it will tell you what pins to connect the driver’s step and direction pins.
  4. Connect all the power and grounds.  I used an old PC power supply, as you can see in the pictures.
  5. Plug the arduino into your PC via usb, tell Dragonframe you have an arduino connected and start setting up the axis.

The above gif shows the first working 2 axis head I built. It did go through a few iterations before this as I worked out how powerful the stepper motors needed to be to move the camera.

I ended up using a 5:1 planetary gearbox that i downloaded from thingiverse. I printed one in ABS and one in nylon for more durability. Though this wasn’t totally necessary as the ABS one worked fine. This plus a roughly 3:1 belt drive gearing proved plenty of power to move the camera and lens as well as hold it in place.

Below is a picture of the gearbox and belt drive, as well as the test setup with electronics cable tied to the roof and Billy awaiting the test shot!

The electronics all worked well without too much fuss. The motion controls in Dragon were easy to set up. You simply connect the arduino and add an axis for each motor and configure the speed if necessary. Movement is then programmed in dragon using keyframes and curves. A system very familiar to anyone who uses after effects as much as I do!

With this relative success, I started designing the whole rig. The main thing I had in mind was what shots I wanted to achieve as well as the size of the set. Again using fusion 360 I designed a full rig.

 

At this point, the engineering requirements were a bit out of my ability. Luckily engineering firm Lincoln Jigs Ltd were well on board to help me complete the build. I sent them the design and they rebuilt it in their CAD software of choice with a few changes that they thought would improve the design or make the build easier.

Meanwhile I sourced the larger stepper motors, drivers and drives for the 2 larger axis. I used some nema 23 4A steppers, and small chain and sprocket system that is design for mini motos. These are available super cheaply from ebay, amazon or direct from china.

Lincoln Jigs also had a large base welded up with castors to move the whole rig around. Once I had all of the pieces, it was just a case of putting it together and wiring it all up. I decided, partly to save time and money, that the initial 2 head axis I built with extrusion and 3d printed parts would be good enough to use on the final rig. So this was mounted to the end of the jib arm.

Here’s a few images of the gear mechanisms as well as a video of the thing in action.

I may do another post about animating with motion control and my experiences with it. The rig held out for the whole shoot, which I was pretty pleased with considering it was the first design.

I did have a few issues, the main being movement in the rig. This meant repeating movement accurately was not always simple. It required a large amount of backlash on the motors and sometimes a bit of manual nudging to get shots to start in the same place. Once the first frame was lined up the rest of the movement was matched well. The flex in the rig also meant that accidentally knocking it pretty much ruined the shot as its nearly impossible to match the shot back up.

The rig also had no end switches or homing system. This meant that shots could not be repeated after the power had been switched off, or anything else was reset. This will definitely be an addition in mark 2!

All in all though i’d say a reasonable success, for a DIY moco rig. Its really easy to get started and will work with any stepper motor and driver as far as i can tell.

A bunch of the printed off plans for the rig.

James is the writer/director of Billy Whiskers, scribbling haphazardly on this website to document and share the experiences of making a stop motion animation.

3 Comments

  1. Brian 3 months ago

    Incredible! Thanks for sharing.

  2. Scot Warner 2 months ago

    Really nice setup! Do you have any specs of the drivers and schematic of the wiring at all? I’m trying to use a mega board for motor control but not sure if I need the cnc shield and motor drivers or can just use the drivers and a power supply…
    Thanks in advance.

    • Author
      James 2 months ago

      Hey Scot, the drivers I used were the TB6600 4A 9-42V. I don’t have a schematic I’m afraid, but the wiring is all pretty basic. The stepper motors are wired up to the driver, the drivers each have a 12v and a ground. The step and direction pin are connected to the arduino and that’s about it!

      I didn’t use a shield, but I think it depends what drivers you use and what functionality you want out of it. I’m no expert on this though, so someone else may be able to advise better than me!

      Hope that helps,

      James

Leave a reply

Your email address will not be published. Required fields are marked *

*