Design Through the Curriculum on Embedded Systems

Dec10-02

Final Report

Client:

Computer Engineering Department

Advisors:

Dr. Akhilesh Tyagi & Jason Boyd

Members:

Aisha Grieme

Jeffrey Melvin

Dane Seaberg

Date:

December 6,2010

Contents

Contents

List of Figures

List of Tables

List of Definitions

Executive Summary

Acknowledgements

1.Problem Statement

2.Solution Approach

2.1.Concept Diagram

3.Operating Environment

4.Intended Use and Users

5.Assumptions and Limitations

5.1.Assumptions

5.2.Limitations

6.End Product and Deliverables

6.1.Robot

6.2.Project Tasks

6.3.Student Documentation

6.4.TA Documentation

6.5.Demonstration

7.Approach Used

7.1.Design Objectives

7.2.Functional Requirements

7.3.Design Constraints

7.4.Technical Approach Considerations and Results

7.5.Testing Approach Considerations

7.6.Recommendations for Project Continuation or Modification

8.Detailed Design

8.1.Course Design

8.2.Hardware and Software

8.3.Testing

8.4.Documentation

9.Resource Requirement

9.1.Team Effort Requirements

9.2.Required Resources

9.3.Financial Requirements

10.Schedule

11.Project Team Information

11.1.Client

11.2.Advisors

11.3.Members

12.Closing Summary

13.References

Appendix A - Course Descriptions of the Core Curriculum

CprE 491 Operations Manual

List of Figures

Figure 1: Conceptual view of sample design threads from Adept Proposal

Figure 2 Concept Diagram

Figure 3 Team Effort Requirements

Figure 4 Spring Schedule

Figure 5 Fall Estimated Schedule

Figure 6 Fall Actual Schedule

List of Tables

Table 1 Course Topic Implementation

Table 2 System Considerations

Table 3 Course Topics

List of Definitions

ADEPT- Applied Design of Practical Technology in the Computer Engineering Curriculum

Com S - Computer Science

Cpr E - Computer Engineering

Cpr E 286X - This is the title for the first term course that the Design Through Curriculum on Embedded Systems senior design team is designing. This course is designed to be taken during the second semester of a Computer/Electrical Engineering student's sophomore year.

Cpr E 386X - This is the title for the second term course that the Design Through Curriculum on Embedded Systems senior design team is designing. This course is designed to be taken during the second semester of a Computer/Electrical Engineering student's junior year.

E E - Electrical Engineering

Phase I – This term is used to encompass the work done by Senior Design Team Dec0911, and describes any concepts and proposals provided by as part of their project.

Executive Summary

In response to the client’s request to expand on the sophomore level learning module in the Department of Computer Engineering of Iowa State University by creating a junior level learning module, we are continuing with the “build your own robot” project. It is intended to be a one credit design course for students wishing to gain experience in the application of concepts from multiple courses from the junior level curriculum.

With the versatility and hands on natureof robotics,it would serve as a basis for the course. We willexpand it to include task management and basic scheduling, shared variable and resource management, and inter-robot communication.These requirements will be applied to a final coordinated task between two or more teams, with each team consisting of or robot.

The system that we designed for this class will utilize an Atmel Atmega128 microprocessor, Femto OS preemptive RTOS, and a windows machine. Each robot is equipped with a Bluetooth Adapter Module allowing for serial communication. Robots will use serial communication through the windows machine to coordinate a task chosen by the team of students.

The goal of the lab-based course is for two teams of approximately four students each to program a set of robots which will complete a coordinated task. The task will involve synchronized movements and decisions, using sounds to help demonstrate the robots communications and synchronization. The students could choose between several ways of meeting these requirements and are encouraged to develop their own solution.

Our solution consisted of two parts: a shell and an autonomous communication between the two robots. We have a shell to allow for user interaction with the operating system, which has capabilities to read and edit files, view all processes and their current states, and starting autonomous communication between two robots. The communication involves the robots moving around synchronously and each one playing part of a song. Timing is enforced because the robots need to move together, and the song needs to play close to continuously.

