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.

Autonomous Boat For Awesome Video Hyperlapses

With the ever-increasing capabilities of smart phones, action cameras, and hand-held gimbals, the battle for the best shots is intensifying daily on platforms like YouTube and Instagram. Hyperlapse sequences are one of the popular weapons in the armoury, and [Daniel Riley] aka [rctestflight] realised that his autonomous boat could be an awesome hyperlapse platform.

This is the third version of his autonomous boat, with version 1 suffering from seaweed assaults and version 2 almost sleeping with the fishes. The new version is a flat bottomed craft was built almost completely from pink insulation foam, making it stable and unsinkable. It uses the same electronics and air boat propulsion as version 2, with addition of a GoPro mounted in smart phone gimbal to film the hyper lapses. It has a tendency to push the bow into the water at full throttle, due to the high mounted motors, but was corrected by adding a foam bulge beneath the bow, at the cost of some efficiency.

Getting the gimbal settings tuned to create hyperlapses without panning jumps turned out to be the most difficult part. On calm water the boat is stable enough to fool the IMU into believing that it’s is not turning, so the gimbal controller uses the motor encoders to keep position, which don’t allow it to absorb all the small heading corrections the boat is constantly making. Things improved after turning off the encoder integration, but it would still occasionally bump against the edges of the dead band inside which the gimbal does not turn with the boat. In the end [Daniel] settled for slowly panning the gimbal to the left, while plotting a path with carefully calculated left turns to keep the boat itself out of the shot. While not perfect, the sequences still beautifully captured the night time scenery of Lake Union, Seattle. Getting it to this level cost many hours of midnight testing, since [Daniel] was doing his best to avoid other boat traffic, and we believe it paid off.

We look forward to his next videos, including an update on his solar plane. Continue reading “Autonomous Boat For Awesome Video Hyperlapses”