Introduction: Remote Controlled Camera Gimbal
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
This guide will show you how to 3-D Print and assemble your own remote controlled camera gimbal.
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Buy or Gather All Non-3D Printed Parts
In order to build this camera gimbal you will first need to buy a few pieces that are not 3D printed.
You will need 2 gears with an outer diameter (from the edge of one spur to the opposite side) between 18mm to 20mm and a center diameter of 5mm for a shaft to go through.
You will also need 2 28BYJ-48 stepper motors, a 5mm to 8mm CNC shaft coupler, 4 endstop switches, an Arduino Uno, an IR receiver and remote, super glue, and M3 bolts in a few lengths and M3 nuts.
Most importantly you will need to buy a Logitech C270 webcam to use with this camera gimbal.
Step 2: Print Your Enclosure
First, you will want to print the enclosure that will house your Arduino, mini breadboard, and all of the wiring.
The obj file for the enclosure, lid, and shaft are included below.
Step 3: Print Rotation Motor Mount, Endstop Mount, & Main Rotation Platform(optional)
You will need to print at least the rotation motor mount & endstop mount.
Unless you have a way of using a dual extruder with a dissolvable filament for the support material I would HIGHLY recommend printing the main piece of the rotation platform at this step and then printing the pegs that attach to the underside of it in another step. I designed the rotation platform with a small space around the pegs that attach to the bottom of it so it can be split into 4 different pieces when it is imported into the 3D printer software. If you only have access to a single extruder then you will need to split the rotation platform into its separate pieces and delete all pieces except the main platform itself.
If you do have access to a 3D printer with a dual extruder and a dissolvable filament for support material then skip printing the main rotation platform in this step.
Step 4: Print Camera Mount, Brace, & Rotation Platform Pegs
These pieces are a bit difficult to print with normal settings and depending on whether or not you have access to a 3D printer with a dual extruder using a dissolvable filament for support material you will want to do these using 1 of 2 methods:
Method 1: Printing using a dual extruder with a dissolvable filament for support
If you can use a 3D printer with a dual extruder and has a dissolvable filament for support material this would be the easiest is preferred way to print your parts. Simply print the full rotation platform assembly, camera mount, and camera mount brace with support material enabled and then dissolve the support material after your parts are done printing.
Method 2: Printing with a single extruder
If you only have a single extruder to print your parts you will first need to split the camera mount into its 5 separate pieces. After that you need to split the rotation platform into its 4 pieces and delete the main platform piece. You will then need to orient all the pieces so they are standing on end and adjust your printer settings to print a brim around the base of the part to keep it from being pulled off the print bed while the part is being printed (I find a 5mm brim provides sufficient support). After your parts are done printing you will need to carefully remove the brim from each part. After the brim has been removed you will need to glue the short shaft onto the longer piece of the camera mount that holds the camera and glue the longer shaft onto the shorter piece of the camera mount that holds the camera. After that is done make sure to test fit the 2 pieces to make sure they connect to the camera properly and then glue one part of the brace unto the longer piece that grips the camera (this last part could also be done at the end after the camera gimbal has been completely assembled).
Step 5: Circuit Setup
Now that all of the pieces have been printed you will need to set up the Arduino and mini breadboard.
I've included a picture of my "neat" layout of all the wires and a much easier to read and understand schematic of how everything connects. You will notice in the provided schematic that I put all the parts corresponding to the rotation motor hooked up to one side of the breadboard and all the parts that correspond to the tilt motor on the other side with wires connecting the positive and ground rails on one side to the corresponding rail on the other side. Unfortunately I wasn't able to find the controller for the motors or the motors themselves in the program I used so instead I showed these wires going off to empty space to represent where the controller would be, I did include a picture of what it looks like though. On the controller you would hook up Arduino pins 4-7 to pins 1-4 for the rotation motor and Arduino pins 8-11 to pins 1-4 of the second controller for the tilt motor. Both controllers will also need to be connected to the power rails as shown in the schematic.
Once all of the wires have been hooked up to the Arduino and breadboard go ahead and upload the Arduino sketch below. You will need BOTH sketches used together since the Motor Code sketch makes use of the Functions sketch.
Step 6: Assembly
Before putting all the pieces together you will need to make a modification to one of your stepper motors. This motor will then be your tilt motor. Because of how short the wires from the stepper motors are we will need to cut the wires from one of the motors and add in about 80mm (or 3 inches) of wire and then connect the extended wires back to their proper wires on the plug. Make sure you connect all wires properly (i.e. blue wire to green extension wire back to blue plug wire) and make sure all connections are strong otherwise you will experience issues that will be MUCH harder to fix later on.
Now that all pieces have been gathered and the wiring is done it's time to put everything together.
Start by attaching 2 endstops to the rotation platform with 2 M3 bolts with the switches towards the center of the platform. Connect one of the gears to the tilt motor and then attach the tilt motor to the opposite end of the rotation platform with 2 M3 bolts and 2 washers. (Note: You will need to use a washer between the motor and the rotation platform to make sure the motor sits flat against the platform)
Attach the other 2 endstops to the endstop mount using 2 short M3 bolts with the switches pointing up. Then attach the endstop mount to the rotation motor mount by either gluing it on or if you would like to be able to remove it then you can drill and tap holes on both sides of the motor mount where it lines up with the holes of the endstop mount.
Attach the camera mount to the camera (if you did not glue the brace on yet now would be the time to do so and then let it sit for a bit to dry) and then feed the longer shaft through the hole in the rotation platform near the tilt motor. After this is done you will then have to connect the 2nd gear to the shaft of the camera mount so that it rests on top of the gear connected to the tilt motor.
Attach the 5mm end of the CNC coupler to the rotation motor. Place the rotation motor inside the motor mount and either glue it in or drill and tap the holes.
You will need to feed ALL the wires through the end of the hollow shaft you printed starting with the end with notches in it. The size of the notches differ depending on how many wires need to feed through them.
Next comes the hard part...
Once all of the wires have been fed through the shaft you will need to separate the wires and place them in their respective notches. With the center notch facing you this is how you should place the wires:
The wires for the endstops attached to the rotation platform should go through the left notch.
The wires for the rotation motor go through the center notch.
The wires for the tilt motor and the wires for both endstops attached to the endstop mount will feed through the right notch.
After all of the wires have been put in their place you will need to place the motor mount on top of the shaft, make sure there are no wires outside of their respective notch, and then adjust the length of the wires coming from the shaft so that they are mostly coming out of the top of the shaft around the motor mount.
Next you will need to CAREFULLY glue the motor mount on top of the shaft making sure not to get glue on the wires. You will need to hold the motor mount to the shaft for a bit until the glue dries enough to move on.
Once the glue has dried enough you will need to feed the wires through the enclosure lid and then glue the shaft to the enclosure lid.
Now you need to take a needle held with a pair of pliers, heat the needle, and then press it through the lid of the enclosure. You will need to do this 2 more times for the IR receiver if you have weak remote. If you have a good remote to use you may be able to skip this step entirely if the receiver can pick up the remotes signal through the box.
Unless you choose to power your Arduino with a 9v battery you will need to cut a hole in the side of the enclosure to connect the Arduino to your computer.
The only thing left to do at this point is to attach the rotation platform to the CNC coupler, connect the wires from your motors to their respective controller, and then adjust the length of wire coming out of the top of the shaft so it is long enough to reach the device it connects to at any range of motion.