Demonstration robot for learning principles of real-time control using Raspberry Pi, RT Linux, and ROS.

Similar projects worth following
Bobble-Bot is being built to help students, hobbyists, and educators learn about the fundamentals of robotics in a safe, affordable, and fun way. He's a funny looking little guy with a big heart and an ever-present focus on his time critical tasks -- upon which his entire balancing-being depends.

- Bobble-Bot is a great platform for learning multiple disciplines within robotics.
- Grow your skill set, and advance in your engineering career through DIY projects.
- Comes with an open-source simulation and Python API.
- Learn how to develop and test software using sim. Deploy quickly to hardware.
- 3D printable parts!
- Modular mechanical and electrical design makes assembly easy for fans of DIY projects.

Meet Bobble-Bot

Why Did We Make This Thing?

Bobble-Bot was originally made just for fun in order to sharpen our engineering skills, and to showcase custom PCB designs intended for general mechatronics development. We learned and built so much along the way that we felt we had an obligation to share the design with the maker community. Simply put, the robot is a platform to empower aspiring makers by exposing them to the skills required to succeed in the multidisciplinary field of robotics.

The robot fills a shortage within the educational robotics space. Until now, there has not been an easily accessible example of real-time control with ROS for the DIY crowd. ROS2 promises to introduce support for real-time control  as a core feature within the framework. In order to make this accessible to the development community, we need examples! Bobble-Bot hopes to be a community developed platform that can test, explore, and expand upon this important capability. All along the way, contributors will learn valuable skills that they can use to advance in their careers.

What Are Our Goals?

We want educators, students, and hobbyists to get up and running with this open-source robot as quickly as possible. Our hope is that this project functions as a guide for how to develop and test robust control systems for robot prototypes. We envision this robot will be useful to professionals looking to sharpen their skills while having fun, and also to university students looking for a hands-on application to the theory covered in their engineering course-work. The combination of simulation and hardware opens up many possibilities for use of the platform in a research context. We'd love to attract early contributors from that space.

Upcoming milestones

  • Complete assembly of two new Bobble-Bots
  • Document the build process in our project log
  • Make an assembly video
  • Add buttons/LEDs to power up and initiate balance
  • ROS2  testing and demonstration
  • Author tutorial on control theory using Bobble-Bot
  • Cloud based simulation
  • Explore SLAM
  • Explore use of machine learning techniques in simulation

How to Contribute

We recommend you start with the Bobble-Sim. That's a free way to gain some quick insight into the project. For software contributions, please read our contributing guide. We welcome support in all areas, though. If you have any ideas, leave a comment. Thanks!


Hardware components graphic (1/2)

Portable Network Graphics (PNG) - 278.67 kB - 04/16/2019 at 02:28



Hardware components graphic (2/2)

Portable Network Graphics (PNG) - 278.23 kB - 04/16/2019 at 02:28



Bobble-Bot CAD Assembly (1/5)

Portable Network Graphics (PNG) - 396.95 kB - 04/16/2019 at 02:29



Bobble-Bot CAD Assembly (2/5)

Portable Network Graphics (PNG) - 182.42 kB - 04/16/2019 at 02:29



Bobble-Bot CAD Assembly (3/5)

Portable Network Graphics (PNG) - 140.98 kB - 04/16/2019 at 02:29


View all 12 files

  • 1 × Raspberry Pi Model 3B Linux SoC. Runs our balance controller and other Bobble-Bot software
  • 2 × Tacon 96M608 BLDC motors Brushless DC motors that drive the wheels
  • 2 × Chupacabra BLDC motor driver Closed loop control of BLDC motors
  • 2 × AS5047D Position Sensor Measures motor position
  • 1 × CAN I/O Shield Raspberry Pi shield for CAN bus communications

