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.

LED Hack Teaches DJI Mini 2 Drone New Tricks

Despite its diminutive proportions, the thrust to weight ratio of the DJI Mini 2 is high enough that it can carry a considerable amount of baggage. So it’s no surprise that there’s a cottage industry of remotely controlled payload releases that can be bolted onto the bottom of this popular quadcopter. But [tterev3] wanted something that would integrate better with DJI’s software instead of relying on a separate transmitter.

As explained in the video below, his solution was to tap into the signals that control the RGB LED on the front of the drone. Since the user can change the color of the LED at any time with the official DJI smartphone application, decoding this signal to determine which color had been selected is like adding several new channels to the transmitter. In this case [tterev3] just needed to decode a single color to use as a “drop” signal, but it’s not hard to imagine how this concept could be expanded to trigger several different actions with a few more lines of code.

Examining the LED control signal.

[tterev3] wrote some software to decode the 48 bits of data being sent to the LED with a PIC18F26K40 microcontroller, which in turn uses an L9110H H-Bridge to control a tiny gear motor. To get feedback, he’s using a small magnet glued to the release arm and a Hall-effect sensor.

Concerned about how much power he could realistically pull from a connection that was intended for an LED, he gave the release its own battery that is slowly charged while the drone is running. You could argue that since the motor only needs to fire up once to drop the payload, [tterev3] probably could have gotten away with not recharging it at all during the flight. But as with the ability to decode additional color signals, the techniques being demonstrated here hold a lot of promise for future development.

Folks have been strapping additional hardware to commercial quadcopters for years, but modifications like this one that actually let the craft release its payload and fly away hold particular promise for environmental monitoring and building mesh communication networks.

Continue reading “LED Hack Teaches DJI Mini 2 Drone New Tricks”

The Wright Stuff: First Powered Flight On Mars Is A Success

When you stop to think about the history of flight, it really is amazing that the first successful flight the Wright brothers made on a North Carolina beach to Neil Armstrong’s first steps on the Moon spanned a mere 66 years. That we were able to understand and apply the principles of aerodynamics well enough to advance from delicate wood and canvas structures to rockets powerful enough to escape from the gravity well that had trapped us for eons is a powerful testament to human ingenuity and the drive to explore.

Ingenuity has again won the day in the history of flight, this time literally as the namesake helicopter that tagged along on the Mars 2020 mission has successfully flown over the Red Planet. The flight lasted a mere 40 seconds, but proved that controlled, powered flight is possible on Mars, a planet with an atmosphere that’s as thin as the air is at 100,000 feet (30 km) above sea level on Earth. It’s an historic accomplishment, and the engineering behind it is worth a deeper look.

Continue reading “The Wright Stuff: First Powered Flight On Mars Is A Success”

Learn Multirotors From First Principles

Multirotors, or drones as they’re popularly called, are so ubiquitous as to have become a $10 toy. They’re no less fun to fly for it though, and learning how they work is no less fascinating. It’s something [Science Buddies] has addressed in a series of videos examining them from first principles. They may be aimed at youngsters, but they’re still an entertaining enough watch for those of advancing years.

Instead of starting with a multirotor control board, the video takes four little DC motors and two popsicle sticks to make a rudimentary drone frame. Then with the help of dowels and springs it tethers the craft as the control mechanisms are explained bit by bit, from simple on-off motor control through proportional control to adding an Arduino and following through to how a multirotor stays in flight. It’s instructional and fun to watch, and maybe even for some of us, a chance to learn something.

We’ve had multirotor projects aplenty here over the years, but how about something completely different made from popsicle sticks?

Continue reading “Learn Multirotors From First Principles”

Flight Of The Pterothopter: A Jurassic-Inspired Ornithopter

Ornithopters look silly. They look like something that shouldn’t work. An airplane with no propeller and wings that go flappy-flappy? No way that thing is going to fly. There are, however, a multitude of hobbyists, researchers, and birds who would heartily disagree with that sentiment, because ornithopters do fly. And they are almost mesmerizing to watch when they do it, which is just one reason we love [Hobi Cerdas]’s build of the Pterothopter, a rubber band-powered ornithopter modeled after a pterodactyl.

