self-stabilizing robot on tabletop

Taming The Wobble: An Arduino Self-Balancing Bot

Getting a robot to stand on two wheels without tipping over involves a challenging dance with the laws of physics. Self-balancing robots are a great way to get into control systems, sensor fusion, and embedded programming. This build by [mircemk] shows how to make one with just a few common components, an Arduino, and a bit of patience fine-tuning the PID controller.

At the heart of the bot is the MPU6050 – a combo accelerometer/gyroscope sensor that keeps track of tilt and movement. An Arduino Uno takes this data, runs it through a PID loop, and commands an L298N motor driver to adjust the speed and direction of two DC motors. The power comes from two Li-ion batteries feeding everything with enough juice to keep it upright. The rest of the magic lies in the tuning.

PID (Proportional-Integral-Derivative) control is what makes the robot stay balanced. Kp (proportional gain) determines how aggressively the motors respond to tilting. Kd (derivative gain) dampens oscillations, and Ki (integral gain) helps correct slow drifts. Set them wrong, and your bot either wobbles like a confused penguin or falls flat on its face. A good trick is to start with only Kp, then slowly add Kd and Ki until it stabilizes. Then don’t forget to calibrate your MPU6050; each sensor has unique offsets that need to be compensated in the code.

Once dialed in, the result is a robot that looks like it defies gravity. Whether you’re hacking it for fun, turning it into a segway-like ride, or using it as a learning tool, a balancing bot is a great way to sharpen your control system skills. For more inspiration, check out this earlier attempt from 2022, or these self-balancing robots (one with a little work) from a year before that. You can read up on [mircemk]’s project details here.

A Self Balancing Bike For Crash Dummy Billy

We aren’t sure there’s enough information in the [We Make Machines’] video to easily copy their self-balancing bike project, but if you want to do something similar, you can learn a lot from watching the video. Building sufficient gyros to keep the bike stable required quite a bit of trial and error.

There are some tricks to getting a stable heavy weight to rotate without a lot of vibration and problems. The gyros go on the rider’s saddle, so you aren’t going to be able to ride in the normal fashion. However, a substantial motor drives the wheels so there’s no need to pedal.

The first attempt to self-balance stayed stable for about 10 seconds. Some of it was fine-tuning code, but noise from the gyros also threw off the angle sensor. A higher-quality sensor seemed promising, but it didn’t really fix the problem. Instead of using PID, the guys tried an LQR (Linear Quadratic Regulator) algorithm. Once that was sorted and a servo allowed for steering, it was time to let the bike roam free.

Continue reading “A Self Balancing Bike For Crash Dummy Billy”

DIY 3D-Printed Arduino Self-Balancing Cube

Self-balancing devices present a unique blend of challenge and innovation. That’s how [mircemk]’s project caught our eye. While balancing cubes isn’t a new concept — Hackaday has published several over the years — [mircemk] didn’t fail to impress. This design features a 3D-printed cube that balances using reaction wheels. Utilizing gyroscopic sensors and accelerometers, the device adapts to shifts in weight, enabling it to maintain stability.

At its core, the project employs an Arduino Nano microcontroller and an MPU6050 gyroscope/accelerometer to ensure precise control. Adding nuts and bolts to the reaction wheels increases their weight, enhancing their impact on the cube’s balance. They don’t hold anything. They simply add weight. The construction involves multiple 3D printed components, each requiring several hours to produce, including the reaction wheels and various mount plates. After assembly, users can fine-tune the device via Bluetooth, allowing for a straightforward calibration process to set the balancing points.

If you want to see some earlier incarnations of this sort of thing, we covered other designs in 2010, 2013, and 2016. These always remind us of Stewart platforms, which are almost the same thing turned inside out.

Continue reading “DIY 3D-Printed Arduino Self-Balancing Cube”

Behold The Mega-Wheelie, A Huge One-Wheeled Electric Skateboard

DIY electric personal vehicles are a field where even hobbyists can meaningfully innovate, and that’s demonstrated by the Mega-Wheelie, a self-balancing one-wheeled skateboard constructed as an experiment in traversing off-road conditions.

[John Dingley] and [Nick Thatcher] have been building and testing self-balancing electric vehicles since 2008, with a beach being a common testing ground. They suspected that a larger wheel was the key to working better on rough ground and dry sand and tested this idea by creating a skateboard with a single wheel. A very big, very wide wheel, in fact.

