Taking Reverse Engineering To The Skies: Cheap Drone Gets PX4 Autopilot

Sometimes bad software is all that is holding good hardware back. [Michael Melchior] wanted to scavenge some motors and propellers for another project, so he bought an inexpensive quadcopter intending to use it for parts. [Michael] was so surprised at the quality of the hardware contained in his $100 drone that he decided to reverse engineer his quadcopter and give the autopilot firmware a serious upgrade.

Upon stripping the drone down, [Michael] found that it came with a flight management unit based on the STM32F405RG, an Inertial Measurement Unit, magnetic compass, barometric pressure sensor, GPS, WiFi radio, camera with tilt, optical flow sensor, and ultrasonic distance sensor, plus batteries and charger! The flight management unit also had unpopulated headers for SWD, and—although the manufacturer’s firmware was protected from reading—write protection hadn’t been enabled, so [Michael] was free to flash his own firmware.

We highly recommend you take a look at [Michael]’s 10 part tour de force of reverse engineering which includes a man-in-the-middle attack with a Raspberry Pi to work out its WiFi communication, porting the open-source autopilot PX4 to the new airframe, and deciphering unknown serial protocols. There are even amusing shenanigans like putting batteries in the oven and freezer to help figure out which registers are used as temperature sensors. He achieves liftoff at the end, and we can’t wait to see what else he’s able to make it do in the future.

Of course, [Michael] is no stranger to hacking imported quadcopters, and if you’re interested in PX4 but want something quieter than a quadcopter, take a look at this autopilot-equipped glider.

Running A Glider With The PX4 Flight Controller

There are a few open source autopilots available these days for quadcopters and fixed wing aircraft. Two of the most popular are ArduPilot and PX4, however neither is officially capable of working with unpowered aircraft. Despite this, [rctestflight] decided to run some experiments to see just how PX4 would fare when controlling a drone-launched shuttle glider.

The glider is a simple design built from foam board, controlled with two elevons, and fitted with a third servo to handle its release from the tow drone. It’s fitted with a Pixracer autopilot module and a Dragonlink telemetry link to the ground control laptop.

Initial testing was unsuccessful, with the drone ignoring return-to-home commands, and only responding to waypoints. After some further experimentation, performance improved. Testing and tweaking is the name of the game, and while the attempt to fly the glider into the back of the trailer failed, overall the project shows promise.

It’s impressive to see the glider tracing out perfect circles on the map under autopilot control. While it’s not officially supported, [rctestflight]’s work shows that it’s possible to run PX4 on a glider and have some success doing it. Future plans involve weather balloons and high altitude work, and we can’t wait to see the results.

PX4 has been used in a wide variety of projects, and can be used with even quite unusual aircraft. Video after the break.

Continue reading “Running A Glider With The PX4 Flight Controller”

Omnicopter catching a ball

A Flying, Fetching, Helping-Hand Omnicopter

Wouldn’t it be nice if you had a flying machine that could maneuver in any direction while rotating around any axis while maintaining both thrust and torque? Attach a robot arm and the machine could position itself anywhere and move objects around as needed. [Dario Brescianini] and [Raffaello D’Andrea] of the Institute for Dynamic Systems and Control at ETH Zurich, have come up with their Omnicopter that does just that using eight rotors in configurations that give it six degrees of freedom. Oh, and it plays fetch, as shown in the first video below.

Omnicopter propeller orientations
Omnicopter propeller orientations

Each propeller is reversible to provide thrust in either direction. Also on the vehicle itself is a PX4FMU Pixhawk flight computer, eight motors and motor controllers, a four-cell 1800 mAh LiPo battery, and communication radios. Radio communication is necessary because the calculations for the position and outer attitude are done on a desktop computer, which then sends the desired force and angular rates to the vehicle. The desktop computer knows the vehicle’s position and orientation because they fly it in the Flying Machine Arena, a large room at ETH Zurich with an infrared motion-capture system.

The result is a bit eerie to watch as if gravity doesn’t apply to the Omnicopter. The flying machine can be just plain playful, as you can see in the first video below where it plays fetch by using an attached net to catch a ball. When returning the ball, it actually rotates the net to dump the ball into the thrower’s hand. But you can see that in the video.

