Close

Designing an Even Smaller Balance-Bot

A project log for Mini Self-Balancing Robot - RasPi + Arduino

A two-wheeled, stepper-driven mini self-balancing robot using a Raspberry Pi Zero W and an Arduino-compatible Exen Mini microcontroller.

ben-steerBen Steer 05/03/2021 at 13:450 Comments

After reflecting on the first version of our mini self-balancing robot, I was wondering how I could improve the design and perhaps make it even smaller… We’re going to do an exercise in system design - which I love almost as much as creating robots - and come up with a plan for a balance-bot version 2!

Heads up - this lil’ post contains some sponsored content from PCBWay.

Changes in the New Design

We’re going hard on reducing the mass of this bot; as a result, some of our components are going to change considerably. Let’s talk through the new design:

The other elements of the balance bot will be similar to the original, including a dedicated MCU for balance control, 3D printed wheels, an IMU, and voltage regulators for the MCUs. Next, let’s figure out what this thing will look like.

Physical Layout

I’ve added a few sketches here for how I envisage the new robot being configured. Here you can see the general layout - the PCB is really the core structural element holding the robot together. Instead of having a plastic chassis with the battery mounted in an enclosure, we’ll have the battery mounted vertically on the back of the PCB with a very light frame to hold it in place. This means we can make the robot narrower, bringing the wheels closer together and reducing the overall dimensions of the robot. The motor and encoder assemblies will be mounted directly to the board with some 3D printed clamps/mounts and some pre-planned holes in the PCB.

From the side view, you can see that the center of mass of the robot will be offset from center of the motor/wheel axes. We want the robot to be as statically stable as possible, which in our case, means it can nearly balance on its own if there is no outside influence. To help with this, the new design will allow the distance between the battery mount and the PCB to be customised, perhaps using some adjustable screws - similar to how one calibrates the height of a 3D printer bed. This way we can precisely tune the static stability of the robot, which will make life a lot easier when it comes to programming the control system. Alternatively, the offset of the wheel/motor assemblies could be adjusted instead.

With all this considered, I reckon the robot should come out to roughy 10 x 7 cm in size! That’s pretty tiny, and very cute.

PCB Design

While my previous board was pretty basic, and I could have done something similar with perfboards and wires, the benefits of having a custom PCB really shine when you start doing SMD designs and trying to make very compact boards. We’re going to need that if the balance bot v2 is going to be extra small.

For the first self balancing robot, I used PCBWay to have my custom PCB designs manufactured. You mightn’t think that custom manufacturing services would be affordable for low budget prototyping projects, but PCBWay is actually very hobbyist-friendly. I ordered 10 of my custom boards - which were 2-layered and included some milling operations - and the whole service (including postage to Australia) only came out to around $30 AUD. Depending on where you're located, it’ll probably end up even cheaper than that.

The whole process for ordering your boards is super easy and all done online - you can upload your design, choose your board settings and get an instant quote before committing to anything. They were actually very helpful and emailed me after I placed my order to confirm some aspects of my design, before going ahead with the manufacturing, which I must say I didn’t expect.

The boards turned out great - they were great quality and I was super excited to see my designs come to life! I was happy that the only problems I had with the boards were from my own bad design decisions (e.g. not adding pullup/pulldown resistors to most of my components lol) and not from the service. If I go ahead with this new design, or if anyone else wants to try building it, I’d definitely recommend PCBWay.

The New Board

On the back of the board (shown in the sketch below), firstly we have our motor drivers at the bottom, close to the wheel assembly mounting holes. These may or may not include a 6V voltage regulator alongside them. We'll have pads there to solder directly to the leads which connect into the motor/encoder boards. The drivers will have tracks running up to the control MCU to provide encoder input and receive motor commands.

There are two large pads to add the connections to the battery leads, and to the side you’ll see the little LED array to indicate the remaining battery life. This will have some additional, self-contained circuitry to handle the LED control based on the battery level (alternatively, they could be controlled from the MCU).

On the “front” face of our board (shown below), we’ll have our microcontrollers, and mount them near the edges so we can connect programming cables easily. On one side we have our Wi-Fi-capable MCU, and on the other side the our little dedicated control MCU and its connected 6-axis IMU. We also have the 5V voltage regulator to power our MCUs. We’re going to try to distribute the components so the center of mass lines up roughly with the sagittal plane of the bot.

You can see we have mounting holes at the bottom to attach the motor assemblies, and some holes around the perimeter to attach the battery frame.

Going Forward

Well, I think this is a pretty reasonable design for a tiny self-balancing robot. Will I end up building it? Maybe :P But if anyone out there wants to take this design and properly flesh it out, and maybe even build it, be my guest! I would love to see this thing in action. Happy hacking!

Discussions