View all 9 components

  • Bobble Build: Part 1 - Crimpin' ain't Easy

    James Holley2 days ago 1 comment

    Is crimpin' easy?  Hell yeah!

    Making cables is the WORST part of finishing a build.  We've all been there - adding the final touches to a project just to find out that some (or all) of the cables have a loose connection, bad crimp / solder, wrong pinout, etc.  Sometimes pins push back out of their connectors or, as you are trying to solder a pin, you melt the whole thing...  

    Getting your cable assembly reliable and easy can be hard on DIYers.  Below is an image from that captures some of the pros and cons of soldering vs. crimping at a high level.

    The biggest problem for hobbyists and DIYers... Crimping doesn't have a low initial setup cost?!?!?  Like I said, crimpin' ain't easy.  But wait!  It's not so bad - here's what we're using for Bobble-Bot.

    If you take a look for this guy, you'll see its priced in the $425 range.  Yikes!  A little steep for some of us, but lets put it in perspective - Can this tool reduce the number of bad connections down the line?  Is it easier and more reliable than soldering?  

    Right now I'm putting together 2 Bobble Bots, each with 60 crimped connections, making 120 connections total - when you have a lot of connections in front of you, any mistake can spiral into hours of lost time troubleshooting or repairing a poor initial job.  If I spend 5 minutes on each connection, I'm looking at 10 hours of work just putting together cables.  That's not super owesome at all.

    The major takeaway: If you plan on doing a lot of cabling, get yourself a crimper.  It will cost a bit up front, but you'll see how much time it saves you down the line.  We reuse this crimper and different styles of the CLIK-Mate connectors for most of our projects that require small gauge wire.  The connectors themselves are cheap and reliable.

    So, how does one crimp?  The first step is stripping the wire - don't strip too much.  The nice part about crimped connections is you can minimize the amount of exposed wire and not have to use heat shrink.  The back prongs of a CLICK-mate connector are designed to hold onto the insulation of the wire.  Here is a close up of the minuscule amount of wire I stripped off the end - for reference the wire is 28 AWG.

    After that, I insert the connector in the crimper and close the crimper about half way - there is a piece of backing that is used to push the wire against to ensure it is inserted at the proper depth.  Closing half way makes sure the connector is removing most of the room where the wire could mistakenly push through past the backing.

    After that, you just put the wire in and sqeeze the handles down.  Completed crimp below.

    One of the best parts about crimping is you can inspect the connector after it has been crimped to verify your connection is in good condition.  Compare this with soldering, where you could end up with cold joint and the outside still looks OK.  Here's a pic of a good crimp.

    You can see that the insulation has been grasped by the back tongs and the wire is smushed down under the front tongs.  I always do a pull test after each crimp after visual inspection.  Better to know that its going to come apart before it ends up in a cable.  Slide it into the connector and its done!

    Rinse and repeat 120 times... Maybe a coffee break or two mixed in there and...

    So we have more Bobble Bots on the loose - look for some updates on testing, software, and design refinement in the coming weeks.


  • Bobble Build: Part 1 - Solder on!

    James Holley05/13/2019 at 04:32 1 comment

    New PCBs are in, time to start soldering on components!  

    The board we're going to cover in this post is the PDU  (Power Distribution Unit). 

    When it comes to LiPo batteries, I always try to stay on the safer side of things when I can, so the main components are an inline fuse and relay.  The fuse we are using right now is rated to 15A - probably way more amperage than we need, but it will shut off power in case something short circuits.  The relay will be used so that a signal from our on-board computer (Raspberry Pi) will be required to power the motors.  This is nice just in case Bobble Bot takes a spill or the computer loses power, we can cut power to the wheels so our day doesn't get any worse.  Other than that, the PDU just gives us a couple of nice connectors from the battery to boards we want to power - there's not much to it.  The schematic is posted below for anyone that wants to take a closer look or offer any pointers.

    I included a LED so you can see when the relay is closed and power is passing through - don't mess with the bot while the power is hot!

    This is a connector and transistor circuit that completes the relay - pin 2 is connected to the Raspberry Pi GPIO and completes the circuit through the MOSFET.  Pins 3 and 4 can be connected through a switch if you want an additional check on power going through the relay.

    So now... I've chosen some SMT parts for the resistors, transistor, and LED.  Even though these parts are a little trickier to solder, they have some good advantages.  SMT parts are usually cheaper than through hole parts when buying in bulk, so you can save some money down the line if you know you are going to use a lot of them.  If you are ever planning on getting your boards manufactured and assembled, SMT parts are the go to - through hole parts have to be soldered by hand, so you will have to go SMT at this point.  SMT parts take up less board space and they don't stick through the bottom.  This can be helpful for keeping interference with mechanical mounting to a minimum.  And, if you have a little practice, they are not to difficult to solder yourself!  I use a simple technique to help me solder them down - I usually go with 0805 components or larger to make the job easier.  

    I've soldered in my fuse and relay - time to go after the SMT parts to the bottom right of the picture.

    The first step is to get the resistor on the board and to fill one of the two pads with solder.  The other pad is kept clean. Make your life easy - the right pad is soldered here because... well.. I'm right handed, so that's the hand I hold the soldering iron in.  Soldering SMT can be a little delicate, so make sure you set yourself up for success.

    I have two go to tools for the next step - a probe and a pair of tweezers.  Which one I use depends on the location of the soldering and how big the component is.  For smaller components, a straight probe to push the SMT part is usually more helpful than trying to grab it.  

    Heat up the solder on the pad, and push the part into place - make sure that the part is flush with the board.  A trick I usually use is to hold the part in place with the probe or tweezers and remove the soldering iron first.  Wait for the solder to solidify, and you are good to go.

    Once one side is soldered down, you can move to the other pad to complete the job.  Here's a picture of the finished resistor.

    And there you have it!  After that its just rinse and repeat until you get the final product:

    The first PDU is on the newly printed parts, ready for some functional testing!  After that, it'll be time to make cables and get everything wired up. 

    Bobble on,


  • New Bobble-Bot Chassis - A 3D Printing Story

    JSook04/28/2019 at 16:45 0 comments

    BB2s We've spent the past month getting two new chassis built, color coordinated this time. Getting the first robot built, tested, and controllable took quite a while. The BB2 robot was designed, built, assembled, and disassembled more times than a sane person would care to count. After getting the mechanical design nailed down, it was a simple task to 3D print a couple fresh chassis - not.

    3D Printing has become the method of choice for manufacturing custom components on the cheap. I'm sure many of you have some experience 3D printing and probably own your own machines. Anyone that owns an entry level 3D printer quickly learns their temperament. Hobby level 3D printing technology has changed the world, allowing an ambitious soul to quickly turn their ideas into reality. When the machine is working, the user is blessed with the ability to manufacture virtually any geometry their imagination desires. Maker-heaven forbid the machine is in a bad mood, a 12 hour print can take a week (ask me how I know). 
    The construction of BB2 is primarily based on 3D printing. A single bot takes approximately 24 hours of print time. With a few kilos of PLA in hand I started the printing process. Our Makerbot was having none of it. Constant under temperature conditions, filament jams, missed lines, and fan speed errors it would take a few weeks to get the issues under control.
    The Makerbot Replicator+ used to manufacture the bots does have several hundred hours on it, turns out it was time for a significant overhaul. Adjusting the belt tensions helped with missing lines of parts, but didn't entirely solve the issues. To combat the under temperature issue I disabled the PLA cooling fan (relax, not the extruder cooling fan). The extruder was able to hold 215C, but a side-effect is that the parts were extremely stringy with poor surface finishes. Opening and cleaning the extruder helped with filament jams but didn't stop them completely. Another issue I noticed but wasn't able to easily solve was a failure of the Smart Extruder+'s proximity sensor. After wasting far too much time messing with the extruder I traded $200 to Amazon for a replacement. $200 well spent, heater problems were solved, surface finishes improved, overall reliability of the machine was back to something acceptable. I suspect the root cause of the extruder failure is a defective heating element. Before the machine changed it's mind back we printed around the clock until all the parts were completed. 
    I spent another day post processing the parts, cleaning support material away from the larger parts and installing heat-set threaded inserts. Surprisingly, almost all the parts bolted right up save for a few issues with motor fitment. We're installing the electronics on the bots now, standby for another progress update! Coordinated bobbling coming soon.

  • Why All the Fuss About Real-Time?

    Mike Moore04/17/2019 at 04:20 3 comments

    In order to get the best possible performance out of the balance controller, great care must be taken to ensure that the control loop operates at as close to a fixed 200 Hz loop rate as possible. From a write-up Jackie Kay (Open Source Robotics Foundation) contributed on real-time computing in ROS2:

    A real-time computer system needs both an operating system that operates in real-time and user code that delivers deterministic execution. Neither deterministic user code on a non-real-time operating system or nondeterministic code on a real-time operating system will result in real-time performance.

    The whole write-up is great and can be found here. All that to say, when your system needs real-time performance, it needs it. Bobble-Bot provides a safe way to learn more about this classification of systems at low cost. This is not an easy feat because typical real-time controller implementations are heavily proprietary. The whole subject is both fascinating and practical. We are passionate about sharing our experience here with the larger open-source community, and Bobble-Bot is a great platform for doing that.

    Enough background, let's look at some examples.

    Here's What Non Real-Time Control Looks Like

    The performance is not good. If you look around on the internet you will find many examples of self-balancing hobby robots with performance that's along these lines. Keep in mind, this is the best we were able to get the non real-time Bobble-Bot to perform after many hours of tuning. The bottom line: non deterministic loop jitter (delay) kills performance in a system like this one. When you need real-time execution, you need it.

    Here's What Real-Time Control Looks Like

    In the video below, you are viewing one afternoon's worth of balance control tuning by James and Mike. The difference in performance between non real-time and real-time control is night and day. Watch to the end... it gets better and better.

    Since the day these videos were recorded, we have continued to make performance improvements that enable the Bobble-Bot to do ramps and different surfaces like a pro! This would not be possible without the switch to real-time.

    If you want real-time, why not just use a micro-controller? 

    Having a full Linux OS running ROS makes working with the robot so much easier and more accessible. Being able to wirelessly ssh into the system and poke around is what makes the learning enjoyable. Additionally, ROS has a huge ecosystem of packages that makes it very easy to extend Bobble-Bot's capabilities without having to reinvent the wheel.

  • New Bobble-Bots Coming Soon

    Mike Moore04/16/2019 at 00:27 0 comments

    Two more Bobble-Bots in development!

    These handsome guys are now ready for their electronics and software load! Changes on the CAD side were mainly geared towards improving the assembly process. Significant improvements were also made to the motor assembly. On both the mechanical and electrical side, this version will represent a significant leap forward in making Bobble-Bot plug and play.

    On the software and electronics front, we're expecting the turn-around time to be significantly reduced this time through. Looking forward to making use of our continuous integration/deployment tools to flash the entire software load directly onto the SD cards. For the balance controller, we'll be using the master branch of our open-source controller repository. Results from sim indicate we'll have no trouble with the balance controller. Just a few updates to the control gains were required.

  • Simulation Validation Update

    Mike Moore04/16/2019 at 00:26 0 comments

    Bobble-Bot Validation of Open-Source Sim

    We're wrapping up a considerable effort in the validation of the Bobble-Bot simulation. For our users, this means they can safely assume that navigation, controls, and other software development activities can continue to rely on the open-source Bobble-Bot simulation for their testing. Our software architecture and infrastructure enables rapid deployment to hardware upon success of automated test results performed within the simulation environment.

    The main point of all this is that we now have reliable data to back up the validity of the results produced by the simulation! Some of the highlights of this analysis effort are provided below. 

    Impulse Response Test

    Sample plots

    Full data sets from all validation tests are available upon request.

    We will press on and continue to rely on our simulation to develop additional navigation and guidance routines. These can all be developed and tested using the open-source simulation. We are actively seeking contributors for this effort. SLAM experience would be great. Message us if you'd like to help!

