Description
Final Report:
Building a Drone from Scratch
F21-CPSC-65000-001
Taten Knight
Background
For this project, I chose to pursue building a drone from the ground up. The following are the general goals for the drone, with stretch goals marked with a ‘*’ and very unlikely goals marked with ‘**’. The drone ought to be able to:
• Hover in place
• Have its movement controlled via Wi-Fi
• Avoid obstacles
• Navigate a living space autonomously*
• Create a 3D map of the living space via photogrammetry**
• Localize common objects in the 3D space via object detection and photogrammetry**
• Grab small objects and bring them to the pilot**
I chose to work on a drone because it seemed fun, and I saw an opportunity to use past knowledge from mechanical engineering and control systems courses and apply them here.
Materials
Some of these materials were bought specifically for the drone, while others were on hand from other projects.
• 80A Electronic Speed Controllers (4)
• Male and Female Bullet Connectors (50)
• 5S Lipo Battery (2)
• Lipo Balance Charger (1)
• 1 Male to 2 Female Lipo Battery Connector (2)
• MakerBeam Starter Kit (1)
• Infrared Proximity Distance Sensor (9)
• ESP32 Board (1)
• Male DC Power Connector to 9V Battery (3)
• MPU6050 (1)
• XING 2806.5 180 KV Brushless Motor (4)
• 7” 3 Blade Propellors (8)
• Servo Motors (4)
• GoPro Camera (1)
• Micro SD Card (1)
• Breadboard
• Wires
• 3D Printer
Methods and Technology
The ESP32 can run Micropython, which is a lightweight bare metal implementation of the Python programming language for microcontrollers. It provides access to the features of the board through use of specialized libraries. I chose to use this route because I am familiar with Python, and implementing a control scheme in this environment was simpler for me, versus using the Arduino environment and working with Java constructs. There was no overall design going into this, and my main focus was only to purchase parts that I believed would be essential to a drone flying successfully.
There are drone flight control boards that are built specifically for the control of a quad-copter drone, but there were two issues with this. One, I would like to build a drone with only two propellors, and two, a flight control board does all of the heavy lifting for the control systems, and I would like to design my own. This is why I chose an ESP32 board alongside an MPU6050 instead.
For control of the drone, the ESP32 and my desktop initialize a client-server socket connection on startup, with the client being the desktop and the ESP32 acting as a server. I wrote a very simple json object parsing scheme that allows me to type commands into the keyboard and change to speed of the propellors and the orientation of the servo motors. This will need to be updated in the future to allow for simpler controls, and to fit into a more formal control scheme.
The layout of the drone is simple. There is a lipo battery connected to two ESCs, which are in turn connected to the two propellors. The propellors are mounted on the servo motors via 3D printed brackets, and there is a shroud around the props to avoid injury. The servos and the ESCs are controlled via the ESP32. The MPU6050 is also connected to the ESP32, and streams orientation data to the desktop. There are three power sources for the project. The lipo battery for the motors, and two separate 9V battery sources. One powers the servos and the other powers the MPU6050 and the ESP32. This is because when the servos are moving, the power draw is too high and the ESP32 resets if on the same power source.
The frame of the drone is built with a combination of MakerSpace beams and 3D printed objects. The beams form a simple rectangular frame that other components can be easily bolted to. The 3D printed pieces include a bucket that forms the base of the drone and holds the ESCs, lipo battery, and 9V battery, another piece that holds the breadboard, shrouds for the drone propellors, and the aforementioned bracket that connects the brushless motors to the servos. The current state of the drone can be seen in Figure 1.
Figure 1. Current State of Drone (Disconnected)
Progress
I created an issue by buying two motors that spin the same way for the drone, that issue being that the torque from the motors causes the entire drone to spin – the motors spin counterclockwise and the drone spins clockwise. Initial testing has been dedicated to solving this problem by using the thrust from the propellors at an angle to prevent spin. There was another accident wherein the drone propellor got caught on some fabric and wiring and destroyed itself, and caused another delay while waiting for the 3D printing of new parts, namely a new servo to motor bracket, and shroud for personal protection and safety.
Future Work
Conclusion
Although I didn’t get as far as I would have liked to, I do believe that the drone is in a good place to pursue future goals moving forward. The biggest challenges thus far have been safety, as drone motors spin ridiculously quickly and I would prefer to keep my eyes/hands intact. With the creation of the propellor shroud I believe that it will be easier to iterate on control improvements. I will continue to pursue the completion of this project outside of this course, because I find it interesting, and the outcome to be extremely rewarding.
Notes




Reviews
There are no reviews yet.