Automatic Retracts For Your Drone

Introduction

Do you own a drone with a camera?  Have you ever taken footage with your camera that would look perfect, if only your landing gear were not in the frame.
Sample of landing gear in camera view

The solution; add retractable landing gear.  In this blog post I am going to show you how to set up a set of retractable landing gear.  Not only that, we are going to automate it's operation.

The Retracts

There are many different types of servoless retracts that you can buy.  You can buy the bare retract modules, the type with wheels for an RC plane or the type that I used with carbon fiber legs like this.
Drone retractable landing gearI bought this set off of ebay for the reasonable price of $32.29 US dollars.  The kit did come in pieces, so I did have to put them together once I got them, but it was pretty straight forward and easy.  once I got them assembled I had to find a way to attach them to my drone.  The drone I am attaching them to is a hexacopter with a 27.5 inch (707.39 mm) arm span from tip to tip of one of the long arms.  
Drone without retractsPart of my issue was that the side arms of the copter were swept slightly forward.  If I was just to mount the retracts perpendicular to the side arms, the gear, when in the downward position would be pigeon toed in toward the front.  Because of this, I wanted a mount that would keep the legs parallel when in the down position.  For this I used some creative 3D modeling and created this.
Retract mount CAD viewThis allowed me to keep the 15 or so degree sweep and have the legs parallel to each other.  Plus it fit around the square tubing used for the arm giving it a solid surface to mount to.  If there is interest in this retract mount I will post it on thingiverse.  Just send me an email and I will post it.  Here is a pic of the drone with the retracts mounted.
Drone with retracts mounted
You will notice that the base of the legs have foam on them.  I just used standard 1/2 inch pipe insulating foam that you can buy at your local hardware store.

The Automation

So now I have this set of retractable landing gear set up on the drone, how am I going to make them work?  I could do the old practice of setting them up to be controlled by a switch on my remote, but where is the fun in that.  Then I'd have to remember to flip the switch when I got in the air and flip it back when I wanted to land.  I found a video on youtube of a guy that built a cheap retract control using an arduino nano.  I thought that I would give it a go.  The only problem was that I didn't have a nano in my stockpile of parts, and the firmware that he had for it was specific to the nano and he didn't release the source code for me to compile it for a different module.  I had a couple pro micro boards in my parts bin, so I worked with that. 

The board is built using a BMP180 barometric pressure sensor which is used for measuring altitude.  Retract control board The board is then configured to retract the landing gear automatically when the drone reaches a set altitude, and then extends automatically when it is below that set altitude.  Being that the guy in the youtube video had not released the firmware source code for his unit, I took to the keyboard and wrote my own.  I have the source code posed on github for anyone interested.  The firmware can be configured with any terminal windo that can connect to a serial device such as the terminal in Mission Planner.  With the firmware loaded and in a terminal window just type "menu" to see a list of the options available.  When settings are changed, they are automatically saved and will be loaded on future restarts of the drone. 

The drone should be sitting on the ground or surface that you are going to launch from when powered on.  Once powered on, the firmware reads the current altitude and sets that as it's baseline measurement for determining when to retract and extend.  The default height for the firmware is 72 inches, or 6 feet.  Once the drone reaches the set height, the legs should automatically retract.  When the drone goes below the set height, the legs should extend down in preparation for landing.  The height that you set should take into account the normal rate of descent and the amount of time that it takes for your landing gear to fully extend.  A slower descent will allow you to set the retraction height lower.  One way to help prevent a hard landing when the legs aren't fully extended is to add a downward facing sonar module set up to slow the descent when close to the ground.

Conclusion

I hope you found this post interesting.  If you have any questions or comments, post them here or send me an email.  Happy flying.

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress spam blocked by CleanTalk.