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).

Window-186

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.

Window-1-109

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 http://mbed.org 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 mbed.org 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!


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in! adafruit.com/mastodon

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

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

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — NEW PRODUCTS – 22-pin 0.5mm pitch FPC Flex Cables for DSI CSI or HSTX – 5cm / 10cm / 20cm

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: The latest on Raspberry Pi RP2350-E9, Bluetooth 6, 4,000 Stars and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — IoT Vulnerability Disclosure, Decorative Dorm Lights, and more!

Maker Business – Adafruit Daily — A look at Boeing’s supply chain and manufacturing process

Electronics – Adafruit Daily — Autoscale is cheating!

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



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.