We discovered that although we could complete the project with the originally proposed Vex platform, it would not meet the requirement of having an operating system. After discussing this issue with client, we decided that it was more important to meet those requirements and endure asetback than to continue on the current course. For these reasons, this document will discuss some of the changes from the original design and the steps completed in order to implement a new design.

Acknowledgements

This project is phase II of an ongoing goal to create a series of computer engineering courses. Our team would like to acknowledge Senior Design Team Dec0911, including Jacqueline Bannister,Luke Harvey, Jacob Holen, and Jordan Petersen for the work they completed in phase I and the documentation they provided us to continue their work.

1.Problem Statement

Students in computer engineering study a wide array of topics, covering embedded systems, computer architecture, and software systems. Since the department tries to prepare its students for all areas, students must take a variety of core classes which covers the main areas of computer engineering. However, the department finds that a number of students struggle to see the application of what they learn and how all the field of computer engineering work together. This issue results from the core classes not connecting to the other areas of computer engineering. The lack of seeing real world application causes students to lose motivation, ultimately resulting in being less competitive in the job market.

For this project, the goal is to create a system to be used in the Embedded SystemsDesign Thread of the ADEPT Proposal by developing a system that can meet the junior level course needs: task management and scheduling for coordination and control. The system should also utilize as much of the junior level curriculum as possible to help the students gain hands on experience with a project that integrates the coursework they have completed.

Figure 1: Conceptual view of sample design threads from ADEPT Proposal

2.Solution Approach

Continuing with the inquiry-based learning course model, the junior level will motivate students to: learn new material, provide alternate learning methodologies to address different learning styles, increase the design experience in the Computer Engineering program and motivate students to create a community of learners focused around problem solving. This course will be one credit design lab, where students will be given the opportunity to use the skills they have gained so far in the classroom, and apply them to a design project in cooperative teams.

In addition to the basic courses taken freshmen and sophomore years that lay the foundation, the project will challenge the students on topics covered in a typical junior year. See Figure 2for more on the prerequisites of the sophomore level course. The following is a list of courses and topics that could be addressed in this course.

1 / Dec – 1002Project Plan

E E 230. Electronic Circuits and Systems

1 / Dec – 1002Project Plan
  • A/D and D/A converters
  • Op Amps
  • Transistors
  • Electronic Circuit Design Labs

1 / Dec – 1002Project Plan

Cpr E 381. Computer Organization and Assembly Level Programming

1 / Dec – 1002Project Plan
  • Computer Organization
  • Instruction Set Design
  • Assembly Programming
  • Processor Design
  • Memory I/O Subsystems

1 / Dec – 1002Project Plan

Cpr E 310. Theoretical Foundations of Computer Engineering

1 / Dec – 1002Project Plan
  • Propositional logic
  • Proofs
  • Counting and probability
  • Trees and graphs
  • Mathematical applications in Computer Engineering

1 / Dec – 1002Project Plan

Com S 309. Software Development Practices

1 / Dec – 1002Project Plan
  • Software development management
  • Process models
  • Requirements
  • Coding, testing, maintenance, and scheduling
  • Large Scale Software Project

1 / Dec – 1002Project Plan

Cpr E 308. Operating Systems: Principles and Practice

1 / Dec – 1002Project Plan
  • Multi-Threading
  • Processes
  • Memory Management
  • File Systems
  • I/O
  • Linux Experience

1 / Dec – 1002Project Plan

Com S 311. Design and Analysis of Algorithms

1 / Dec – 1002Project Plan
  • Algorithm design and analysis
  • Sorting, Searching, and Graphs
  • Dynamic programming and greedy algorithms
  • Run time analysis
  • Data structure

1 / Dec – 1002Project Plan

The due to the time constraints of this course, we had to choose the course topics to focus on, while leaving the project open for expansion to cover other topics as needed in the future. Table 1 shows which topics were implemented and the courses that they are introduced to the students in.

Table 1 Course Topic Implementation

