You are viewing an older revision! See the latest version

How to setup an mbed student laboratory

We have used mbed for two semesters at Georgia Tech in our undergraduate ECE 4180 Embedded Systems Design class instructional laboratory. The suggestions here are based on that experience. Here is a short checklist of what is needed for a typical student laboratory setup using mbed:

1. Mbed modules at around $59 each. Two students can easily share an mbed and lab setup as lab partners. The price is low enough that some students buy their own. Everyone would actually like to have their own, but it is not absolutely necessary.

2. Determine if you will use a commercial mbed baseboard or a standard solderless breadboard for your laboratory setups. See the cookbook pages on baseboards and solderless breadboards. Baseboards already have connections for many of the common I/O setups (i.e., network, USB, MicroSD card) but they are also a bit more difficult to use when adding custom hardware since they have a small at best prototyping area. There is also some pedagogical value in having students actually assemble the circuit on a breadboard. Most devices use serial interfaces, so there are not a large number of wires to hook up. Jumper wires disappear in a student laboratory, so get some spares. Often students have already used and may even have solderless breadboards from an earlier lab class. If you plan on using motors, servos, and other high current devices some external power supplies will be needed in the lab. Some low cost 5VDC output AC wall adapters can even be used for extra motor and servo power.

3. Get an interesting assortment of commercial breakout boards with connectors and I/O sensors and drivers for laboratory experiments. Most ICs are in surface mount packages these days, so having it mounted on a breakout board that plugs directly into a .1 inch breadboard really saves time and makes it easy. To see what is available and where to find it, see the tables in the Cookbook sections on IC sensor breakout boards and I/O connector breakout boards. The breakout boards will typically need header pins soldered to them once they arrive. Some decisions will be made here since there are quite a lot of I/O and device options. For our lab setup, we started with one breakout board for each interface type, so that students could have hands on lab experience with several of the more common I/O interfaces and device types commonly used in embedded designs (i.e., RS-232, I2C, SPI, Analog, USB, Ethernet, LCD text display, DC motor, MicroSD Card). If you pick a device that already has code examples posted in the Cookbook, students can use those to get up and running quickly. In our lab, students constantly use the Cookbook for code examples and the Handbook for API reference online in another browser window along with the compiler window.

4. Request a license code for each student in the class via email. These are free for schools, and it allows each student to access the cloud compiler and save their source files on the server. This is really the way to go; anything else will not work out as well.

5. If students are using lab PCs running windows, install the mbed virtual comm port driver on those PCs and have a terminal emulation program available on the PCs. Some schools lock down lab PCs for security, and if so you might need the computer support people with admin rights to install these for you. The rest of the software runs off the server in a web browser. The mbed module attaches just like a USB flash drive.

6. Many mbed projects will use networking. At some schools, the network is locked down for security and you may need to have the networking support people reserve and IP address or enable DHCP support for each mbed module. In our school’s network, only computers that have the NIC address registered in the DHCP server will be able obtain an IP address. The mbed’s NIC address is shown in the startup web page.

Ideas for Student Laboratory Assignments

The topics for laboratory work will vary significantly depending on the student’s background and the goals of each individual course. Our class was oriented to embedded systems design and it contained a mixture of EE, CmpE, and a few CS undergraduates. Students had previously taken a digital logic design class, introduction to computer architecture, and C/C++ programming. Each lab is two weeks for a total effort of around 6 hours. Students work in teams of two.

There are some reference books listed in the cookbook Book page. There is a free HTML electronic version of a popular C/C++ textbook available there. For students, the most useful references are likely to be the online Cookbook for code examples, the Handbook for mbed API library reference, and their C/C++ textbook. Many other resources are free online and available on the mbed website or via links there to the ARM, NXP, and KEIL websites. For people that decide to get down to the hardware level, the Cortex M3 textbook is useful to have available in the lab.

We started out with a basic introductory lab where students used mbed for digital I/O, used PWM to dim an LED, added an I/O port expander, and used power management to reduce power levels using C/C++ examples from the Cookbook. For extra credit, they could go back and use ARM assembly language instead of C/C++ for basic digital I/O LED blink demo. That made them appreciate the productivity gains using the C/C++ compiler and mbed’s I/O API support.

In the second laboratory experiment, students connected a number of different interfaces and devices by adapting the C/C++ cookbook code examples (i.e., RS-232, I2C, SPI, Analog in and out, USB, Ethernet, LCD text display, and DC motor) and demoed each one working to the TA on a breadboard. The mbed C/C++ I/O APIs really save some time here. In class, we were talking about different I/O interfaces, so the lab was a good fit with the lectures. There were very few software related issues to resolve. The cloud compiler with students keeping files on the server worked better than many of our internal use tools. Most problems occurred from students not wiring up all of the jumper wires correctly. After two introductory labs using mbed, we allowed students the freedom of a team design project where they could pick the idea (subject to instructor and TA approval and guidance regarding the scope of the project). It is surprising the array of different ideas that you will see, and they also are more motivated when working on their own idea.

They need to pick a topic early in the term to allow time for any custom parts that might have to be ordered to arrive. Supporting all of the different design projects will require a larger assortment of sensor, drivers, and breakout boards than a more structured lab. The good news is that all of the parts unplug and can be reused for next term minus the few that get smoked or lost. Surprisingly, so far with almost a hundred students no one has killed an mbed module. We did have a USB cable short out and lost a couple of breakout boards.

Examples of some of the design projects from the class can be found in the cookbook under Student Projects. A number of students have also chosen to use mbed again in their senior design project after taking the class.


All wikipages