View all 6 project logs

  • 1
    Get going with the balance controller & simulation

    If you're looking to contribute to Bobble-Bot, the easiest and most affordable place to start is the sim. We use the simulator for all of our software development, and you should use it too. We've gone through great effort to validate and build confidence in our simulator. See our GitHub for instructions on how to build the sim from source

    Start with the controller config file. Mess with some of the gains to see their impact on the control performance. Next, try out changes to the mass properties by making changes to the URDF. Do whatever you's simulation...have fun!

  • 2
    Read the CONTRIBUTING guide.

    We welcome contributions to the project. If they are software changes we insist that you follow the rules outlined in our file. Following these steps creates a method to our madness when it comes to software. Most importantly, it allows us to run your changes through a suite of automated software tests that rely on our simulation. The process is key to getting your changes folded in quickly.

  • 3
    Run some test scenarios

    Now that you've got the simulation built and running, it's time to use it to generate some data. The basic steps are provided below, but you can get a whole bunch more detail by visiting here and here.

    source devel/setup.bash
    roslaunch bobble_controllers apply_impulse_force.launch impulse:=-1000 out_file:=~/bobble_workspace/src/bobble_controllers/analysis/impulse_test

     If all goes well, you should see something like this:

View all 8 instructions

Enjoy this project?



Jan wrote 05/13/2019 at 07:36 point

Awesome project. Will follow your progress for sure!

  Are you sure? yes | no

James Holley wrote 05/08/2019 at 02:57 point

What's up @CutterSlade001?  Those are huge inductors...

Bobble Bot is still in the prototyping stage - if you notice between pictures we have different wheel sizes, circuit boards, you name it.  Early on, we were using much bigger motors.  When we started switching around which motors we wanted to use, we put the inductors in there so we didn't have to think as much about changing our motor driver configuration since they would smooth out the current.  We hope that we can finalize the design over the next few months and start optimizing - we will probably remove the inductors electrically (but they look super owesome, so maybe they'll stay on there).

  Are you sure? yes | no

CutterSlade001 wrote 05/07/2019 at 10:10 point

Please tell me, what are the 3 cylindrical objects either side above the wheels? Super caps? Huge inductors? Why? Thanks.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates