Inverted Pendulum Balanced On A Drone

[Nicholas Rehm] works during the day at the Applied Physics Laboratory at Johns Hopkins, Maryland, so has considerable experience with a variety of UAV applications. The question arose about how the perseverance mars rover landing worked, which prompted [Nicholas] to hang a rock under his drone, attached via a winch. This proved to be interesting. But what is more interesting for us, is what happens when you try to attach an inverted pendulum to the top of a drone in flight? (video embedded, below)

This is a classic control theory problem, where you need to measure the angle of the pendulum with respect to the base, and close the loop by calculating the necessary acceleration from the pendulum angle. Typically this is demonstrated in one dimension only, but it is only a little more complicated to balance a pendulum with two degrees of freedom.

[Nicholas] first tried to derive the pendulum angle by simply removing the centering springs from an analog joystick, and using it to attach the pendulum rod to the drone body. As is quite obvious, this has a big drawback. The pendulum angle from vertical is now the sum of the joystick angle and the drone angle, which with the associated measurement errors, proved to be an unusable setup. Not to be discouraged, [Nicholas] simply added another IMU board to the bottom of the pendulum, and kept the joystick mechanism as a pivot only. And, as you can see from the video after the break, this indeed worked.

The flight controller is [Nicholas’] own project, dRehmFlight (GitHub), which is an Arduino library intended for the Teensy 4.0, using the ubiquitous MPU6050 6-DOF IMU. [Nicholas] also made an intro video for the controller, which may prove instructive for those wishing to go down this road to build their own VTOL aircraft. The code for pendulum experiment is not available at the time of writing, perhaps it will hit the GitHub in the future?

Continue reading “Inverted Pendulum Balanced On A Drone”

VTOL Tailsitter Flies With Quadcopter Control Software

Quadcopters are great for maneuverability and slow, stable flight, but it comes at the cost of efficiency. [Peter Ryseck]’s Mini QBIT quadrotor biplane brings in some of the efficiency of fixed-wing flight, without all the complexity usually associated with VTOL aircraft.

The Mini QBIT is just a 3″ mini quadcopter with a pair of wings mounted below the motors, turning it into a “tailsitter” VTOL aircraft. The wings and nosecone attach to the 3D printed frame using magnets, which allows them to pop off in a crash. There is no need for control surfaces on the wings since all the required control is done by the motors. The QBIT is based on a research project [Peter] was involved in at the University of Maryland. The 2017 paper states that the test aircraft used 68% less power in forward flight than hovering.

(Editor’s Note: [Peter] contacted us directly, and he’s got a newer paper about the aircraft.)

Getting the flight controller to do smooth transitions from hover to forward flight can be quite tricky, but the QBIT does this using a normal quadcopter flight controller running Betaflight. The quadcopter hovers in self-leveling mode (angle mode) and switches to acro mode for forward flight. However, as the drone pitches over for forward flight, the roll axis becomes the yaw axis and the yaw axis becomes the reversed roll axis. To compensate for this, the controller set up to swap these two channels at the flip of a switch. For FPV flying, the QBIT uses two cameras for the two different modes, each with its own on-screen display (OSD). The flight controller is configured to use the same mode switch to change the camera feed and OSD.

[Peter] is selling the parts and STL files for V2 on his website, but you can download the V1 files for free. However, the control setup is really the defining feature of this project, and can be implemented by anyone on their own builds.

For another simple VTOL project, check out [Nicholas Rehm]’s F-35 which runs on his dRehmFlight flight control software. Continue reading “VTOL Tailsitter Flies With Quadcopter Control Software”

Get Some Close Air Support With A Nerf Drone

Working from home has the major advantage of spending more time with loved ones, but it all that time can sometimes lead to friction. [Cory] found that Nerf battles with his kids is an effective way to blow off some steam, but felt he was getting a bit too much exercise in the process. Instead, he equipped an FPV quadcopter with a 3D printed Nerf gun to take his place.

Since manually reloading the Nerf gun after every shot wasn’t an option, he needed to create an autoloader. The darts are propelled by a pair of brushless drone motors mounted side-by-side, with just enough space for a dart the squeeze between. The motors are allowed to spin up, and then a dart is loaded servo-operated plunger, out of an off-the-shelf Nerf magazine. The motors ESCs and servo is controlled by an Arduino Nano, which receives the fire command from one of the spare outputs on the drone’s flight controller. To nerf gear is easily removable from the drone, so [Cory] to also fly the drone on more peaceful missions. See the video of one of the battles after the break. [Cory] might need to find an alternative control location to prevent himself being used as cover by his adversaries.

Nerf guns are a fun and harmless way to live out your sci-fi warfare fantasies, especially with the technology we have available these days. From FPV sentry guns to auto-aiming rifles, and heavy artillery, anything is possible.

Continue reading “Get Some Close Air Support With A Nerf Drone”

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”

Micro Quadcopter Designed In OpenSCAD

Quadcopters are fantastical things, and now come in a huge variety of flavours, from lithe featherweight racers to industrial-grade filming rigs worth tens of thousands of dollars. The Beatle-1 from [masterdezign] comes in at the smaller scale, and its body was created entirely in code.

To create the Beatle-1, [masterdezign] used OpenSCAD, a 3D modelling program that uses code rather than visual tools for producing geometry. Thus, with a series of Boolean operations, extrusions and rotations, a basic lightweight quadcopter frame is created in a handful of lines of text. Then, it’s just a simple job of 3D printing the parts, wiring up four Olimex F1607 motors and hooking up a flight controller and the little drone is ready for takeoff.

The Beatle-1 serves as not only a fun flying toy but also a great example of applying OpenSCAD modelling techniques to real-world applications. Parts are available on Thingiverse for those wishing to roll their own. 3D printed drone frames are popular, and we’ve seen a few around these parts before. Video after the break.

Continue reading “Micro Quadcopter Designed In OpenSCAD”

Resilient AI Drone Packs It All In Under 250 Grams

When it was first announced that limits would be placed on recreational RC aircraft heavier than 250 grams, many assumed the new rules meant an end to home built quadcopters. But manufacturers rose to the challenge, and started developing incredibly small and lightweight versions of their hardware. Today, building and flying ultra-lightweight quadcopters with first person view (FPV) cameras has become a dedicated hobby onto itself.

But as impressive as those featherweight flyers might be, the CogniFly Project is really pushing what we thought was possible in this weight class. Designed as a platform for experimenting with artificially intelligent drones, this open source quadcopter is packing a Raspberry Pi Zero and Google’s AIY Vision Kit so it can perform computationally complex tasks such as image recognition while airborne. In case any of those experiments take an unexpected turn, it’s also been enclosed in a unique flexible frame that makes it exceptionally resilient to crash damage. As you can see in the video after the break, even after flying directly into a wall, the CogniFly can continue on its way as if nothing ever happened.

Continue reading “Resilient AI Drone Packs It All In Under 250 Grams”