Building DIY Ballistic Parachute System for your Drone with Arduino

Building DIY Ballistic Parachute System for your Drone with Arduino

duct-taped in place & ready for 15 meter drop-testing of your drone

The purpose of this article is to provide you with a reliable DIY ballistic parachute system for small and particularly medium sized drones, not only of the ‘copter variety, but any kind of UAV. A drone that has malfunctioned or is reaching low battery voltage may not always be able to land safely. The same applies to UAVs that use a fossil fuel instead of electricity. They’re too expensive to lose to accidents, and prized by both enthusiasts and professionals (e.g. for filming) who can now access previously unreachable areas. Have you ever seen a drone crash spectacularly?

Drone parachute system by Drone Rescure System
Drone parachute system by Drone Rescure System

You’ll learn how to protect your hardware with a ballistic parachute system, as well as how to cut power to the entire drone, or just the rotors. The rotors are the main concern, apart from the general smashing caused by Earth’s gravity. Rotors tend to damage something, someone, or just be completely destroyed themselves, especially if they’re still spinning when the drone crashes. You can enable/disable the killswitch on this build at your leisure, so you’re not liable for damage to people or property.

The current version doesn’t give you a battery sensing function, but it can be added fairly simply, with a zener diode, a resistor, and an NPN/PNP transistor pair. It can be added and used in conjunction with the already implemented relay killswitch to detect a rapidly discharging drone battery, a sure sign that a recharge is needed. Sadly, not all drones have this built in, and you can be forced to improvise. The feature will be provided if there’s a popular demand. However, very much on the plus side of things, this build is non-invasive; it has its own power supply, and mounting it on your drone won’t affect your warranty.

duct-taped in place & ready for 15 meter drop-testing of your drone

duct-taped in place & ready for 15 meter drop-testing of your drone

This is for novice through experienced to advanced drone enthusiasts, camera professionals (with a non-unlimited budget), and anyone who relies upon drones. It’s even for farmers who’ve grown fond of inspecting their crops from the comfort of their offices.

If you have a small drone, this won’t be useful to you. However, if you have something with a bit of lift, you can benefit.

Overview

You can build this yourself. If you’re inexperienced, simply work on one thing at a time. The accelerometer of choice is the ADXL345, which features some automagic features, such as double-tap detection, single-tap detection, interrupts, etc. I had no interest in tapping my drone, and since the Arduino will only be making accelerometer readings, interrupts aren’t necessary. The Arduino Nano does the lifting very capably, and we only rely upon the accelerometer for data on the X, Y, and Z axes. When an object is falling, the usual ~1g drops rapidly toward 0g, and if you observe it to be below a certain threshold, say 0.35g, for more than e.g. 75 milliseconds, you can make a good guess about what’s happening: it’s descending rapidly. Knowing this, you can immediately engage a simple mechanism by moving a servo arm away from the lid of a spring-loaded cylinder containing a parachute. The parachute will shoot out and air will rapidly fill it, resulting in a carefree, controlled descent for your drone.

controlled descent for your drone

controlled descent for your drone

I call it the “Deluxe Descent” device. Be aware that this only handles detection of free-fall, and electrically the killswitch and servo arm. While the test servo used is cheap, it’s undesirable. Use one with a metal arm and gears. 3D-printing a cylinder (PLA plastic is good for this) is left as an exercise to the reader, as are mounting the steel spring inside the cylinder and packing the parachute.

Here are some useful resources to help with that:

Table of Contents

1: Components
2: Understanding the circuit
3: Modifying the code & calibrating your build

Components:

