In this article we review the mbed NXP LPC1768 development board and the mbed system in general.
Today we will examine the mbed NXP LPC1768 development board. The goal of the mbed system is to “provide(s) a platform for microcontroller hardware, tools, libraries and resources designed to enable rapid prototyping with microcontrollers.” (http://mbed.org/handbook/About). Personally I also see this as a good option for a “next step” for those who have outgrown their Arduino – the mbed offers much more processing power, a similar development environment and similar hardware ease of use. A great way to move from 8-bit to 32-bit power…
The NXP LCP1768 MCU on our mbed board offers the following specifications:
- a Cortex-M3 core running at 96MHz
- 512kb flash memory and 64kb RAM
- powered via USB or 4.5~9V DC applied straight to the board
- Real time clock (requires external battery backup if necessary)
- Loads of I/O options, including:
- USB serial
- Ethernet on board
- serial I/O
- Control-area network (CAN) bus
- 3.3v digital logic, 40mA per digital pin with a total maximum of 400 mA
- analog and digital I/O pins
For a full description and data sheet, please visit: http://mbed.org/handbook/mbed-NXP-LPC1768.
Although a small project started by two ARM employees, the mbed has proven to be a worthy product to allow people of generally all skill levels access to powerful microcontrollers without a lot of the inherent complications. It does this in two ways:
Firstly, the hardware is very simple and designed for ease of use. The LPC1768 is mounted on a small board to convert it to a DIP format, making breadboard easy. The designers have also thought to include four blue LEDs for digital output and a nice large reset button. Interface with the PC is via USB. The mbed appears as a USB flash drive to your computer’s operating system, and compiled programs are downloaded as a single .bin file into the mbed.
Secondly, the development environment. Unlike other MCU products on the market, mbed is a completely online development environment. That is, in a manner very similar to cloud computing services such as Google Docs or Zoho Office. However there are some pros and cons of this method. The pros include not having to install any software on the PC – as long as you have a web browser and a USB port you should be fine; any new libraries or IDE updates are handled on the server leaving you to not worry about staying up to date; and the online environment can monitor and update your MCU firmware if necessary. However the cons are that you cannot work with your code off-line, and there may be some possible privacy issues. We will examine the online environment later on.
Preparing and using the mbed is incredibly simple. The designers have certainly exceeded their goal of providing a rapid prototyping environment. The process from opening the box to running your first program is (as always) quite simple.
The initial packaging is clear and inviting, and includes a getting started document, USB cable, a laminated hardware pinout card (very useful) and a bumper sticker (!):
The mbed unit itself is compact yet not too small:
The underside contains the USB interface and flash drive controllers:
The initial setup requires registration with the mbed online environment. This is done by plugging in your mbed to the USB, and visiting the web page URL stored in the mbed’s flash drive:
This will take you to the login page where you can create a new user profile:
The serial number of the mbed is recognised and linked to your user account. This means you do need to own an mbed to explore the depths of the online services available, and also serves to keep the mbed online ecosystem free of spammers and whatnot. After registration, you will be presented with the “getting started” page, which contains links to the function references, tutorials, FAQs, user forums, user-contributed content and more. All is revealed by exploring the links from this page.
After signing up, you can create a profile page which is public. This also contains tabs that contain notes, published (programs you make public) and libraries (that you have made public) Initially I thought the profile page would be private, or limited to other mbed owners, but this is not the case. From this page you can create notebook files, view your past activity and display published programs and libraries.
For example, I created a test notebook page and someone left a comment on it twenty minutes later. So be careful if you have some secrets – instead, you could cut and paste work to and from the IDE. However if you accidentally publish something it can be deleted, but remember that the internet is written in ink, not pencil.
However don’t let privacy worries put you off – just be careful not to write anything or publish programs you want to keep secret. Furthermore, as said earlier – having an online IDE has a few advantages – you don’t need to install anything on your PC apart from an up to date web browser. This means you can work on programs from other computers with ease. Bored at work? Using a locked-down hotel or school computer? You can still work on your mbed programs!
The openness of the mbed environment does create a positive, helpful environment similar to that found in the open-source community – there are many libraries that have been submitted that allow connection to various pieces of hardware such as LCD screens, bluetooth, Wii controllers, motors, servos, sensors and so on – as well as libraries for pachube, twitter, HTTP client and server access, and much more. These are found in the environment’s “Cookbook” section. If something interesting is on the market, there may very well be an mbed library to work with it.
The IDE is quite clear and straightforward. The program editor maintains colour-context, line numbering, support auto-formatting, and you can import or export code using the standard copy and paste keyboard shortcuts.
You can have multiple folders open at once, where each folder contains one program, the standard mbed function library and others you may have imported. Furthermore, there is also a very clear function reference for the standard mbed library available within the IDE – very useful. Programs are written in C++, and the online IDE takes care of everything – leaving you with only the .bin file to upload to the mbed. If you are new to programming or a little rusty with C++, books with unfortunate titles such as “C++ for Dummies” may prove useful.
You can also import libraries published by other mbed users into your own projects. Details of these published libraries (and programs) are listed in the mbed online environment. The speed of development is demonstrated very well in this video from the mbed team:
The support options are very good, including a members-only forum, loads of information, the Cookbook, a wiki for publishing user-contributed libraries and resources, and other FAQs and so on. If you have a question I am sure it could be answered very quickly. When it comes time to compile and run your program, after a successful compile your computer will download a single .bin file, which is then copied over to your mbed. Then by pressing the reset button on the mbed, the program is stored into the MCU and executed. You can store more than one .bin file on the mbed, however the latest file (by time stamp) is only executed.
Overall the mbed is a refreshingly-easy point of entry to microcontrollers. The ability to quickly prototype an idea into reality is really not difficult, and those with some C++ experience (or willing to learn) will make use of the mbed environment in no time at all. And if you decide to move your prototype into production, details and schematics are provided to help implement the nxp LPC1768 into your designs. Frankly, for fast prototyping at work, or just fun for anyone interested in electronics, the mbed offers a simple yet powerful way of getting things done.
The mbed board used in this review was a promotional consideration from RS. You can purchase an mbed directly from your local RS distributor.
In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
Latest posts by John Boxall (see all)
- Arduino Workshop – A Hands-On Introduction with 65 Projects - May 6, 2014
- Project Review – Silicon Chip Capacitance Substitution Box - April 23, 2014
- Add long-distance connectivity to your Arduino with the CATkit System - April 13, 2014