Lab & Project
Labs and Projects
- Logistics and Policies
- Lab Content and Schedule
- Course Project Guidelines
- Cool Hardware
- Suggested Project Topics
The lab content of this course begins with some exercises designed for
students to gain some familiarity with programming embedded systems at
various levels of abstraction with varying amounts of infrastructure
support. It then progresses to team projects. Teams of three to five
students will be expected to develop a plan of action including a time line
and defined division of responsibilities, and then execute a project that
culminates in a demo session and a poster presentation.
Logistics and Policies
Lab Times: Mon 2-5pm, Wed 10 am - 1 pm, Wed 2-5 pm, and Thu 4-7 pm, in 204 Cory
IMPORTANT: Please read these
lab safety guidelines and lab policy.
Each lab will be graded according to the following rubric:
Pre-Lab - 10% - Must be completed before lab, handed in when you get to lab.
Lab Checkout - 45% - You have one week to complete the lab and show the TA.
Lab Writeup - 45% - Writeups are due exactly one week after lab.
Late pre-labs may be handed in during lab for half credit, no pre-labs will be accepted after lab session.
Late Checkout and Lab writeups will be deducted 10% for each day late. Late checkout does not extend your writeup deadline. The writeup is due a week after the scheduled lab date for each lab. You must notify the GSI at least 4 days in advance for any emergency or situation to extend the deadlines.
Lab Writeup Guideline
Lab Content and Schedule
Please prepare the prelab exercises
before your lab session begins.
AS OF FALL 2013
- Lab 1 (September 4, 2013): Interfacing with the WiiMote
Using LabVIEW, you will establish a Bluetooth connection
to a Nintendo WiiMote and send commands to the remote
to stream its accelerometer data back through the Bluetooth connection.
The goal of the lab is to interface with an embedded system, calibrate
and measure an accelerometer, and graph the results.
Lab Exercises: Section 2.1 (Interface to and Calibrate the WiiMote)
- Prelab Reading: Section 2.1.1
- Prelab Exercises: Section 2.1.2
- Lab Exercises: Section 2.1.3
- Lab 2 (September 11, 2013): Embedded Development Tools
Through the exercises in this lab, you will learn to use some common tools for programming embedded systems. The goal is to gain some familiarity with the tools by creating a basic "hello world" program using each of them. You will be introduced to the National Instruments myRIO, and you will learn how to program it using Eclipse, Xilinx SDK, and LabVIEW.
Lab Exercises: Chapter 3 (Embedded Development Tools) (all)
- Section 3.1 (Connect to and Configure myRIO)
- Prelab Reading: Section 3.1.1
- Prelab Exercises: Section 3.1.2
- Lab Exercises: Section 3.1.3
- Section 3.2 (Program MicroBlaze from Xilinx SDK)
- Prelab Reading: Section 3.2.1
- Prelab Exercises: Section 3.2.2
- Lab Exercises: Section 3.2.3
- Section 3.3 (Program the myRIO Processor from Eclipse)
- Prelab Reading: Section 3.3.1
- Prelab Exercises: Section 3.3.2
- Lab Exercises: Section 3.3.3
- Section 3.4 (Program the myRIO Processor from LabVIEW)
- Prelab Reading: Section 3.4.1
- Prelab Exercises: Section 3.4.2
- Lab Exercises: Section 3.4.3
- Lab 3 (September 18, 2013): Programming Embedded Systems
In this lab, you will program and debug "bare-metal" C code (code that executes in the absence of an operating system) and learn about the MicroBlaze soft-core processor. You will learn about interrupts and how to use them to generate tones, and you will learn how to configure an analog-to-digital converter (ADC) to sample an analog input.
Lab Exercises: Chapter 4 (Programming Embedded Systems) (all):
- Section 4.1 (Generate Tones in MicroBlaze)
- Prelab Reading: Section 4.1.1
- Prelab Exercises: Section 4.1.2
- Lab Exercises: Section 4.1.3
- Section 4.2 (Program an ADC in MicroBlaze)
- Prelab Reading: Section 4.2.1
- Prelab Exercises: Section 4.2.2
- Lab Exercises: Section 4.2.3
- Lab 4 (September 25, 2013): iRobot Navigation in C
This lab will introduce you to the iRobot Create platform. You will program a state machine that reads sensors and drives a robot with a basic sense of orientation while avoiding obstacles. The programming will be done in C using Eclipse on myRIO.
Lab Exercises: Section 5.1 (iRobot Navigation in C)
- Prelab Reading: Section 5.1.1
- Prelab Exercises: Section 5.1.2
- Lab Exercises: Section 5.1.3
- Lab 5 (October 2, 2013): iRobot Hill Climb in C
Using your results from the previous lab, you will implement a state machine that instructs the robot to navigate to the top of an incline while avoiding cliffs and obstacles. You will use feedback from the accelerometer to differentiate between an incline and level ground.
Lab Exercises: Section 5.2 (iRobot Hill Climb in C)
- Prelab Reading: Section 5.2.1
- Prelab Exercises: Section 5.2.2
- Lab Exercises: Section 5.2.3
- Lab 6 (October 9, 2013): Model-Based iRobot Navigation and Hill Climb
In this lab, you will recreate the previous two labs using a model-based approach. You will design a control algorithm using Statecharts in LabVIEW, verify it using a 3D physics simulator, and deploy the solution to the iRobot Create.
Lab Exercises: Section 5.3 and 5.4:
- Section 5.1 (Model-Based iRobot Navigation)
- Prelab Reading: Section 5.3.1
- Prelab Exercises: Section 5.3.2
- Lab Exercises: Section 5.3.3
- Section 5.2 (Model-Based iRobot Hill Climb)
- Prelab Reading: Section 5.4.1
- Prelab Exercises: Section 5.4.2
- Lab Exercises: Section 5.4.3
- Lab 7 (October 16, 2013): Project Management
Students will finalize project
teams and project definitions, construct a plan for the project with specific
milestones and assign responsibilities to project participants.
Lab Exercises: Section 7.1 (Project Management)
- Prelab Reading: Section 6.1.1
- Prelab Exercises: Section 6.1.2
- Lab Exercises: Section 6.1.3
Course Project Guidelines
Projects will be performed in teams of up to five students and should
be selected from the list of suggested projects given below. In exceptional circumstances, student
teams may propose projects that are not on this list. All projects
should include nontrivial applications of two or more of the following
key concepts in the course:
The project report (a poster presentation and demo) should make clear which
of the above key concepts are being addressed and how.
For example, a project that addresses the fourth and last bullet could focus
on code generation from high-level modal models, and demonstrate a design
environment based on LabVIEW or Ptolemy II for an embedded target.
- modeling of physical dynamics,
- reliable real-time behavior,
- modal behavior governed by FSMs coupled with formal analysis,
- real-time networks,
- simulation strategies, and
- design methodologies for embedded systems design.
Software platforms can be "bare iron," real-time operating systems,
embedded tools like LabVIEW Embedded or Simulink/Stateflow with Real-Time Workshop,
or standard operating systems such as Windows or Linux. Attention to design quality
and reliability and trustworthiness of the end product is essential.
For many of the projects, it is highly advised to identify a mentor (typically
a graduate student) who provides familiarity with the relevant hardware
A list of hardware available for student projects can be found here.
Each group should turn in a single 1-page charter for your project.
Recall that your charter should include:
- Major Deliverables
- Risk and Feasibility
Project Milestones and Schedule
Working backwards from the completion due date, determine when tasks need to be done to complete
the project on time. Ensure you are allowing adequate time for
debugging integrating disjoint components from several people can
take a week or more.
Be sure to consider events such as holidays,
Finals Week, etc.. Milestones should indicate which team member
is responsible and be no more than one week apart. Be sure to
include non-technical tasks such as practicing the presentation
or writing the report. Also include a plan to meet with your
mentor, preferably once a week (you may want to organize your
milestones to land on these dates).
Do not hesitate to be painfully specific. Through the rest of
the semester, you will be submitting milestone reports to track
your progress in completing these milestones and discussing your
milestones with your mentor. Certainly, the milestones could
change during the course of the project as you learn and debug
Guidelines for Project Presentations:
- This year's presentations will include slides and a demo. All
presentations will be videotaped.
- You will have 20 minutes for your presentation and demo (make sure to leave additional time for questions).
It's very important to finish on time. Practice your presentation several times.
- Topics to cover:
- Overview of the project and your approach
- Hardware/software platform and tools used
- Main technical challenges -- in design or implementation -- and how you tackled them.
Focus on the top 3, at most one slide on each. Include any cool algorithms or
design insights that you came up with.
- Demo -- could be interleaved with the presentation or performed right after
- Finish with a 1-slide summary: what did you achieve, what more can be done?
Guidelines for Project Reports:
- One report per team. Hard deadline: TBD. Submit on bSpace.
- Recommended length: 5-10 pages, use at least 11 pt font
- Topics to cover:
- Introduction & Problem Definition
- Outline of your Approach and how it compares to existing projects
- Algorithms and Formal Models used
- Major Technical Challenges in the Design/Implementation and how you tackled them
- Summary of Results -- what worked, what didn't, why, ideas for future work
- A one-paragraph narrative on the roles each team member played in the project
- How the project applied 2 or more of the key concepts from the course.
- Feedback: List of topics covered in class that came in handy; any topics that weren't covered that would have been useful
- Illustrate algorithms and models with diagrams, include pictures of your hardware, screenshots, etc.
- Keep the report short and precise; avoid lengthy and verbose descriptions!
- You must submit your Peer Evaluation Form to the GSIs in person, or on bSpace electronically.
The following list of devices is meant to inspire project ideas.
Some of these we have access to already, and some, if reasonably priced,
we would consider buying.
Suggested Project Topics
Below is a list of suggested projects. This list
will grow until it is time to pick projects. If you want to
pursue a project outside of the list, please see the instructors.
- RESTful Bridge
The goal of this project is to design a device that serves as a fairly generic bridge
between an embedded system and a web-based controller. One approach described in a recent
paper, Valenzuela, et al., uses a custom-built board. We believe that an
off-the-shelf board such as the UDOO board, which runs Linux or Android, would be sufficient (we have two of
these boards available). A part of the challenge would be to choose one or more test cases,
controlling devices that have standardized industrial interfaces such as I2C or CAN.
- Real-Time Music Improvisation
Mentors: Ilge Akkaya and Alex Donze.
The goal of this project is to design a system that can generate, in real time, an improvisation
of an initially provided melody that (i) satisfies certain musical constraints (specified formally using automata),
and (ii) is different from the initial melody within bounds. The project will build upon some initial work
on offline improvisation performed as part of the TerraSwarm Research Center.
The project is expected to focus on jazz melodies, but this is flexible. No prior background in music is
required, however, some would be useful. An additional angle could be included by distributing
musicians playing different instruments over a network; this could require fine-grained time synchronization
of clocks. The project could build towards a final demo
of on-the-fly improvisation to a tune played by one or more human and computer musicians, distributed
over a network.
- Bluetooth Low Energy Cloud
Mentor: Mozzi Etemadi (mozzi at berkeley.edu), Post-doc for Bjoern Hartmann (bjoern at eecs.berkeley.edu).
Description: Bluetooth Low Energy (BLE), aka Bluetooth SMART or Bluetooth 4.0, provides an inexpensive and very low power wireless connection for embedded systems. BLE can potentially enable the "internet of things" because many internet connected devices exist that already support it (Windows 8 machines, iPhones, and now new Android phones). The key is creating a meaningful, usable way for firmware developers (developing BLE-enabled devices) to access internet resources as well as expose device functionality (i.e. sensor data) to the internet. Professor Hartmann's group, in collaboration with UCSF, is creating such a platform that, at present, is targeted at generating a suite of wireless medical devices for use in non-invasive physiologic monitoring scenarios. Interested students can work on a particular medical device or assist with broader platform development.
- 3-D LED interactive display
The goal of this project is to design and build a 3-D array of LEDs, mounted for example
on plexiglass sheets, that reacts to motion around it. For example, as objects approach it,
it might react with waves of light that propagate through the display. An example of such
a project can be seen in this YouTube video.
- Semantic localization
Mentor: Hokeun Kim.
This project addresses the problem of indoor localization, but rather than
trying to identify where in 3-D space a person or object is, it will identify
what room they are in. The strategy will be to put an ultrasonic emitter in
each room that emits a different signature, and then to use the microphone
on a smartphone or other audio pickup device to distinguish the signatures.
This could possibly be augmented using accelerometer data to estimate
position within a room, as done in the
ACComplice project from CMU, or to use accelerometer data to determine
when the person is "on the move" and may be moving from one room to another.
- Home Alarm System
Mentor: Christopher Brooks.
There are various home alarm systems out there. Most of them require an expensive monthly service. Kickstarter and other services have systems like:
Canary (http://www.indiegogo.com/projects/canary-the-first-smart-home-security-device-for-everyone) and
Ube (http://cocoontech.com/forums/page/index.html/_/news/ube-moves-wifi-multi-touch-smart-switch-campaig-r740). Lifeshield is another service. Honeywell has products.
The project is to develop a range of sensors that communicate via X10, wifi or Bluetooth LE to a base station that will store data (images etc.) and email information about events. The sensors would include simple sensors like detecting the sound of smoke alarms, detecting broken glass, heat and smoke detection, window/door opening sensors (Hall effect), motion detectors (sonar) and image grabbers. The challenge is to do this as inexpensively as possible with extreme battery efficiency. A key component would be to address various attacks on the system. For example, what happens if the phone, cable and power lines are cut? (could the system roll over to the neighbors wifi? What about using a cheap Tracphone (with no dataplan) and a speaker to call my number) What happens if the alarm system itself is stolen? The system must not require a fixed IP address. Bonus points for demonstrating a platform with a large range of whimsical, low-cost sensors. For example, cheap detection of a raccoon through the cat door? Cheap breathalyzer at the front door? The system should be extensible. There should be a way to disable the system for privacy reasons. Bonus points for developing a system to text messages using the cheapest possible Tracphone via robot fingers.
What you will learn from this is includes: how to filter data (anomaly detection), Bluetooth LE, power management, cost management, human factors.
Mentor: Dorsa Sadigh
Imagine a restaurant where the waiters are robots. What would it take
to implement this? Here are some of the things that might be involved:
(i) perform motion path planning to navigate between the kitchen and tables where customers are sitting;
(ii) obey high-level commands from a customer like "Bring me Menu Item A", expressed in structured
English or a more formal specification language;
(iii) respond to dynamically-changing specifications (customer cancels an order, waiter is hailed by
another customer while navigating to the kitchen, etc.);
(iv) pick up possibly delicate objects --- cups and plates --- place them on a "tray" and navigate between
obstacles to "safely" reach the kitchen, and
(v) optimize the distance traverse or time taken or energy consumed in meeting requirements.
This project will cover several concepts from the class, including
modeling, formal specifications, controller synthesis, real-time behavior, etc.
Some subset of the above requirements can be performed. The project can be performed
with iRobot Creates or with other platforms such as Lego Mindstorms/NXTs.
- Wearable Fall Detector
This project will use accelerometers and/or gyros attached to clothing
to detect when a person has fallen. Key to this project is to learn
the character of the sensor data that indicates a fall and to network
multiple sensors together to aggregate their data and to report
- Model-Based Design of Motion Control Systems
This project would enter into a design contest
being conducted by Advanced Motion Controls, a leading maker of motion control
systems, that has a due date for Phase I of Dec. 7, and a
proposal deadline of Sept. 28. The project is defined as a
simulation-only project, which is not quite suitable for a class project
for this course, but we have begun negotiations with the company to obtain
hardware prior to their Phase II so that the project can include some
- Improved Microblaze Interaction
This project will focus on the interaction between the PowerPC and the
Microblaze to provide more convenient development and debugging of
real-time embedded code.
- Robot Following
This project develop a mechanism for a robot to follow a beacon.
In addition to the lab iRobot platform, the project should consider other
low-cost alternatives such as the
- Gesture Mimicking
This project will use the Xbox Kinect to recognize gestures, and then mimick those gestures in
Bioloid robots under the
control of a microcontroller.
- Pipeless Chemical Plant
This project will develop a small pipeless chemical plant, like
that described by the Multiform Project at TU Dortmund. In such a chemical plant,
instead of moving material around in pipes, material is moved around in vessels carried by robots.
- Sound Source Localization using Distributed Real-Time Platforms
Mentor: Michael Zimmer.
This project will involve determining the location of an acoustical
source using an array of precisely positioned microphones on
distributed platforms. A gunfire detection system like
ShotSpotter (currently deployed in Oakland) is an example application.
A platform consists of a
Renesas SH7216 microcontroller
equipped with a microphone and a floating-point unit for any required
signal processing. The distributed platforms will form a small
time-synchronized network that enables simultaneous sampling of sound
on all microcontrollers.
an implementation of the
IEEE 1588, will be used for clock
synchronization. This project involves real-time programming in C
without an operating system.
- Quadrotor Control
This project will use the Parrot AR Drone
quadrotor aircraft in combination with the lab infrared localization
infrastructure to achieve precise and safe maneuvers within a confined area.
- Real-time Interactive Multimedia
Mentor: Dai Bui
The main idea of the project is to use multiple monitors to display large
video computer graphics. The main challenge is to synchronize the
pictures between displays to minimize the jitter between and create a
smooth picture, while also making sure that the sound and video stay
A small example application with two cell phones can be
Another aspect of this project could be interfacing the display system
with human input using Kinect.