All joking aside, the science and research behind ornithopters and, relatedly, how living organisms fly is fascinating in itself — which is why [Lewin Day] wrote that article about how bees manage to become airborne. We can lose hours reading about this stuff and watching videos of prototypes. While most models we can currently build are not as efficient as their propeller-powered counterparts, the potential of evolutionarily-perfected flying mechanisms is endlessly intriguing. That alone is enough to fuel builds like this for years to come.

As you can see in the video below, [Hobi Cerdas] went through his own research and development process as he got his Pterothopter to soar. The model proved too nose-heavy in its maiden flight, but that’s nothing a little raising of the tail section and a quick field decapitation couldn’t resolve. After a more successful second flight, he swapped in a thinner rubber band and modified the wing’s leading edge for more thrust. This allowed the tiny balsa dinosaur to really take off, flying long enough to have some very close encounters with buildings and trees.

For those of you already itching to build your own Pterothopter, the plans come from the Summer 2017 issue of Flapping Wings, the official newsletter of the Ornithopter Society (an organization we’re so happy to learn about today). You can also find more in-depth ornithopter build logs to help you get started. And, honestly, there’s no reason to limit yourself to uncontrolled flight; we’ve come across some very impressive RC ornithopters in the past.

Continue reading “Flight Of The Pterothopter: A Jurassic-Inspired Ornithopter”

Web Tool Cranks Up The Power On DJI’s FPV Drone

Apparently, if the GPS on your shiny new DJI FPV Drone detects that it’s not in the United States, it will turn down its transmitter power so as not to run afoul of the more restrictive radio limits elsewhere around the globe. So while all the countries that have put boots on the Moon get to enjoy the full 1,412 mW of power the hardware is capable of, the drone’s software limits everyone else to a paltry 25 mW. As you can imagine, that leads to a considerable performance penalty in terms of range.

But not anymore. A web-based tool called B3YOND promises to reinstate the full power of your DJI FPV Drone no matter where you live by tricking it into believing it’s in the USA. Developed by the team at [D3VL], the unlocking tool uses the new Web Serial API to send the appropriate “FCC Mode” command to the drone’s FPV goggles over USB. Everything is automated, so this hack is available to anyone who’s running a recent version of Chrome or Edge and can click a button a few times.

There’s no source code available yet, though the page does mention they will be putting up a GitHub repository soon. In the meantime, [D3VL] have documented the command packet that needs to be sent to the drone over its MODBUS-like serial protocol for others who might want to roll their own solution. There’s currently an offline Windows-only tool up for download as well, and it sounds like stand-alone versions for Mac and Android are also in the works.

It should probably go without saying that if you need to use this tool, you’ll potentially be violating some laws. In many European countries, 25 mW is the maximum unlicensed transmitter power allowed for UAVs, so that’s certainly something to keep in mind before you flip the switch. Hackaday isn’t in the business of dispensing legal advice, but that said, we wouldn’t want to be caught transmitting at nearly 60 times the legal limit.

Even if you’re not interested in fiddling with drone radios, it’s interesting to see another practical application of the Web Serial API. From impromptu oscilloscopes to communicating with development boards and conference badges, clever developers are already finding ways to make hardware hacking easier with this new capability.

[Thanks to Jules for the tip.]

Vibration Isolation Helps Improve FPV Video Feed

First-person view technology has become hugely popular in the RC community, letting the user get a vantage point as though they were actually within their tiny scale vehicle. It can be difficult to get a good, clean video feed though, particularly in models that have a lot of drivetrain vibration. [Engineering After Hours] decided to tackle this problem with a simple vibration isolator design. (Video, embedded below.)

The first step is to analyse the vibration to get an idea of the frequencies that are most important to target. WIth that done, a simple 3D printed camera mount is designed with three flexible joints between the camera and the base which is rigidly coupled to the RC boat or car’s body. The modal analysis tools in Fusion 360 were used to get a rough idea of the frequency response of the system, helping to get things in the ballpark with a minimum of fuss.

The final design does help cut down on vibrations, though it is unable to counteract heavy vibration from driving on extremely rough surfaces. In these cases, [Engineering After Hours] recommends the use of a gimbal instead. Proper damping can be a godsend in many applications; bricks can make a huge difference for your 3D printer, for example.

Continue reading “Vibration Isolation Helps Improve FPV Video Feed”