Camera Mount System
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).
Materials & Requirements
Materials & Requirements:
Electronics
- 3D Printer (*1)
- Arduino Uno R3
- Breadboard
- 2- Push Button Switch
- 2- 12V Stepper Motors (*3)
- 2- 12V Stepper Motor Driver Boards (*4)
- 2- 3 Pin End Stop Limit Switches (*5)
- Female to Female and Male to Male Wires (*8)
- 12V Lawn Mower Battery
- 2- Alligator Clamps
- USB-C Adapter Cable
Building Materials:
- 4 - 400mm T Slot Aluminum Extrusions (*2)
- Timing Belt and Pulley Set (*6)
- Aluminum Connector Set (*7)
- 2"X2"X6' Wood
- 3'X3' Plywood
- Electrical Tape
- Zip Ties
- Hot Glue Gun
- Phillips Head Screw Diver/ Power Drill
Screws & Washers:
(Note: Everything in paracentesis are what the screw is used for)
- 12- 1.2" Wood Screw (Plywood/Base, Aluminum Extrusions)
- 4- 2" Wood Screw (Base)
- 10- M2X0.4X10 Countersunk Flat (Limit Switches, Phone Supports)
- 6- 6.35X2.75X0.75 Washer (Limit Switches)
- 4- #10X24X1.2 Button Head Screw (Stepper Motor Housing)
- 6- #10X24 Nut (Stepper Motor Housing, Pulley Support)
- 2- #10X24X1.9 Button Head Screw (Pulley Support)
- 6- #8X14X0.5 Button Head Screw (Phone Supports)
- 6- #8X14 Nut (Phone Supports)
Optional Materials:
- Solder Gun (Used to Extend or Shorten Wires)
- Paint
- Wax Paper
Websites:
*1- https://www.amazon.com/Comgrow-Creality-Ender-Alum...
*2-https://www.amazon.com/Aluminum-Extrusion-European...
*3-https://www.amazon.com/CenryKay-28BYJ-48-Valve-Ste...
*4-https://www.amazon.com/ULN2003-Stepper-Driver-Modu...
*5-https://www.amazon.com/CHENBO-Printer-Switchs-Mech...
*6-https://www.amazon.com/KeeYees-Timing-Tensioner-To...
Build the Set-Up
- Cut two 13- 5/8" of the 2"X2" wood
- Cut two 8- 3/4" of the 2"X2" wood
- Cut two 13- 5/8" X 11.75" pieces of plywood
- Cut two 1"X2" rectangle out of the corners on the long side of the 8-3/4" wood (Only do this to one piece. Do not attach this piece at this point. It will be one of the last steps in the whole process)
- Predrill the holes based on the specific screws according to figure 1.
- Screw the pieces of wood together using the 2" wood screws. If the screws are purple in figure 1, do not put those screws in, only predrill the holes. (This way we have access inside of the box to put all electronics in.)
- Predrill the holes based on the specific screws used for the plywood according to figure 2.
- Screw the plywood onto the structure built in figure 1.
- Take the other piece of plywood and predrill holes based on figure 2 for only the bottom two screws.
- Add screws to the holes based on figure 2. (This will now be referred to as the base and this piece of plywood will be considered the top of the base)
- Predrill holes in the wood and aluminum extrusions according to figure 3.
- Add screws to join the aluminum extrusions and base together.
- Add corner brackets to each extrusion for additional support.
- Predrill and screw the bottom part of the corner brackets to the top of the base (refer to figure 4).
- Take 2 corner brackets, 4 t-slot screws and the 2 other aluminum extrusions and attach them to the 2 aluminum extrusions already on the base (refer to figure 5).
- Predrill the hole where the push button will go; the placement is arbitrary. It is recommended to drill one size bigger. If the same buttons are being used, then two 5/8" holes should be drilled about 1" apart.
Build the Circuit
The figure above shows how the circuit should be assembled.
Components and their Functionality:
Breadboard
- Its main use in the project is to allow power through the power rails since there is only one 5V port on the Arduino Uno R3.
Arduino Uno R3
- To transmit the code as an output, provide power and allows certain ports to preform different actions.
USB-C Adapter
- To allow the Arduino Uno R3 to connect to the computer and upload code.
Stepper Motors
- Connect to the pulley wheels and will be the driving force of the pulley and phone mount.
Stepper Motor Driver Boards
- Allow the stepper motors to be controlled through code commands.
End Stop Limit Switches
- Allow the motors to run until the phone mount reaches the end of the pulley. They cause the mount to become level so the camera does not record at a slant.
12V Power Supply
- Provides more power to allow the stepper motor to run efficiently.
Push Button Switches
- Allows the user to control the position of the phone mount. One button will move the mount forwards and the other button will cause the mount to move backwards.
Upload the Code
The photos above show a fully commented code that goes into detail about the functions of each command.
All end switches, buttons, delay times, and pins for both motors are defined. Forwards is the name for the forward button and backwards is the name for back button, while Delaytime is the delay time for motor one and delayt is the delay time for motor two. In the setup loop, all buttons and end switches are set to input and high, while the pins for the motors are set as outputs. The variables backward and forward are functions designated for motor one while forward2 and backward2 are functions for motor two. The next part of the set up loop is initializing the motors to run backwards until the end switches are pressed. The first for loop causes both motors to run backwards and whatever end switch is pressed first a variable x will be assigned, either a one or two. If x=1, then motor one turns off and the first if statement will run. This statement causes motor two to run until its respective end switch is pressed. If x=2, the second if statement will run and motor one will continue to rotate until its end switch is pressed while motor one is stopped during this time. At this point the mount is stopped, fully leveled, and is ready for the main loop.
The main loop has two main if statements. If the backwards button is pressed, meaning it is low, then the number of steps for each motor is established and a while loop is entered which calls for the motors to move backwards. The second if statement is the same except it is for when the forwards button is pushed. The buttons will run its respective if statement until the button is released.
The last two tabs of the sketch are the exact same thing except each have slightly different names to distinguish between motor one and two. The functions tab establishes the functions to turn all coils off and to move the motors forwards and backwards. The first section of the code writes each step out making only one coil high at a time. Then each step is put together in a certain order to create a function that will make the motors rotate a certain way. These functions were then used in the main sketch.
3D Print Materials
The photos above show all 3D printed components.
Functionality of Components:
Left and Right Stepper Motor Housing Assemblies (1)
- These parts are what store the stepper motor and keep it in a vertical position. Each assembly has three components: housing, cover, and stepper motor. As seen, on the left and right sides there are holes that allow the t-slotted nuts and screws to be used to attach the housing to the aluminum extrusions. There are also two smaller holes on the front that are holes for the end switches and the two bigger holes are holes used to hold the housing and the cover together.
Left and Right Pulley Supports (2)
- These components hold the pulley level at the end of the aluminum extrusions. At the top there is a protruding circle with a hole; this is where one of the pulley wheels will be attached with a bolt and nut. The square cut out is where the aluminum extrusion will sit and the holes are where the t slotted screw and nut will go to secure the component. One hole will also be used to secure the support bar.
Support Bar Assembly (3)
- This assembly consists of two components with the purpose of making sure the aluminum extrusions are parallel to the base and are a equal distance apart. It also eliminates any vibration that would occur as the mount moves. This is attached on the outermost edge of the pulley supports as stated in the pulley support section.
Phone Mount Assembly (4)
- This assembly consists of three components: two side supports and one phone holder. The side supports are used attach to the pulley which are clamped down with three bolts and nuts on each side. The supports are attached to the phone holder with six screws to allow the phone to sit in the mount securely. The purpose of this assembly is to have a safe place to hold the phone while the pulley is moving.
End Switch Extension (5)
- This is attached on the side supports of the phone mount. This component ensures that the limit switch gets pressed every time when the mount 'homes' itself.
Snap On Fitting (6)
- This component was used to hold the wires in place and to have a cleaner look. They snap on to the aluminum extrusions and allow the wires to lay flat.
Putting It Together
With all parts of the product made, it is time to finish the assembly.
** Some components (buttons/ stepper motors) might need longer or shorter wire connections. In this case, use the soldering gun and extra wires to extend the length. Also, any exposed pins or metal must be covered with electrical tape.**
- Take a look at the diagram above and assemble the 3D parts to the extrusions using the t slotted nuts and screws. (Don't add the phone mount or motor housings yet)
- Take the housing of the two stepper motors and two limit switches. Look at the figures above as to how to attach the two components.
- Take the two pulley wheels that have two screws in them and attach them to the stepper motors that are already in the housing.
- Attach the stepper motor housing on to the aluminum extrusions.
- Cut two 2 foot strips of the pulley cable. Wrap one strip around the pulley wheels and find a good tension, Note the length of the pulley with that tension. Take one of the pulley clamps and clamp it on the pulley with the specific tension.
- Repeat with the other pulley and add them to the pulley wheels.
- Add the phone mount with the limit switch extensions to the pulley.
- Take your two buttons and feed them through the predrilled holes. When they are in place, use a hot glue gun to fill in the empty space and secure the button. To smooth out the hot glue, it might be helpful to press wax paper over the glue when hot and rub it.
- Carefully place all electrical components into the base and use the last remaining wood screws to screw the last piece of wood into place.
- Optional: Paint the base.
- Attach the 12V battery supply using alligator clamps and upload the code.