Turn Any Drone Into a Delivery Droneš¦
by Iloke Alusala in Circuits > Microcontrollers
466 Views, 8 Favorites, 0 Comments
Turn Any Drone Into a Delivery Droneš¦
We're living in a new era where everything is evolving at a rate that humanity has never seen before, and because of this, everyone is chasing the next BIG thing. With companies like Amazon, Zipline, UPS and the like investing heavily on the future of parcel delivery, delivery drones, it makes it seem out of reach for a normal person like you and I to ever get their hands on one š¢.
But, let's say that we change that š”. Today I'll show you how you can turn any drone into a Delivery Drone š¦
Supplies
For this project, the only pre-built thing that you should have on hand is a drone which you have access to it's Flight Controller (FC). The entire build of the drone is outside the scope of this project, but there's so many sources online to build a drone that you won't struggle to find the help that you need. Alternatively you could just buy a droneā ā
Here's a list of what you'll need to build your delivery drone :
Software:
- Ultimaker Cura (or any other slicer)
- Betaflight Configurator
- Fusion 360 (eligible students, educators, and qualifying educational institutions should have free access to it) (optional)
Equipment:
- Access to a 3D printer (if you don't have your own, check with your local library, or college. I used one at a makerspace at my University)
- PLA Filament (any colour is fine, I chose White)
Supplies:
- Soldering Iron
- Soldering Wire
- Wire Strippers
- Electrical Wires (Male - Male)
- Multimeter (One that has a continuity tester on it)
- Precision Screwdriver Set
- Electrical Tape
- Pliers
- Zip-ties
Components:
- Flight Controller (Compatible with betaflight)
- DC Gear Motor
- ESP32 Firebeetle 2
- DC-DC Buck Converter 7-24V to 5V
- ELRS-Nano Receiver (any receiver using an ELRS protocol)
The Idea
The plan of execution for this project can be divided into two main categories:
- Electronics ā How do we communicate with the drone to trigger the drop?
- 3D Design and Printing ā What components can be used to facilitate the drop mechanism?
Now, to build the delivery drone, we need to follow a couple of steps, but the key question is what those steps actually are... But with all problem solving, we just need to ask ourselves a couple of questions that will guide us in the quest to turn our drone into a delivery droneā”ļø.
Electronics
You: "How will the drone know when to drop the package?" š¤š
Me: "Weāll need to tell it when!āļøš¤"
You: "š§āāļø Obviously, dude. But how do we actually do that?"
Me: "Okay, so most standard drone controllers have extra buttons that arenāt used during flightāthey're just lying around, doing nothing right?š”"
You: "Yeah..."
Me: "Why not assign one of those buttons to trigger the package drop?"
You: "Hmm, that's kinda smart! But how do we actually do that? š«”"
Me: (chuckling) "Alright, hereās the gist. The transmitter sends a signal to the receiver about the state of every channel, basically all the switches and buttons on the controller. The receiver then passes this signal to the flight controller, right?"
You: "Mm-hmm š§"
Me: "What if we tap into that signal and decode it? By using a powerful microcontroller, like an ESP32, we can read all the transmitterās channel values. Then, we assign one of the unused channels to trigger the drop. When that button is pressed, the ESP32 sends the command to release the package."
You: "Bingo! I think weāre onto something!"
3D Design and Printing
You: "Okay, but what mechanism should we use to actually drop the package? š¤Ø"
Me: "š«” Good question. We could use a simple string to hold the package, but then weād have to deal with it swinging mid-air... not ideal."
You: "Yeah, itās like weād need a way to 'stick' the package to the drone until the moment it needs to drop."
Me: "Exactly. Weāll need a more stable design. Iāve got a few ideasā¦ š§āāļøšŖ" (stares dramatically into the distance)
Let's continuešāāļøšØ
Setting Up the ESP32
The ESP32 "listens in" on the communication between the receiver and the flight controller (FC) to extract the transmitter's channel values. By decoding the CRSF protocol used by the ELRS receiver, it translates this data into raw channel values. After several late nights of tinkering, I successfully implemented the decoding process.
Hereās how it works: The receiver sends data packets to the FC using its TX port. These packets include the transmitter's channel values. Once the ESP32 receives a packet, it gains access to the same data as the FC. Using this information, the ESP32 can be programmed to activate a motor and release the package when a specific, unused channel is triggered by a button press.
For more technical explanation and more code refer to my GitHub, it has the entire process explained in a lot more detailāØ
Note: In the code below, the designated channel for triggering the package drop is channel 7, as on my controller, it was an auxiliary button that was latent. If you want to use a different channel value, modify it in the code.
Designing the Drop Mechanism With AIš¤
Now, letās dive into the design of the package-dropping components š¦.
Now stick with me here, because this is where things get exciting š§. Designing these components turned out to be both a fun and challenging process, requiring multiple iterations to get just right. The main goal was to create a design thatās easy to assemble, compatible with a wide range of drones, and both robust and practical.
(a few early sketches āļø)
After finalizing a design robust enough to handle multiple drops, we can now take things to the next level by leveraging, wait for itā¦
āØAIāØ
With the help of AI, we can minimize the material required to produce the parts and optimize flight performance by reducing the component weight to an absolute minimum.
Using Fusion 360ās generative design feature š¤, we can tackle the weight optimization challenge efficiently.
After considering all factors, I developed the final drop mechanism, which consists of two parts:
- Droke: The component that attaches to the drone.
- Flatch: The part that drops along with the package.
The Droke
The Flatch
Optimising Using Generative AI
Now, I wouldnāt be surprised š± if youāre wondering how generative AI can create such "organic" š± looking components, or even how to use it in the first place to optimize a design. While a crash course in generative design is beyond the scope of this project, skipping over the optimization process entirely wouldnāt do it justice š.
Below are some diagrams outlining the process:
Original: These are the initial, clunky designs that used significantly more material than necessary while still maintaining the structural integrity of the drone.
GD Study: This marks the beginning of the optimization process. Here, you define three main geometries (or bodies):
- Preserve: The regions that must remain unchanged.
- Obstacle: Areas the AI must avoid.
- Starting Shape: The initial structure that the AI will refine.
Additionally, you specify the forces the optimized structure must withstand to ensure it remains structurally sound.
Final: This is the best design the AI generated after evaluating thousands of variations. It satisfies the criteria while minimizing the material required to produce the component.
The Droke
The Flatch
The Final Design
After all the prototyping and iterations, this is the final design that performed the best āØ.
Let's Print šØļø
Fire up your 3D printer and get ready to print š„šØļø.
Pro Tip š¤«: If you're using a 3D slicer software (like Cura, which I used for this project), enable a setting called "adaptive layer height." This will minimise layer steps on the final print, resulting in a smoother finish.
Once the components are printed, you'll need to remove the supports. If they are too hard to remove by hand, you can use a crafting knife, and a small screwdriver for the supports stuck in tight places. Be patient and careful during this process!
After prototyping and making sure that the models actually worked, I got the parts resin-printed in a cool transparent color scheme, UTR-8100 (Transparent), from Justway. The build quality came out excellentāthe finish was smooth, durable, and highlighted the intricate details of the design. Their resin material had a sleek, futuristic look that took the final presentation to the next level, making the parts feel professional and refined.
To get the exact parts that have the cool transparent look it was a simple process:
- Head over to their website
- Add each of the STL files for the Droke, Latch, and Flatch and use this setup ā¬ļø:
What stood out to me during the ordering process was how user-friendly their website was. I could upload my files quickly, select my preferences, and complete the order seamlessly.
The final transparent parts looked really futuristic and cool, which I liked a lot š¤. The pricing was competitive for high-quality resin prints, and the turnaround time was impressiveāit didnāt take long to receive the finished parts.
Iād highly recommend checking them out if you're looking for a place to get the transparent resin printāØ.
Wiring the Electronics
Now that we understand how the drone operates, letās dive into the exciting partābuilding it! Hereās the wiring diagram for the electronics š”.
Disclaimer: Wiring diagrams for flight controllers (FCs) vary depending on the model. In the diagram below, Iāve highlighted the relevant pads specific to my FC. If youāre using a different FC, you can find its wiring diagram on the manufacturerās website. The same pads should be present, though their locations may differ.
After establishing the connections between the ESP32 and the Buck Converter, you should get something similar to this:
Stacking the Components
Before we start mounting the electronics onto the drone, hereās a key piece of advice: use more electrical tape than you think youāll need. If your drone frame is made of carbon fiber, proper insulation is crucial. Carbon fiber is conductive, and uninsulated connections can cause short circuitsāor worse, damage your components beyond repair.
Now, letās get back to building š·āāļø. The next step depends on the space available on your drone. Many FPV drone frames have a relatively open section at the back, typically reserved for the receiver and the XT60 connector (battery plug).
First: Insulate the frame thoroughly using electrical tape, and then position the Buck Converter on the frame.
Next, secure the Buck Converter to the drone frame using electrical tape
Next, attach the receiver securely to the Buck Converter and the drone frame
Component Placement
After soldering the wires to the flight controller according to the wiring diagram, your setup should resemble the image below.
Next when you flip the drone over, you can position the ESP32 in the same orientation as below, ready for the Droke to be attached.
Connecting Motor and Latch to Droke
Now connect the motor and the latch together in the following orientation:
The connection to the Droke should be a simple process as below ā¬ļø
Droke Placement
Now place the Droke onto the frame, and have the ESP32 neatly tucked into the Droke as in the image on the right.
Also ensure that you secure the Droke to the drone frame using the zip ties. There should be gaps in the frame that you can use to slot the zip ties through.
Slotting in the Flatch
To slot in the Flatch is as simple as shown below:
- Slip the flatch into the rails
- Close the latch
Isn't the simplicity just beautiful... š„¹
Loading the Cargo
Get all your cargo ready š¦. For my test flights, I used a chocolate bar, but you can really attach anything...
You'll need some string to tie it onto the flatch:
You can tie it on like this:
Flight Testing
And we're done. Just like that you've built yourself your own delivery droneš¦.
Final Reflections
At the end of the project, I can only look back and be proud of how it came out. The journey was a long and challenging one and required lots of support from many different people who I do not take for granted.
Whether delivery drones become a reality or not depends on a variety of factors, but I hope they lead to a future that is better for humanity š«. This is a revolutionary concept that, with time, can drastically transform the way in which the world operates. But until then, I hope you enjoy it and use your drone responsibly. I'm merely a guy who liked flying his drone around and thought of a way for it to deliver stuff. So, have funāresponsibly, and I hope you enjoyed this instructable and have fun building your own š.
~Iloke