May 14, 2012 AT 10:14 am

mbed Based Remote Controlled Balancing Robot

Lauszus posted a great video of his mbed based balancing robot on Youtube.

I have for a long time wanted to build a remote controllable balancing robot aka Segway – that’s was actually the main reason why I created the PS3 Bluetooth Library both for Arduino and the FEZ Devices. It has been a long time since the sneak peak and the performance has been improved a lot since then. The original one had a FEZ Rhino as the main processor, but I discovered that it was not fast enough to read the encoders, as it is not running embedded code. Also I was already using more than 10ms per loop, which I used as a fixed time loop, so I decided to step up a notch and go for a much more powerful device: the mbed microcontroller, which is an ARM Cortex-M3 running 96MHz.

There is a great writeup here, including links to the original code (and an Arduino only version).


mbed + extras – LPC1768 development board [v5.1]. The mbed is a tool for rapid prototyping with microcontrollers using the beefy LPC1768 ARM Cortex M3 chip. While it looks like a classic breadboard-friendly breakout board, this dev board has a few tricks up its sleeve. First of all, underneath the PCB is a second LPC chip which acts as the programmer: when plugging into a USB port the mbed shows up as a flash drive and programs can be ‘dragged’ onto it for uploading. This makes it easy to program without an external device, and makes bricking impossible. There’s also a bunch of indicator LEDs, and a little flash storage chip as well.


Writing code for the mbed is a little different than you may be used to. Instead of downloading the IDE and installing it locally, the user must instead visit the website and use the web-based ‘cloud’ programming system. Since the board is programmed via drag-n-drop, no software is installed. The good news is that it means its easy to work on anywhere you are just by logging on, and there’s a vibrant social network sharing code on the mbed site. The bad news is that Internet access is required to work on a project.

New users can get started with mbed tools in 60 seconds, by plugging in an mbed microcontroller, going to the website to sign up, and downloading and running a “Hello World!” binary just like saving to a USB flash drive. Compiling a first program takes only 60 seconds more; Launch the browser-based compiler, create a new template project, click ‘compile’ to build and download the binary – there is nothing to configure or install, and everything works on Windows, Mac, or Linux.

The mbed’s core chip, the NXP LPC1768 features:

  • 40-pin DIP, 0.1″ pitch form-factor
  • 100MHz NXP LPC1768 MCU with ARM® Cortex™-M3 Core
  • 64KB RAM, 512KB FLASH
  • Ethernet (requires magnetics and jack), USB, 2xSPI, 2xI2C, 2xCAN 3xUART, 6xPWM, 6xADCs, 1xDAC
  • USB drag ‘n’ drop programming
  • High-level C++ libraries
  • Online browser-based toolchain

For experienced users, mbed provides a fast way to create proof-of-concept designs in the early stages of development. For developers using older microcontrollers, discrete logic, or even those new to the industry, mbed removes the barriers to the world of modern 32-bit microcontrollers.

In stock and shipping!

Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!

Maker Business — The Essential Guide to Electronics in Shenzhen

Wearables — Lithium Batteries: a soft touch goes a long way

Electronics — Capacitor Polarity Markers

Biohacking — Can Gizmos Cure Insomnia? – The New Yorker

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !

1 Comment

  1. Very good job! i’m definitely going to spend some time learning his code.

Sorry, the comment form is closed at this time.