I had a few stepper motors lying around and really wanted to use them to make something cool. I decided that I would make a Pan and Tilt system for my DSLR camera so that I can create cool time lapses.
Items you will need:
- 2x stepper motors -https://amzn.to/2HZy21u
- 2x stepper motor L-brackets (these come with the motors in the amazon link)
Step 1: 3D Printing
To start off with you will need to 3D print 3 of the Pand tilt motor mount with 16mm bearing.stl files. Once you are done printing you can then take 2 of the bearings and place them in the hole on the bottom of the plate as shown in the photo above. Then take a brass stand-off and hammer it into the bearings from the other side of the plate about 3mm. Now take an M3 bolt and screw it into the stand-off from the bottom as shown in the photo above. Take the big gear and hammer slightly onto the top stand off. Attach the stepper motor using the 4 small holes at the other end of the plate. Attach the small gear onto the shaft of the motor and then place the drive belt onto the two gears.
Step 2: Bottom Yoke Section
Now 3D print the Bottom Yolk Section.stl. Once it has finished printing use some form of heating to heat the pipe section on the bottom of the yoke and then place it onto the big gear lining the hole up on the pipe with one of the grub screw holes on the gear. Screw an M4 bolt into the hole securing the bottom yoke section onto the big gear. Now fix the second motor to the Yoke section using an L-bracket, 4x M3 screws and 4x M4 nut and bolts. Fix another L-bracket to the other side using only two M4 nut and bolts. Fix it so that it extends further out than the body of the yoke section as the photo shows above.
Step 3: Tilt Mechanism
Repeat the first step by attaching 2 bearings and brass standoffs to create the gear system how ever you will need to add an extra brass standoff on the other side of the bearings to attach the Tilt plate. You will then need to attach this plate to the stepper motor which has been attached to the bottom yoke plate making sure that the big gear faces outwards. This will then allow you to attach the small gear to the stepper shaft whilst also putting on the pulley belt.
Step 4: Tilt Mechanism: Part 2
You will then take the last Pand tilt motor mount with 16mm bearing.stl and attach it to the other side of the bottom yoke section using the L-bracket and 4x M3 screws and nuts. You will then add two bearings in the same way which you did in step 1 and in step 3. You will hammer in a brass standoff into the bearings on the side which faces in towards the Yoke. Then screw in an M3 screw and add another standoff onto the end of the other one like in the photo above.
Step 5: Adding Tilt Plate
Now you need to print out the Camera mount.stl file. Once you have printed this out you need to attach either end to the brass standoffs on either side using M3 screws. Once you have done this you are finished on the building side of things.
Step 6: Soldering and Wiring
You will now need to solder the pins to 2 easy driver boards as this is what we are going to use to drive the 2 stepper motors on the pan tilt mechanism. Above is the wiring diagram which shows the Raspberry Pi 3 as this is what I used when making. If you are using different versions of the Raspberry Pi then make sure you look at the GPIO header diagram of the Pi you are using and then change the signal and direction pins to suitable pins making sure you remember which is which. You will also have to change the pin numbers in the code later on. To power the easy drivers you will need a 9V 2A power supply. I have used the DC barrel jack of an Arduino and then used the power pins from the Arduino to power both easy drivers, however you may want to use something different.
Step 7: Setting Up Raspberry Pi and Installing Python Programs
You will need to download pantilt.py and 2motors.py and put it on your Raspberry Pi in the same directory. Then to start the timelapse you will have to run 2motors.py. A GUI should appear and this is where you input your settings for your time-lapse. At the moment the GUI is not fully finished but I will be adding more things soon. Feel free to write your own programs if you want to add any other functions that are not included in the GUI.