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”

Ball Balancing Wheel Puts A Spin On Inverted Pendulums

If you march sufficiently deep into the wilderness of control theory, you’ll no doubt encounter the inverted pendulum problem. These balancing acts have emerged with a number of variants over the years, but just because it’s been done before doesn’t mean there’s no space for something new. Here, [David Gonzalez], has taken this classic problem and given it an original own spin–literally–where the balancing act is now a ball balanced precariously upon a spinning wheel. (Video, embedded below.) Mix in a little computer vision for sensing, a dash of brushless motor control, a bit of math, and you have yourself a closed-loop system that’s bound to turn a few heads.

[David’s] implementation is a healthy mix of classic control theory with some modern electronics. From the theory bucket, there’s a state-space controller to drive both the angle and angular velocity of the ball to zero. The “state” is a combination of four terms: the ball angle, the ball’s angular velocity, the wheel angle, and the wheel’s angular velocity. [David] weights each of these terms and sums them together to create an input value to adjust the motor velocity driving the wheel and balance the ball.

From the electronics bin, [David] opted for an ESP32 running Arduino, the custom Janus Brushless Motor Controller running SimpleFOC, and a Maix Bit Microcontroller with an added camera running MicroPython to compute the ball angle. Finally, if you’re curious to dig into the source code, [David] has kindly posted the firmware on Github.

We love seeing folks mix a bit of control theory into an amalgamation of familiar electronics. And as both precision sensors and motor controllers continue to improve, we’re excited to see how the landscape of projects changes yet again. Hungry for more folks closing the loop on unstable systems? Look no further than [UFactory’s] ball balancing robot and [Gear Down for What’s] two wheeled speedster.

Continue reading “Ball Balancing Wheel Puts A Spin On Inverted Pendulums”

Inverted Pendulum For The Control Enthusiast

Once you step into the world of controls, you quickly realize that controlling even simple systems isn’t as easy as applying voltage to a servo. Before you start working on your own bipedal robot or scratch-built drone, though, you might want to get some practice with this intricate field of engineering. A classic problem in this area is the inverted pendulum, and [Philip] has created a great model of this which helps illustrate the basics of controls, with some AI mixed in.

Called the ZIPY, the project is a “Cart Pole” design that uses a movable cart on a trolley to balance a pendulum above. The pendulum is attached at one point to the cart. By moving the cart back and forth, the pendulum can be kept in a vertical position. The control uses the OpenAI Gym toolkit which is a way to easily use reinforcement learning algorithms in your own projects. With some Python, some 3D printed parts, and the toolkit, [Philip] was able to get his project to successfully balance the pendulum on the cart.

Of course, the OpenAI Gym toolkit is useful for many more projects where you might want some sort of machine learning to help out. If you want to play around with machine learning without having to build anything, though, you can also explore it in your browser.

Continue reading “Inverted Pendulum For The Control Enthusiast”

Furuta Style Inverted Pendulum Is King Of Geek Desk Ornaments

Newton’s Cradle is thought of as the most elegant of executive desk toys. But that 20th-century dinosaur just got run off the road as [Ben Katz]’s Furuta pendulum streaks past in the fast lane, flipping the bird and heralding a new king of desk adornments.

This Furata pendulum has wonderfully smooth movement. You can watch it go through its dance in the video after the break. Obviously you agree that this is the desk objet d’art for the modern titan of industry (geek). Just don’t stop at watching it in action. The best part is the build log that [Ben] put together — this project has a little bit of everything!

Continue reading “Furuta Style Inverted Pendulum Is King Of Geek Desk Ornaments”

Extrinsic Motivation: And You Thought Inverted Pendulums Were Hard

An extremely common project for a control systems class is the inverted pendulum. Basically, it’s a robot mounted on a linear rail, a hinge, and a pendulum sticking straight up in the air. Get your algorithms right, and you have a pendulum that seemingly resists the inexorable pull of gravity and a great understanding of how Segways, balancing robots, and quadcopters work.

[zakowy] is taking this to the next level with his entry to The Hackaday Prize. It’s an inverted pendulum with two counter-rotating propellers in a gimballed fan, and the most unstable UAV design we’ve ever seen.

The mechanics of the build consist of a carbon and epoxy frame, with a motor mount that can move in the X and Y axes. This mount holds two brushless motors and is actuated with rather large pitch and roll servos. The electronics consist of the usual suite of sensors found in a quadcopter – gyros, accelerometers, magnetometers, and a barometric altimeter. Everything is controlled by an Arduino Due, getting commands from an RC receiver and sending telemetry back to a computer

[zakowy]’s project didn’t make the cut for the quarterfinalist selection, but he is undeterred. He’s building this strange contraption because he can, not because we’re dangling some great prizes in front of his nose. Right now, [zakowy] is working on a testing rig. This thing will fly, make no mistakes about that.

Videos available below.


SpaceWrencherThis project is an official entry to The Hackaday Prize that sadly didn’t make the quarterfinal selection. It’s still a great project, and worthy of a Hackaday post on its own.

Continue reading “Extrinsic Motivation: And You Thought Inverted Pendulums Were Hard”

Balancing Inverted Pendulums

The robot above can balance an inverted pendulum. But wait, it gets better. It can balance an inverted pendulum that is articulated in the middle like the one seen above. Wait, wait, wait… it gets even better. It can start with the pendulum hanging below the sliding carriage, flick back and forth to get the two segments swinging, and then come to equilibrium with the pendulum as seen above. Once there, it can recover from a bit of a shove, like some of the big boys. Very impressive, even when compared to two-wheeled balancers. See for yourself after the break.

We don’t have very much information on how this works. We do know that it was a seminar paper from a student at the University of Stuttgart but the rest is pretty much a mystery. Does it use visual processing? What kind of controller is driving this thing? We want to know the details but haven’t yet found a copy of the paper. If you know where we can get our mitts on it please leave a comment below.

Continue reading “Balancing Inverted Pendulums”

Ball Inverted Pendulum

[youtube=http://www.youtube.com/watch?v=bI06lujiD7E]

We’ve seen several different balancing bot styles over the past few years, but this one is new to us. The BallP, short for Ball inverted Pendulum, balances on top of a ball. We’re not sure what the advantages are to this layout though. Anyone care to enlighten us? Even though we hadn’t seen this style, it is apparently not new. The Ballbot has been around for a while and might seem even more impressive visually.