Michael Delaney, a student at Avenues in NYC, writes about his iterative process of integrating electronics and 3D printing in his programmable quadcopter project.
Creating and refining a design through testing is an inherent aspect of making. Over the past several years, the tools and resources that facilitate this process have become readily available, through resources like the internet and digital fabrication. These technologies present a revolutionary method of design and manufacturing, giving rise to incredible new inventions. As a 17-year-old maker and a budding engineer, these developments excite me greatly. Over the course of the last few months, I have been designing and building a programmable quadcopter in an attempt to learn more about systems like PID controllers, I2C communication, and radio transmission.
Throughout this process, I’ve faced repeated challenges with the quadcopter development. While most were trivial, some forced me to reconsider the project as a whole. Using the tools available to me, I have been able to create real solutions for issues, such as measuring the quadcopter’s position and tuning the flight control algorithm. In the end, regardless of the design, the ability to solve these common issues – inherent to any project – will come to define its eventual success.
Today, hobbyists and amateur designers, like myself, can create designs on a computer and turn their most complicated designs into a manufactured product. This is facilitated through revolutionary new services and technologies, from rapid prototyping tools like CNC machines and 3D printers, to professional manufacturing services available through the internet. It was through this widespread accessibility to professional tools that I was able to have my custom-designed quadcopter circuit board (or PCB) fabricated in China for only a few dollars.
Tools in the design process
This project began with lots of ideation and testing of the overall quadcopter design layout. As I planned on doing the majority of the flight controller development at school, I needed a format that was simple, portable, and safe to test in an indoor environment around other students and teachers. These factors restricted the design to a small, light-weight quadcopter that could sustain flight with relatively low-power motors. This design decision helped to ensure the safety of others around me, in addition to reducing the number of self-inflicted scars from the “attack-quadcopter” that emerged as a result of my limited programming experience.
Ultimately, this design helped to reduce the dangers posed by the quadcopter, yet, in testing the basic functionality of the device, a number of issues were discovered that resulted due to the small format. By looking at measurements of the quadcopter’s position with the motors on and off, it became apparent that vibrations produced by the motors prevented the device from accurately measuring its environment. The inaccuracy of these measurements prevented the flight control algorithm (or, more specifically, the PID controller) from making proper adjustments to the flight of the quadcopter.
Solving this issue proved to be a much greater challenge than diagnosing it as the noise from the motors could not be attributed to a single source. This meant that the entire circuit board would have to be isolated from the motors in order to reduce the impact of vibrations on the measurement sensor.
I tested a number of different methods of insulating the motors from the circuit board. My first attempt was based on a simple 3D printed frame that separated the motors from the circuit board. This design also incorporated a layer of rubber as a barrier between the frame and PCB to further reduce the effect of the remaining vibrations.
This first prototype was a significant step forward on the path to making a usable product, and while it greatly helped to mitigate the measured vibrations, the additional weight added by the frame ultimately prevented the quadcopter from lifting off the ground.
Dissatisfied with the outcome of the first prototype frame, I began to reconsider the best approach to making this quadcopter function. I went back to the drawing board, starting from scratch with a new circuit board and frame. Given the challenges with the previous design, the new circuit board incorporated both larger motors and propellers to achieve as much thrust as possible. After a couple of iterations, I ultimately settled on a frame design that mounted the top of the PCB. This helped to protect the sensitive electronics and gave the appearance of a finished product while simultaneously reducing the influence of vibrations on the measurement sensor.
3D printing is a remarkable technology, but one still in the infancy of its development and not without limitations. This method of manufacturing offers many advantages for makers and hobbyists in terms of the rapid production and testing of small parts and models. That being said, in this revised frame design, the large unsupported cavities, or overhangs, on the underside of the model presented several challenges during production. While printing, the heated plastic would sag under its own weight into these cavities for the circuit board, preventing the circuit board from properly fitting into the frame. In the future I intend to take advantage of techniques like using dissolvable support material to aid in fabrication when confronted with similar issues. However, in order to combat this now, I decided to embed the physical PCB into the part during the printing process to act as a type of support while the overhangs were printed. This helped to prevent any serious issues with fitting the circuit board and also ensured proper alignment, but some post-production clean up was still necessary after printing.
Using this new frame design in combination with a digital low pass filter, the quadcopter proved to be capable of dampening most of the disturbances affecting the measurement sensor. This achievement made it possible to move forward to the testing and tuning phase of the development process.
Tools in testing
Having finished the bare bones programming and solved all of the (known) bugs and issues related to the code, I moved on to the next phase of development – testing.
The quadcopter uses information from the sensors and pilot to calculate how fast to spin the motors in order to move to the desired position. This process is handled by an algorithm known as a PID controller – a simple program that determines how to get the quadcopter where it wants to be. The program itself is managed by a set of predetermined values that influence the individual motor speeds. These numbers can be found through laborious testing, but figuring out where to start can be fairly daunting. After hundreds of tests and no significant improvement, I had begun to think that this project wouldn’t become anything more than a fancy paperweight.
A substantial portion of this challenge was due to the fact that I had no relevant data to analyze from the flight of the quadcopter. Having neglected to include any memory for storing information onboard the quadcopter, data could only be acquired through a direct connection over USB, which could not be used in-flight without affecting the flight of the quadcopter.
This caused me to wonder, how might I control and analyze the movement of the quadcopter without it flying away and crashing into the wall?
This question led to the creation of a “PID test jig” – a contraption designed to hold the device in a fixed location, while still allowing it to move freely. Such a design allows for free rotation in all axes without the device physically moving position, making it easier to adjust the quadcopter flight parameters in addition to reducing the number of broken quadcopters that ended up in my electronics graveyard.
This test jig was manufactured and assembled using both 3D printing and laser cutting tools, in addition to a few mechanical parts such as bearings and screws to hold it together. The premise of the design has the quadcopter mounted to an enclosing frame along one axis, joined by a set of bearings, which allow the device to rotate on the corresponding axis. This contraption holding the quadcopter is itself attached to a stand using another set of bearings on the other axis, allowing for rotation in both the X and Y axis. The entire jig can expand and contract using a set of brackets in order to compensate for any variation in the size of the quadcopters being tested. This functionality, as described above, can be seen in the animation below.
This additional tool has helped tremendously in making improvements to my flight controller program, allowing for more accurate testing and less time spent rebuilding broken quads.
Throughout this process, there have been countless times where I wondered whether the project would ever function. Since the first prototypes, I have worked to further develop both the hardware and software of the quadcopter and continued to make changes and seek out new tools and techniques to improve my work as technology evolves.
If you are interested in learning more about this project, check out the full write-up on my website for further details and explanation of the design process.