The Mega-Wheelie houses a 24V LiFePO4 battery pack, 450 W gearmotor with chain and sprocket drive, SyRen motor controller from Dimension Engineering, Arduino microcontroller, and an inertial measurement unit to enable the self-balancing function. Steering is done by leaning, and the handheld controller is just a dead man’s switch that disables the vehicle if the person piloting it lets go.

Design-wise, a device like this has a few challenging constraints. A big wheel is essential for performance but takes up space that could otherwise be used for things like batteries. Also, the platform upon which the pilot stands needs to be as low to the ground as possible for maximum stability. Otherwise, it’s too easy to fall sideways. On the other hand, one must balance this against the need for sufficient ground clearance.

Beaches are rarely covered in perfectly smooth and firm sand, making them a good test area.

In the end, how well did it work? Well enough to warrant a future version, says [John]. We can’t wait to see what that looks like, considering their past 3000 W unicycle’s only limitation was “personal courage” and featured a slick mechanism that shifted the pilot’s weight subtly to aid steering. A video of the Mega-Wheelie (and a more recent unicycle design) is embedded just below the page break.

Continue reading “Behold The Mega-Wheelie, A Huge One-Wheeled Electric Skateboard”

Homebrew Biped Bot Shows Off Some Impressive Moves

We’ve seen enough DIY robotic platforms here on Hackaday to know that most of them take the literal and figurative path of least resistance. That is, they tend to be some type of wheeled rover. But of course, there are plenty of other forms of locomotion, should you want to take on something a bit more challenging.

This biped robot from [Tast’s Robots] is a perfect example. While it’s still technically wheeled, its self-balancing nature makes things quite a bit more complex. It doesn’t just stand upright either, it also has a unique ability to crouch down by rotating its motorized knees and hips. As demonstrated in the video below, it can even navigate relatively uneven terrain — pulling off such a smooth transition between hardwood and carpet is no easy feat for a self-balancing bot like this.

But the best part? It isn’t just fully open source, it’s also designed to be built with only the tools and capabilities available to the average home gamer. That means 3D printed components, wooden dowels, and RC car parts. Even the power supply, a Ryobi 18 V tool battery, is easy to source and relatively hacker friendly.

Just as impressive as the hardware is the suite of software packages developed to handle things like balancing, locomotion, and reverse kinematics. Each one is maintained and documented as their own individual Apache-licensed projects, making them far easier to utilize than they would be if it was all implemented as one monolithic system.

If you really want to ditch the wheels, we’ve seen a few biped walkers in the past. But frankly, none of them can compare to the capabilities and scope of this project.

Continue reading “Homebrew Biped Bot Shows Off Some Impressive Moves”

Can You Cheat At Tightrope Walking?

Tightrope walking is no mean feat — it takes years to master (even with a balance rod) — but that’s too much like hard work for [James Bruton]. Obviously, the solution is just a matter of the application of some electronically-controlled balancing technology, and [James] is just the guy for the job. Bearing a passing resemblance to a cross between a prop from Ghostbusters and a medieval torture device, this weighty balancing cheat device almost kind of works!

On a slightly more serious note, bipedal balance is a complex problem to solve. You have multiple limb sections, which can move independently in many ways, as well as the upper body also contributing to shifting around the center of gravity in a hard-to-predict way. So it’s no great surprise that a simple torque reaction device strapped to the torso doesn’t help a great deal, but it sure is fun to watch him trying. The bottom line is this — our bodies are pretty heavy, and the amount of force needed to correct tilt in the plane of interest is hard to generate without the reaction wheel itself being really heavy, and that extra mass doesn’t exactly help with the overall balancing problem. We reckon the overall concept is sound, it’s just that all those extra limbs flopping around make this simplistic sensing and compensation strategy only partly effective.

Stabilizing small robots is probably a bit easier than a human, such as this gyroscopically-stabilized monowheel, but sometimes you don’t even need the gyroscope, as you can control the driving wheels directly.

Continue reading “Can You Cheat At Tightrope Walking?”

Self Balancing Robot Needs A Little Work

A self-balancing robot isn’t a new idea, but we liked the aesthetics of [Maker ATOM’s] build. The use of a breadboard and a printed bracket looks good, as you can see in the video, below.

Like most first-time projects, though, there were some lessons learned. The power supply needs a little work and the range of balance compliance didn’t meet expectations. But those problems are soluble and, as usual, you often learn more from working through issues like these.

Continue reading “Self Balancing Robot Needs A Little Work”