In Part 1 of this little adventure, I spoke about the 3D printed parts I created to motorise my camera slider. I plan to make a few revisions to those printed parts in the future, but for now, they’re functional, so I’m leaving them alone for the minute. Now, it’s time to move onto the electronics side of things.
My plan is to power the whole setup using 3 cell LiPo RC batteries. I have a bunch of these from a drone I no longer use, so I figure I should do something with them instead of leaving them to rot.
But I can’t just hook a stepper motor straight into a battery and magically expect it to work. I need other items, too. And that’s where this post comes in.
The brain of the system will be an Arduino Uno. An 8Bit 16Mhz microcontroller with 32KB internal storage and 2KB RAM. It doesn’t sound all that powerful, but it’s the ideal board for this kind of application.
On top of this sits the CNC Shield V3. This allows the Arduino to easily talk to one or several stepper motor drivers without having to go through the hassle of breadboards or custom PCBs, and wires trailing all over the place.
It’s a simple board with few components. There’s a resistor, a fuse and a capacitor for each stepper motor driver. Aside from that, it’s just traces to connect pins to sockets.
On top of the CNC Shield, we add an A4988 stepper motor driver module. These are what convert the signals from our Arduino into something the stepper motor can understand. The direction, the number of steps, or microsteps (and this one supports up to 1/32 microstepping). They also allow you to power the stepper with a voltage and current that would otherwise fry the Arduino.
Yes, I know, I can just connect the A4988 module straight to the Arduino. But this is just for my first version to test and get things working. After I know things are working as expected, I’ll start to refine things a little. I may even make my own custom PCB.
The CNC Shield also supports up to 4 stepper motor drivers. I’ll only be using one for now, but I wanted to use this shield to give me possible options. A motorised pan & tilt head. maybe.
Anyway, after these components are all connected up and talking to each other, the next part of the plan is to figure out a UI. Essentially, how I want it to take input from the user and how to tell the user what’s going on.
Initially, after it’s all set up, I’ll simply be programming and controlling things using my Windows tablet connected directly to the Arduino using the USB cable. When I want to change something, I’ll edit the code, recompile, and upload it back to the Arduino, overwriting what’s already there.
This definitely isn’t the most practical solution for the long term. But using a tablet to control it may actually work out to be ok. At least, it can if I can come up with a nifty touchscreen interface using Processing and don’t have to edit the code each time I want to shoot a sequence.
I do have a couple of huge boxes of electronics components, though. So, there are a number of routes I could take when it comes to the user interface. Exactly which I’ll go for, I’m not sure yet, but I do have a few ideas I want to test out.
For now, my goal is just to figure all this stuff out and get things working (even if it’s in fairly limited fashion). Then I’ll go over the whole process from start to finish on YouTube to explain the build, how it all works, and get some feedback on where to go from here.
And with that goal in mind, here are a few handy references. They go over how the CNC shield works, and how to talk to the A4988 stepper driver.
- CNC V3.0 Arduino Compatible Shield
- Using the CNC shield with Arduino’s Stepper Library
- Arduino Uno + CNC Shield V3.0+A4988 Installation Guide
- How to set output current limit on A4988 Stepper Driver
And then there’s this, which I’ll definitely need to figure out and adapt to working with stepper motors.
But, all in good time!
First up, there are videos to record on the process so far. So, if you’re not already subscribed to my YouTube channel, why don’t you head on over.
Now that I’ve moved to Scotland I will be setting up a dedicated shooting area. So, the content will be coming much more often.