Tag Archive | "learning"

Initial review: mbed LPC1768 Development Board

In this article we review the mbed NXP LPC1768 development board and the mbed system in general.

Introduction

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
  • I2C
  • Ethernet on board
  • SPI
  • 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 (!):

1

 

The mbed unit itself is compact yet not too small:

2

The underside contains the USB interface and flash drive controllers:

3

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:

4

This will take you to the login page where you can create a new user profile:

5

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.

6

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.

7

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 twitterGoogle+, 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.

Posted in learning electronics, lesson, LPC1768, mbed, microcontrollers, product review, review, tronixstuff, tutorialComments (10)

Kit review – Sparkfun Function Generator

Hello readers

[10/09/2011 Update – It would seem that this kit has been discontinued – most likely due to the unavailability of the XR2206 function generator IC – which is a damn shame as it was a great kit. If you are ‘feeling lucky’ eBay seems to have a flood of them. Purchase at your own risk!]

Time for another kit review (anything to take the heat off from the kid-e-log!). Today we will examine the Sparkfun Function Generator kit. This is based from an original design by Nuxie and has now been given a nice thick red PCB and layout redesign. Although quite a bare-bones kit, it can provide us with the following functions:

  • sine waves
  • triangle waves
  • a 5V square wave with adjustable frequency

There are two frequency ranges to choose from, either 15~4544Hz or 4.1~659.87kHz. Your experience may vary, as these values will vary depending on the individual tolerance of your components.  The coarse and fine adjustment potentiometers do a reasonable job of adjustment, however if you were really specific perhaps a multi-turn pot could be used for the fine adjustment. With the use of a frequency counter one could calibrate this quite well.

The maximum amplitude of the sine and triangle waves is 12V peak to peak, and doing so requires a DC power supply of between 14~22 volts (it could be higher, up to 30 volts – however the included capacitors are only rated for 25V). However if you just need the 5V square-wave, or a lower amplitude, a lesser supply voltage such as 9 volts can be substituted. After running the generator from a 20V supply, the 7812 regulator started to become quite warm – a heatsink would be required for extended use. The main brains of the generator are held by the Exar XR2206 monolithic function generator IC – please see the detailed data sheet for more information.

Now what do you get? Not much, just the bare minimum once more. Everything you need and nothing you don’t …

bagpartsss

Upon turfing out the parts we are presented with:

thepartsss

Not a bad bill of materials – nice to see a DC socket for use with a plug-pack. Considering the XR2206 is somewhat expensive and rare here in the relative antipodes, an IC socket would be nice – however I have learned to just shut up and keep my own range in stock now instead of complaining. Having 5% tolerance resistors took me as a surprise at first, but considering that the kit is not really laboratory-precision equipment the tolerance should be fine. One could always measure the output and make a panel up later on.

Once again, I am impressed with the PCB from Sparkfun. Thick, heavy, a good solder mask and descriptive silk-screen:

pcbss

Which is necessary as there aren’t any instructions with the kit nor much on the Sparkfun website. The original Nuxie site does have a bit of a walk through if you like to read about things before making them. Finally, some resistors and capacitors included are so small, a decent multimeter will be necessary to read them (or at least a good magnifying glass!).

Construction was very simple, starting with the low-profile components such as resistors and capacitors:

resiscapsss

followed by the switches, terminal blocks, IC sockets and the ICs:

icsss

and finally the potentiometers:

potsss

The easiest way to solder in the pots while keeping them in line was to turn the board upside down, resting on the pots. They balance nicely and allow a quick and easy soldering job. At this point the function generator is now ready to go – after the addition of some spacers to elevate it from the bench when in use:

finishedss

Now for the obligatory demonstration video. Once again, the CRO is not in the best condition, but I hope you get the idea…


Although a very simple, barebones-style of kit (in a similar method to the JYETech Capacitance meter) this function generator will quickly knock out some functions in a hurry and at a decent price. A good kit for those who are learning to solder, perhaps a great next step from a TV-B-Gone or Simon kit. And for the more advanced among us, this kit is licensed under Creative Commons attribution+share-alike, and the full Eagle design files are available for download – so perhaps make your own? High resolution images are available on flickr.

[Note – The kit was purchased by myself personally and reviewed without notifying the manufacturer or retailer]

 In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, 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.

Posted in education, kit review, KIT-10015, learning electronics, oscilloscope, test equipment, XR2206Comments (0)

Welcome to t r o n i x s t u f f

Welcome to the tronixstuff website.

Posted in about


Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

Für unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: