my idea was a mobile gimbal that can stabilize my phone, i really like photography and videography, i saw a YouTube video that inspired me to make one
I used fusion 360 to design my project my design was mainly three parts
1) the handle (inside the handle the Arduino, the batteries, and the motor sit)
2) the shaft/motor it's the part that connects the handle with the phone holder and allows the motor to rotate
3) the phone holder (the part that holds my phone
then i projected all the body faces and imported them as dxf, and saved the phone holder and the bearing parts as stl files the
1) first i sketched the front face of the handle
5) then i extruded the side part and combined cut with the front to make gaps for the extended parts of the front parts
2) then i extruded it and made a rectangular pattern to copy the face
6) I uploaded the servo motor to fusion and created a part to hold it in place
8) i sketched the phone holder part with the shaft connected to it that will go through the bearing and connected to the servo
4) then i sketched the side part on the front body
7) i sketched a part to hold the bearing with the side face
10) i created a screw hole connected with the phone holder part to adjust for different phone heights
i couldn't make all of the parts 3D printed because i would have exceeded the limit so some parts were 3D printed (the shaft, bearing holder, phone holder), and some were wood (the handle). i used prusa slicer to slice my stl files and get the gcode, and laserworks to use my dxf files to cut the wood
the input/sensing component is the gyroscope sensor it senses angular rotations and measures the angle of the tilt. the action component is the servo motor it receives the direction and moves to correct for the tilt. the Arduino to connect the input with the output and processes the values of the sensor to output the correct values for the motor, and lithium batteries as the power source
i chose the lithium batteries because i want the gimbal to be portable and rechargeable
my code is simple in principle because but hard in the implementation and it's divided into three parts
1) reading the gyroscope
2) processing those readings and doing calculations and turning the the gyroscope values into angles
3) taking those angles and giving orders to the servo to move in the opposite direction with the same magnitude
first, define the different variables and settings the code was based on the MPU6050 library from the i2cdevlib library by Jeff Rowberg
https://github.com/jrowberg/i2cdevlib
the settings for reading the MPU6050 were included in the library
The setup
First, you initialize the MPU6050 and check for errors before entering the loop attach the three axis servos but I'll only use one (the 9 servo the y axis servo)
The main loop
first, you make sure the MPU6050 is working then you read the error values after that you read the actual data and calculate the angles of rotations from them and input them in the Yaw pitch Roll variables
then you map these angles to the correct angles of the servo and you order the servo to move to them
my instructor worked so hard with me staying up all night multiple times he helped me make the project work from start to finish I will always be grateful to him, he helped me understand the concepts of designing.
designing was the most challenging part to it basically took away all my time because i had to redo my design from scratch three times the first time was because i was afraid that i would exceed my 3D printing quota then I switched my design to a wood model but my second had dimensional errors and wasn't well constrained so it all broke and the third time was when it finally worked, also the arduino nano didn't work on my computer so I had to switch to n arduino uno but it's hardly fitting in my design
i will try to implement the the three axis of rotation and make my design 3D printed and more accurate