COURSE / TOPIC / IMPLEMENTATION
Cpr E 381 / Computer Organization / Students will need to manage the configuration of the system, and what components are turned on
Cpr E 308 / Task and Memory Management / Limited memory, multi tasking system
Cpr E 308 / File Systems / Project implements a file system on the operating system
Cpr E 308 / Scheduling / Tasks require Scheduling
Cpr E 308 / I/O / Program on robot must handle incoming data as well as output to computer and other robot
Cpr E 288 / Embedded System Programming / Basic Requirement, the project is on embedded platform
Com S 311 / Algorithm Design / Students will need to create an algorithm for the robots to complete the task in a timely manor
ComS 309 / Software Design Process / Students will develop a process plan and schedule
ComS 309 / Version Control / Students will use subversion to control code changes

2.1.Concept Diagram

Figure 2 Concept Diagram

3.Operating Environment

Students in the proposed labs will work in the embedded systems computer lab. This is a clean lab with regulated temperature, and is enclosed from the outside environment. The lab has capacity for about 20 students, and they will be working in teams of two to fouron the robots. The robots will always stay in the lab and move around on the floor, which gets cleaned when a significant amount of dirt is present.

4.Intended Use and Users

The system is intended to be used in a Design Through Curriculum on Embedded Systems lab-based course. Students will program the system and take advantage of the operating system features to complete a coordinated task between two robots. The purpose of which, is to experience an application of concepts from multiple junior level Computer Engineering curriculum courses.

The system will be used by students enrolled in the CprE 386X course. TAs will also us the system in order to be familiar with the tasks the students must complete.

5.Assumptions and Limitations

5.1.Assumptions

5.1.1.Students will be working in groups of two to four and teams will be made up of two groups, one for each robot

5.1.2.The class size will not exceed the capacity of the lab and enough robots will be available for each group

5.1.3.The student will have taken CprE 288, 310, 381, EE 230, ComS 228, 311 and 309.

5.2.Limitations

5.2.1.There is a cost associated with the robot hardware and programming hardware

5.2.2.The platform must support and process scheduling

5.2.3.The robot must be standardized for each team

5.2.4.Learning and implementing the system in seven weeksmust be an attainable goal

6.End Product and Deliverables

6.1.Robot

The robot will contain all the necessary hardware for the students. The original design was based on the VEX PIC18F microcontroller with the hardware bundle and the SalvoOS. However, we discovered this Vex platform did not meet the requirement to have an operating system. After discussing this issue with client, we decided to research and find a new option. Table 2 lists the considered options.

The system that we designed for this class will utilize a Cerebot II breakout board, with an Atmel Atmega128 microprocessor, mounted in an iRobot Create. The real time operating system chosen for the system is Femto OS. Each robot is equipped with a Bluetooth Adapter Module and can be connected to a Bluetooth enabled computer with a program to handle communication from the user to the robots and the communication between the two robots.

6.2.Project Tasks

6.2.1 Synchronization Tasks

Each group of students will be required to work with another group to have two robots that perform a coordinated choreography to music, which must be played synchronously between the two robots. Students are allowed to choose what movements the robots perform, as well as the music the robots move in synchronization with.

6.2.2 Communication

The two robots will communicate with each other through a program, written by the students, running on a windows system. The program will connect to COM ports to send and receive data to each robot across a serial Bluetooth connection. The program should also be able to take input from the user according to the documentation provided to the students. The student teams have discretion when determining which programming language to use to complete this task.

6.3.Student Documentation

Documentation defining the project for the students will be provided to aid them in completing the project. It will include a project requirements description and introductory materials for the robot and software. The documentation will allow for students to quickly gain a basic understanding of the tools they will be using to complete the project, and how they can used to do so. To not overwhelm the students and keep them on track during the semester, the documentation will be divided into weekly plans, which will allow them implement the project piece by piece.

6.4.TA Documentation

Documentation defining the project for the teaching assistants will be provided to aid them in guiding the students and evaluating their implementations. TAs will also develop enough knowledge to help students taking the course, by having completed the project themselves, to answer students questions and help them with any problems they encounter. The documentation will explain how to set up the system for the evaluation.

