Greetings Makers,
We've reached the culmination of our project journey. For this final endeavor, I'll be crafting a compact motorized head tailored for seamless attachment to a camera tripod. This innovative device boasts Bluetooth connectivity, enabling effortless control via a mobile device. With this setup, users can finely adjust orientation both horizontally (left/right) and vertically (up/down) with precision.
After doing some research I got the inspiration from these projects ( 1, 2, 3 )
So, in this phase, I'll be utilizing the Arduino Nano as our controller, and I'll be mapping out the wiring using Fritzing for simulation. Additionally, I'll be crafting a sleek enclosure using digital fabrication tools. Fusion 360 will aid in designing both the 3D and 2D aspects, while Cura will handle the slicing of 3D components. Laser-cutting techniques will be employed for the fabrication of 2D parts.
Furthermore, I'll be leveraging 3D printing and laser-cutting machinery to bring our design to fruition. Let's make this final project a standout success!
Also, I'm going to use the following software, hardware, materials 👇🏽
Fusion 360 for 3D & 2D designs
Laser works for preparing laser cutting
Cura for slicing and preparing 3D printing
Fritzing for wiring simulation
Arduino IDE for coding and uploading code to Arduino
Prusa i3 MK3 for printing 3D parts
El Malki laser cutter for cutting parts
PLA filament for 3D parts
3mm plywood sheets for the 2D parts
The Electronics and Coding part
For the electronics part, I will use the following components
2 pieces of Stepper Motor " NEMA 17 " " the action part "
2 pieces of Stepper Motor Driver (A4988)
2 pieces of Stepper Motor Drive Module Expansion Board
2 pieces of RGB LED
1 piece of Bluetooth Module [HC-05] " the sensing part "
1 piece of Arduino Nano our Main development board
1 piece of Breadboard
Male to-Male & Male to Female Jumpers
2 pieces of 220 Ohm resistor
The first thing we going to test is the Bluetooth module, which will be used to communicate wirelessly with mobile, it has 6 pins and we will use 5 pins this time
RX, for receiving data and will be connected with Arduino TX pin
TX, for sending data and will be connected with Arduino RX pin
GND, will be connected with ( - )
VCC, will be connected with ( + )
State, this pin according to the datasheet is HIGH when Bluetooth is connected and LOW if not connected, So I'll connect it to Blue LED to indicate if the device is connected or not
The second part we will test is the stepper motor, we will use the NEMA17 stepper motor as an action parts.
To control this motor with Arduino we need to use a motor driver called " Stepper Motor Driver (A4988) " and a shield called " Stepper Motor Drive Module Expansion Board " to connect the stepper with our controller " Arduino NANO "
In this step, we are going to learn how to connect the stepper motor parts and driver
First, Install the driver over the expansion board, as you can see from the picture the installation direction
Secondly, plugin the stepper motor plug into the " stepper motor plugin "
Thirdly, connect the power to the expansion board :
5V, to the Arduino 5V pin
GND, to the Arduino ground
9V, and it will connected to an external power supply with 12V to supply convenient power to the driver and stepper, according to the driver datasheet it can handle up to 35V
GND, the second ground will connected to the outsourced power supply
Fourthly, the data connections
S, means the motor steps pin and it will be connected to Arduino pin 3 for the first motor, and Arduino pin 5 for the second motor.
D, means the motor direction pin and it will be connected to Arduino pin 4 for the first motor, and Arduino pin 6 for the second motor.
Lastly, the micro steps selection switches
It has 3 switches to divide steps.
as you can see from the schedule these switches can divide each step up into 16 part
Set all switches to HIGH to get the smallest steps, it makes the motor move smoothly.
Let's Begin wiring 🤯🤖☠️
Wire the component with Arduino as shown picture 👆🏽
The first stepper motor driver ( steps to pin 3, direction to pin 4 )
The 5V to Arduino 5V pin, and the GND to Arduino GND
The 9V to the 12V power source, and the GND to the external power source GND
The second stepper motor driver ( steps to pin 5, direction to pin 6 )
The 5V to Arduino 5V pin, and the GND to Arduino GND
The 9V to the 12V power source, and the GND to the external power source GND
🛟in this wiring simulation the motor driver has only 12V pin only, but the real one has 12V and 5V pins that we will use.
🛟The stepper motor needs 12 Volt to work properly according to its datasheet.
The Bluetooth module will connected as described previously 👆🏽
The first RGB LED connects the Blue pin to the Bluetooth state pin and the ground to the Arduino GND pin with 220 Ohm resistor to indicate with blue when the Bluetooth is connected to the mobile
The second RGB LED, will indicate with Red when power is connected to the device, connect the red pin to Arduino pin 7 and the ground with Arduino GND with 220 Ohm resistor.
Finally the Arduino power, according to the datasheet the Arduino nano can accept up to 15-volt voltage, So I'll use the power source " 12V - 2A " to power the Arduino and the stepper motors at the same time.
connect the 12V to the Arduino Vin pin
The ground to the Arduino GND
🧭You can find here the wiring simulation on fritzing, as the extra components that you can't find on fritzing " the power supply & Stepper motor driver " 👇🏽
Testing and merging the code
For the Bluetooth module, we only need to connect it according to the datasheet and use the Serial.read command
then install the mobile App from the Google Play Store "Arduino Bluetooth Control " to send commands to the board " our user interface "
Now let's customize the Arduino Bluetooth Control mobile app that we downloaded before.
open the app and press connect
as you can see the device is not connected, so choose the Bluetooth module name
you should see it connected as a picture
choose arrow keys
press setting to configure buttons
check the buttons' sensitivity to make a continuous move when pressing them, and configure keys.
edit the 4 arrow buttons
set the UP button to send 1 to Arduino, the Down button to send 2 to Arduino, the Right button to send 3 to Arduino, and the Left button to send 4 to Arduino
First, Install the library ( stepper by Arduino ), then you can insert it in your code by the command #include <Stepper.h>
next integer the suitable steps and speed you need ( 100 steps is perfect in this project especially I will divide steps to 16, also 100 as motor speed is perfect )👌🏽.
to do that we need to integer the steps and speed with the following command as seen in the code 👆🏽
( int stepsPerRevolution = 100 ) & ( int motSpeed = 100 )
Then define the Base stepper as " myStepperb " and side stepper as " mySteppers " the define the steps and direction pin with the same arrange, the commands for that will be like this
Stepper myStepperb(stepsPerRevolution, 3, 4)
Stepper mySteppers(stepsPerRevolution, 5, 6)
at the void setup set the speeds for the base and the side motors as you can see at the code 👆🏽
Now let's go to the second part of the code.
In this part, we are going to create a loop that moves every stepper motor in two directions
the base stepper motor will move right and left
the side stepper motor will move up and down
So, I'll set the stepper to move the steps that I set before the " 100 steps " with this command ( myStepperb.step(stepsPerRevolution) ) as you can see, I have to write the stepper name first that I integers before " myStepperb or mySteppers ".
and if we need to make it move in the opposite direction we will enter the steps in a negative value as this command ( myStepperb.step(-stepsPerRevolution) ).
and this will apply on the side motor too as you can see at the code 👆🏽
Now let's merge the stepper code and the Bluetooth code
in this step we are going to define a character for incoming data and we will set it to 0 to receive data with the following command ( char incomingData = '0' )
Then define the serial monitor at the void setup with this command ( Serial.begin(9600) )
After that at the void loop we will insert while command to start reading from the serial monitor.
and we will read the serial data that we will enter or receive from the Bluetooth with the following commands
while (Serial.available() == 0)
incomingData = Serial.read()
Lastly, we are going to add an if condition to set a specific move for each entry.
Finally, add the power red LED to indicate when it is ready with the following commands to set the pin as an output and write high when it on
pinMode(7, OUTPUT)
digitalWrite(7, HIGH)
you can find the full code here 👇🏽
The Enclosure " 2D & 3D Parts "
Before starting the CAD designs I sketched it on paper to imagine what it looked like.
and figured out how to put the actual components in the encloser
As I did before at the project proposal
sketching
cardboard model
but this time I will design the actual size and features.
follow me in the next steps to design the enclosure using Fusion 360
🚨Always remember Rule one " Create a new component for every object you designed to make it easy to control and assemblies "
As for the measurement of parts, I sketched the base to be 16x9 cm, but I had to count the sides when I used the T-slots for jointing parts.
so the design will be 170x100 mm
After finishing the sketch, and slots, extrude or press "E" the design with a 3 mm high " plywood thickness"
Create the first side " the front side " for the same base length 170 mm and height of 45 mm without slots
Extrude it for 3mm, then copy the component and past it as new to create the back side 👉🏽
Create the right side with the same base width of 100 mm and height of 45 mm without the slots
use the projection feature by pressing "P" from sketching to build fitted slots then extrude it to 3mm
copy this side component then past it as new, then joint the part from the joint feature or press " J "
Now, let's insert the main components to test the size fitting and project the screw positions, I inserted the half breadboard, Arduino Nano, Bluetooth, and the stepper motor from the Grabcad library website, and filter files as " STEP " files that are compatible with Fusion 360
After that, sketch the top cover for the enclosure, it should be a bigger size to contain slots from all sides
Use the projection feature to draw the slots, motor screws, and motor coupler
Perfectly fitted on the top of the enclosure
now we need to add a fillet to the edge of the cover
press "F" to activate fillet function
click on each edge
set the fillet to 10mm to get this shape
In this step, we are going to figure out the coupler that we will use with the stepper motor to hold the horizontal base.
I will build a 3D coupler as shown in sizes and has 3 holes 3 mm to hold the base with 3M nais and nuts
change the appearance by pressing "A" key
give the wood look to the box
and white plastic to the 3D parts
Now it's time to build the base that will be attached to the base motor to rotate right and left
I will build the base size 120 x 45 mm, Then project the holes for 3M screws from the coupler
to make it handle the side stepper motor and the camera weight, it should be 6mm plywood, But I had only 3mm.
So, from now I will duplicate the sheets for the base and side motor as you can see in the picture
Now, add the vertical part of the base motor with a size 90 x 45 mm with duple sheets 3mm each
This side will carry the side motor, So I'll project on it from the side motor, and add the same coupler that I added to the base motor
the second part that will be attached to the side motor
Horizontal part size 75 x 45 mm
Vertical part size 40 X 45 mm
to hold both sides I'll use two captive nut brackets
the captive nut bracket size will be 90 degrees and 10 x 10 mm
The next step, adding some components from the Grabcad library
2 LED metal cover, the circle size is 6mm
the DC power connector, the circle size is 6mm too
the rectangle toggle switch, the rectangle size is 18 x 11 mm
finally, the 2 LEDs 5mm in size, will added to the cover
the final piece is the camera mount, its size will be 45 x 45 mm and 6mm height and place for a 6M screw head 10mm hexagon shape and 4mm height
and the top side, where the screw body will appear with a circular size of 6mm and place for 3M screw head 6mm and 2mm height
and finally here is the design shape after adding the last piece
Finally, let's see the whole design stages in this video
and you can download the design file from here 👇🏽
Let's render the design to see the final look before the fabrication 🌟
The fabrication and assembling
In this part, we are going to prepare parts for fabrication " 3D printing and laser cutting ", export parts to DXF files for laser cutting and STL files for 3D printing, and after that use fabrication software to produce the parts, and lastly assemble parts and embed the electronics part
3D parts
2 motors coupler, 2 captive nut brackets, 1 bracket, and camera base
Right-click on every component you want to export and click save as mesh, choose the format " STL Binary ", repeat at all 3D parts, and save as STL files
Open Cura software, and make sure that you choose the Prusa i3 MK3 printer, then open all STL files to be shown on the printer bed
from the left toolbar, you can select and rotate each part to make sure that it is on the right side to reduce support and get the best printing accuracy
set the resolution to 0.2mm, reduce the density to 20%, and in this part, we don't need any support or adhesion, so I removed it
after slicing it will take 1Hr and 47 Min, and 17 gm of filament, I'll print it with 1.75 mm gray PLA filaments
The perfect temperature for the PLA filaments is 60 degrees for the bed and 215 degrees for the nozzle
At last, All parts Are ready to join the prototype 🤓
2D parts
The enclosure part, the two motors mounts horizontal and vertical
To export the parts that will be cut on the laser cutter we will use DXF for laser extension, after installing it, from the Create menu, choose dxf for laser cutting
Then choose the part you want to save as a dxf file, at the laser kerf enter -0.15 mm, then click ok to save, and repeat this step for each part and you can find all files down here 👇🏽
Now, Open Laserwork software and insert all DXF files
rotate objects to get the best fit for the parts
add the instruction text that will be engraved on each part
set the cutting parameter speed = 30 and power = 50
set the scanning parameter speed =330 and power= 20
Assembling Parts
assembling the fabricated parts and embedding the electronics parts on it
As you can see from the pictures my journey with assembling parts
I used 3M screws and nuts to assemble wooden or 3D parts, even jointing stepper motors with plywood
I faced Challenges with jointing the couplers but some heating from the hot air solder solved the problem also it helped to insert the 6mm screw in the camera plate
also I isolate the stepper motor that will be inside the enclosure with paper adhesion to prevent any circuit shortage with the motor's drivers.
to see more pictures and how it works, go to showcase 👇🏽
When I finished assembling, I turned on the power, but it did not work 😵, So I opened the case again and started troubleshooting the power source and connection by the AVO meter, until I found that the pin which connected to the power supply to the breadboard was broken, I replaced it and the device works perfectly 👌🏽
If I have a chance to enhance the prototype, I will use a smaller and lighter stepper motor to replace this one.
There is some tilt in the horizontal plane because of the side stepper motor weight.
I think this one would do the mission perfectly 😉.