Arduino Nano https://www.ebay.co.uk/itm/New-Nano-V3-0-For-Arduino-with-CH340G-5V-16M-compatible-Atmega328P-UK-Seller-/151765624720
ADXL345 accelerometer https://www.ebay.com/p/Triple-Axis-Accelerometer-Adxl345-for-Arduino/1556550596
1N5819 schottky diode https://www.ebay.com/p/50-Pcs-1N5819-5819-Diode-Schottky-1a-40v/1901757916
18650 Li-Ion battery https://www.ebay.com/bhp/panasonic-18650
18650 Li-Ion battery holder  https://www.ebay.com/itm/18650-Single-Li-ion-Battery-Holder-for-use-with-lithium-charge-module-1-x-2-Pcs-/391793518584
TP4056 charge IC with 2.5V LVCO (DW01A) https://www.ebay.com/itm/2pcs-5V-1A-Micro-USB-18650-Lithium-Battery-TP4056-DW01A-Charger-Board-Module-/191850083395
Assorted LEDs, any color https://www.ebay.com/bhp/led-5mm
Assorted pin headers https://www.ebay.com/itm/20pcs-Male-Female-Header-1×40-2-54mm-40-Pin-PCB-Through-Hole-Arduino-and-Pi/223054186518?epid=8021310418&hash=item33ef10c816:g:
QwQAAOSwLmlbQ8SB
Assorted jumper wires https://www.ebay.com/bhp/breadboard-jumper
Breadboard https://www.ebay.com/bhp/breadboard
Assorted resistors https://www.ebay.com/bhp/carbon-resistor-kit
5V relay
https://www.ebay.com/itm/DC-5V-1-Channel-Relay-Module-Optocoupler-Isolation-Control-Board-Dual-Power-/201914359088
Level shifter, 2- or 4-channelhttps://www.ebay.com/bhp/level-shifter
Solid core wirehttps://www.ebay.com/p/10-Color-Solid-24-Gauge-Electrical-Wire-Kit-196ft-Total/1800442740?iid=282068251943
90x70mm PTH boardhttps://www.ebay.com/itm/5Pcs-90x70mm-Prototyping-PCB-Printed-Project-Circuit-Board-Prototype-Breadboard/191818174456?hash=item2ca9410ff8:g:z34AAOSwYlJW16Pw
IRLZ24N N-MOSFEThttps://www.ebay.com/itm/IR-IRLZ24N-TO220-HEXFET-POWER-MOSFET-/401212787779
2N7000 N-MOSFET https://www.ebay.com/p/Fairchild-Semiconductor-2N7000-MOSFET/668314415
SG90 servo https://www.ebay.com/itm/1-5-10pcs-9G-SG90-Mini-Servo-For-RC-Robot-Helicopter-Airplane-Car-Boat/312014819513?hash=item48a58850b9%3Am%3AmfT
gA_gW1iYVBDpmsILFngA
&var=610779606928
~300pF ceramic capacitor (optional)Only use it if you have it

I have used the 36-inch parachute as shown in the picture below, but the size of the parachute needed to slow down the speed enough to prevent the damage to the drone differs for each drones. Please make sure to choose a right parachute for your drone according to the size and the weight of your drone.

parachute for your drone

parachute for your drone

Understanding the Circuit

You’ll find the Deluxe Descent is fairly straightforward: an Arduino that reads an accelerometer, and can engage both a relay and a servo when a set of certain conditions are met.

Power

Using a TP4056 battery IC with over-discharge protection, we output ~3.7V to a small step-up converter, which in turn outputs 5.2V. There’s a small loss, I expect around 10-15%. The maximum input voltage to the Arduino Nano (atmega328p) 5V pin is 5.5V, so this is safe, but we want an even 5V flowing from here. Note that the TP4056 module with DW01A has two sets of output terminals (+/-OUT and BAT+/-), one going to the battery and one going to the step-up converter. This provides low-voltage cut-off at around 2.5V on the battery to prevent damage. You should place a sliding switch (SPST type) between the TP4056 and the step-up converter, and give it some length of wire, so you can attach it to your project box. Wire OUT+ to pin 1 of a switch, and pin 2 to IN+ on the step-up module.

Both battery and step-up modules support ~1A, which is plenty for a relay at ~70mA, a small servo at 100-250mA, and the Arduino itself, which draws 35-40mA. Be careful to add a 1N5819 schottky diode in forward bias between the step-up converter OUT+ pin and the 5V rail you use; this protects against backfeeding if you accidentally connect your USB cable to the Arduino while it’s still connected to the rest of the circuit. Be careful not to do this, as such an error can result in anything from no harm done to a temporarily disabled USB port to all USB ports destroyed. To flash the Arduino while it’s connected to the live circuit, use a USB-TTL (TX to Arduino RX, RX to Arduino TX, GND to Arduino GND, 5V not connected), and press “Reset” just before uploading new firmware. Keep the 5V rail central, and wire it to Arduino 5V and other things (see the diagrams) and similarly find a single central place on the board to use for GND connections.

DIAGRAM_TP4056+SW1+BOOST+DIODE->5V_RAIL->ARDUINO” class=”wp-image-8214″ width=”512″ height=”361″/><figcaption><br></figcaption></figure>



<h2>ADXL345 Accelerometer</h2>



<p>The ADXL345 accelerometer is very versatile, but you don’t want to use interrupts if the Arduino is just using its resources on doing free-fall detection. If you want to include an altimeter in the build, a GPS, and/or a microSD IC for datalogging, then you’ll want to use interrupts. This code also lets you use any accelerometer you want, by simply switching library. Conceptually, it’s only the matter of reliably detecting the free-fall condition and reacting to it. The ADXL345 takes 2-3.6V on VCC, and when using it in I2C mode, you must pull the CS pin HIGH to 3V3 across a 10K ohm resistor. While you can often trust Google in technical matters, you can trust a level-shifter much more, so you should definitely level-shift the SDA and SCL signals to/from the Arduino Nano. Don’t worry; it’s easy, as the level-shifter used here just takes 5V on its HV pin, 3V3 on its 3V3 pin, and beyond that it’s just a matter of wiring up pins A4 (SDA) and A5 (SCL) to HV1 and HV2, respectively. On the other side, connect LV1 to SDA on the ADXL345, and LV2 to SCL. Works like a charm, and who’s to say those pins are as 5V tolerant as some would have you believe? Remember to use 4700-ohm pull-up resistors between both A4 and A5 to 5V on the Arduino itself; omitting this may lead to some tragic changes to your love of tech.<br></p>