Continue reading “A Flying, Fetching, Helping-Hand Omnicopter”

Ducted Fan Drone Flies

A while back, we wrote about the ducted fan, single rotor, VTOL drone that [Armin Strobel] was working on. It wasn’t quite finished then, and hadn’t got off the ground yet. He’s posted an update, and from the looks of it, he’s made tons of progress, including a first flight with successful take-off and landing.

The successful flight was no coincidence. Tuning any kind of ‘copter is a tricky business. Handling them manually during testing could be outright dangerous. So he built two different test-beds from pieces of wood, some 3D printed parts and bearings. One lets him mount the drone and tune its pitch (and roll), while the other lets him tune the yaw parameters. And just like they do in wind tunnel testing, he fixed short pieces of yarn at various points on the air frame to check for turbulence. Doing this also gave him some insight into how he could improve the 3D printed air-frame in the next iteration. He repeated the tests on the two test beds, going back and forth to make sure the tuning parameters were not interfering with each other. He also modified the landing gear to improve stability during take-off and landing and to prevent tipping. [Armin] is using the PixHawk PX4 for flight control and a BeagleBone Black for higher level functions and control.

Once the first flight showed that the drone could do stable flight, he attached a Go-Pro and recorded some nice video on subsequent flights. The next steps are to fine tune the flight control parameters to ensure stable hovering with position hold and way point following. He may also 3D print an improved air-frame. For details about the build, check out our earlier blog post on the Ducted Fan Drone. Check out the two videos below – one showing the first flight of the Drone, and the other one about the test beds being used for tuning.

Continue reading “Ducted Fan Drone Flies”

Ducted Fan Drone Uses 1 Rotor For VTOL

Multi-rotor fixed-pitch aircraft – quad, hexa, octa copters – are the current flavor of the season with hobby and amateur flight enthusiasts. The serious aero-modeling folks prefer their variable-pitch, single rotor heli’s. Defense and military folks, on the other hand, opt for a fixed wing UAV design that needs a launch mechanism to get airborne. A different approach to flight is the ducted fan, vertical take-off and landing UAV. [Armin Strobel] has been working on just such a design since 2001. However, it wasn’t until recent advances in rapid-prototyping such as 3D printing and availability of small, powerful and cheap flight controllers that allowed him to make some progress. His Ducted Fan VTOL UAV uses just such recent technologies.

Ducted fan designs can use either swivelling tilt rotors that allow the craft to transition from vertical flight to horizontal, or movable control surfaces to control thrust. The advantage is that a single propeller can be used if the model is not too big. This, in turn, allows the use of internal combustion engines which cannot be used in multi-rotor craft (well, they’ve proven difficult to use thus far).

[Armin] started this project in 2001 in a configuration where the centre of gravity is located beneath trust vectoring, giving the advantage of stability. Since there were no hobby autopilots available at the time, it was only equipped with one gyroscope and a mechanical mixer to control the vehicle around the vertical axis. Unfortunately, the craft was destroyed during the first flight, after having managed a short flight, and he stopped further work on it – until now. To start with, he built his own 3D printer – a delta design with a big build volume of 400mm3. 3D printing allowed him to build a structure which already included all the necessary mount points and supports needed to fix servos and other components. The in-fill feature allowed him to make his structure stiff and lightweight too.

Intending to build his own auto-pilot, he experimented with a BeagleBone Black connected to a micro controller to interface with the sensors and actuators. But he wasn’t too happy with initial results, and instead opted to use the PixHawk PX4 auto-pilot system. The UAV is powered by one 3-cell 3500mAh LiPo. The outside diameter of the duct is 30cm (12”), the height is 55cm (22”) and the take-off weight is about 1.2kg (2.6 pound). It has not yet been flown, since he is still waiting for the electronics to arrive, but some bench tests have been conducted with satisfactory results. In the meantime, he is looking to team up with people who share similar interests, so do get in touch with him if this is something up your alley.

If you want to look at other interesting designs, check this UAV that can autonomously transition from quadcopter flight to that of a fixed-wing aircraft or this VTOL airplane / quadcopter mashup.