6.5.Demonstration

A demonstration will be completed to show one possible solution to meet the task requirements. Because students are given the choice in movements and music, there are many ways to complete the required tasks.

7.Approach Used

7.1.Design Objectives

To ensure that the students taking this course finish with a better understanding of how the concepts learned in core classes relate to each other, we will make the project involve specific topics from junior level classes, with emphasis on embedded systems, operating system principles, and algorithm design. To add to the real-world approach, students will work in teams to complete the project.

The objective of our design is to give students a project that incorporates as many of the junior level curriculum course concepts as possible. This project will then help the students to see how the courses combine together to make up their field of study. See Table 1: Course Topic Implementation for information on the specific topics implemented and the courses they are introduced in.

7.2.Functional Requirements

7.2.1.The project will show students how to apply concepts learned in other classes.

7.2.2.The course must be able to be reused for several semesters.

7.2.3.The course will be based on CprE 308 (Operating Systems: Principles & Practice) and Com S 311(Algorithm Design) and will utilize multiple tasks with priorities, file management, algorithms, and communication.

7.3.Design Constraints

7.3.1.The system platform must support threading, inter-process communication, and scheduling modification. A key difference between the junior and sophomore lab is the incorporation of operating system conceptsand algorithm design.

7.3.2.Learning the hardware and programming interface cannot be too time consuming. The course is only seven weeks and is intended to focus on embedded programming. A large learning curve associated with the platform wastes time for student development.

7.4.Technical Approach Considerations and Results

Three different platforms were originally under consideration for the students to be using to complete the course. The first one considered was the National Instruments cRIO, as that is the platform used in phase 1 for the sophomore course. The second one, the Vex Pro ARM9 microcontroller, was suggested by our advisor after showing the Vex competition game to give ideas. The third choice was the Vex PIC microcontroller V0.5, which is the standard platform used by Vex in their competition.

After discovering the Vex microcontroller was not a viable solution, we began considering new alternative options. The following three platforms were evaluated for usability in our project: Arduino Mega, Bug Labs BUGbase, and Digilent Inc Cerebot II.

Table 2 System Considerations

Board / Micro controller / Operating System / File System / Threads / Tasks / RT Priority Shift / Mutexes / Free
VEX Robotics: PIC / PICmicro / SalvoOS / ? / Yes / Yes / ? / ? / No
Bug Labs: Bugbase / ARM Cortex A-8 / Poky Linux / Yes / ? / Yes / ? / ? / Yes
Arduino: Mega / Atmega1280 / DuniOS / No / No / Yes / Yes / Yes / Yes
Digilent Inc: Cerebot II / Atmega128 / FemtoOS / Yes / No / Yes / Yes / Yes / Yes

7.4.1.Project Design Considerations

We originally planned on using the Vex arena and having the students implement a soccer-like game. However, due to not using the Vex system, we changed the project that the students will complete to something more open-ended. They are required to implement a project that incorporates communication and synchronized actions between two robots, filesystem interaction, multiple tasks (processes), and algorithm design. As long as they show that these topics are covered, the design of the project is up to the students

7.4.3. Platform Considerations

Having originally planned on using the Vex system, we discovered that the platform was not open and would not allow use of another operating system or non-Vex parts. The Compact RIO was still not an option because we never heard back from National Instruments about opening up some functionality of VxWorks. The Vex Pro still has no release date, which would make acquiring one for our project infeasible. Another option considered was the Bug Labs BUGbasem which has an emulator for the system. However, the emulator lacks adequate functionality for our purposes, and the physical system is not yet available. The iRobot was a viable option because we found an OS that has needed functionality and we already have one to get started working right away. Taking all of these into consideration, we ended up choosing the iRobot for our project because students would already be familiar with the hardware after having taken the sophomore embedded systems course. Faculty and TAs would also be more familiar with the hardware, and there would be a base of code for interfacing with the hardware.