<figure class=DIAGRAM_ADXL345_LVLSHIFTER_ARDUINO

Soft Reset

If for some reason you find your Arduino not correctly initializing hardware – intermittently, and not because of incorrect connections – it’s convenient to ask the board to reset itself. Using a small TO-92 package N-FET like the 2N7000 makes it easy. Its pinout is Source-Gate-Drain, and you only need to connect Source to Arduino GND, Gate to Arduino D8 + across a 4700-ohm pull-down resistor to Arduino GND, and finally Drain to Arduino RST pin.

Arduino soft reset

Relay & Servo

If you’re an experienced drone operator, you know that a drone that doesn’t land correctly, and with its rotors still spinning, is a runaway blender. It’ll cut and chop, damaging itself, people, and property. While the killswitch is far from mandatory, it’s useful. Cut the positive lead going to the rotors (possibly four or more leads, but that’s irrelevant), and connect it to COM (short for COMMON GROUND) on the relay. Then, connect N-C (Normal-Closed) to the rotor power line again. The N-C path in the relay is always closed, i.e. conducting, except when 5V is applied to the relay, which switches it to conduct along the N-O (Normal-Open) path. This cut-off ensures that rotors have some time to spin down and deliver only a small kinetic effect to any objects they touch, even with a fully deployed parachute and DELUXE DESCENT. Connect the Arduino 5V pin to the positive terminal on the relay. You decide which is positive yourself, and whichever you decide, its opposite is the negative one. In the diagram, it’s the left terminal. Connect the negative terminal to the drain of a 2N7000 N-FET, and connect the source of the 2N7000 to GND. On the gate of the 2N7000, connect D7, but also wire a 4700-ohm pull-down resistor to ground.

You may be puzzled by the 300pF ceramic capacitor that sits in parallel with a 1N5819 schottky diode, across the terminals of the relay (the killswitch). Why is it there? It helps subdue smaller spikes resulting from energizing the relay coil, so we don’t suddenly have an Arduino that gets temperamental and intermittently resets. The diode catches the rise in voltage from the collapsing magnetic field of the relay coil, but before it can catch the rising spike, the capacitor is in place to subjugate it.

The servo is also shown in the diagram below. For a portable build, every mAh counts, so we use a MOSFET to engage/disengage power when relevant. My SG90 test servo drew ~10mA of current when idle, but this will vary with different servos. The servoPwrPin in the code controls the MOSFET, and servoPin refers to the PWM signal pin (it must be one of 3, 5, 6, 9, 10, or 11). The IRLZ24N is beefy enough to handle every 5V servo imaginable, and will likely never need a heatsink.

diagram relay

Modifying the Code and Calibrating Your Build

Read the comments, and look at the example programs for the included ADXL345 library. You should probably start with modifying freeFallThreshold, freeFallDuration, and doing drop-tests. A drop-test involves a breadboard, a battery, some components, and lots of electrical tape and bubble-wrap. If you make sure the wires are stuck in the breadboard snugly, you can drop-test from 5 meters and no harm will come to your hardware.

You can monitor the readings on the X, Y, and Z axes at any time. Simply connect with your USB cable in the Arduino IDE, and use the Serial Monitor (Ctrl+Shift+M) to send a single character to your Arduino. It’ll reply with this data and a few useful bits such as the amount of free SRAM in bytes. This is particularly helpful when calibrating your build. However, the USB cable will force a reset when connecting; if you use a USB-TTL cable, connect only the RX pin to Arduino TX, and the TX pin to Arduino RX, and GND to Arduino GND. After a drop-test, you can recover the last X, Y, Z axes readings of your running DELUXE DESCENT, and know what the accelerometer was seeing before it deployed anti-gravity countermeasures. Remember to connect a 5mm LED to Arduino D13 in series with a 220-ohm resistor to GND, and use flipLED() or just digitalWrite (13, HIGH/LOW) to blink at certain parts in the code; you can’t always have a serial connection available for debugging.

The FREE-FALL block in the loop() function is the next step when you wish to adjust what’s done in a free-fall situation. Here, you can flip levers and turn knobs to your heart’s content. There’s room for much more expansion on the Deluxe Descent – a data-logging functionality with altitude and acceleration to microSD card, and of course GPS – all this would be very nice. The Arduino Nano itself isn’t beefy enough to become a complete flight-controller, but the Raspberry Pi Zero is.

Keep your drone safe!