Embedded Computing in Electromechanical Systems ME/EE 477 and MME 577

a syllabus

Course description

This course is an introduction to microprocessor-based measurement and control of electrical, mechanical, and electromechanical systems. Topics include microprocessor architecture, computer memory, C programming, hardware and software interfaces, and communications. Emphasis is placed on hardware and software interface design for real-time measurement, control, and user interface.

The course is designed for the Embedded Computing Laboratory, which is described in Resource 1 of Embedded Computing. Note that this course was developed in collaboration with Professor Joseph L. Garbini, who teaches a similar course at the University of Washington.

General information

Office Hours (CH 103C)
MF 1–2
Office Hours (Zoom, password sent separately)
W 1:30–4:30
Office location
CH 103C
Location
Harned 213
Times
W 2:00–4:50
Website
ricopic.one/courses/me577_2020S
Moodle
Moodle

secrets

(KR) Any introduction to the C programming language. For example, Kernighan, B. W. and Ritchie, D. M., The C Programming Language. Prentice Hall, 2nd Ed. 1988.

(PH) Patterson, David A. and Hennessy, John L. Computer Organization and Design: The Hardware Software Interface ARM Edition. Morgan Kaufmann Publishers, 2016.

(RW) Derek Rowell and David N. Wormley. System Dynamics: An Introduction. Prentice Hall, 1997.

(Ni) Norman S. Nise. Control Systems Engineering. Seventh Edition. Wiley, 2015.

Homebrew text and notes

A partial texts (with fill-ins) I’m writing will be posted on the Embedded Computing (EC) page.

They are being constantly updated, but I will let everyone know via Slack when each lecture is ready to be printed. Please print each lecture before class and bring it. There are fill-ins and such.

Throughout the semester, you should be ready to show these (current) in any class, with threat of a 5% lab report grade deduction for that week.

Schedule

The following schedule is tentative.

day lectures week reading due
Course introduction
Lecture 00.01 Introduction to embedded computing
Lecture 00.02 Embedded control
Lecture 00.03 Computer architectures
Lecture 00.04 Numeral systems
Lecture 00.05 Binary and hexadecimal arithmetic
Resource 1: High-level embedded system
Resource 2: Embedded system intro
Resource 7: Setting up the dev environment
Lab Exercise 00 Getting started
1 C text
Lecture 01.01 Memory
Lecture 01.02/3 Processing
Lab Exercise 01.1 C and high-level io drivers
Lab Exercise 01.2
Lab Exercise 01.3
Lab Exercise 01.4
2 C text Lab 00
Ass 01
Lecture 02.01 A paper computer
Lecture 02.02 C—operator precedence and associativity
Lecture 02.03 Exploring C—compile-time integral constants
Lecture 02.04 Exploring C—pointers
Lab Exercise 02 Keypad mid-level primitives
3 C text Lab 01
Lecture 03.01 Data transmission
Lecture 03.02 UARTs
Lecture 03.03 Exploring C—structures
Lecture 03.04 Exploring C—multi-dimensional arrays
Lecture 03.05 Exploring C—custom data types
Lab Exercise 03 Low-level character io
4 C text Lab 02
Lecture 04.01 Digital signals
Lecture 04.02 Pulse-width modulation
Lecture 04.03 Motor driving
Lecture 04.04 Measuring motor position and velocity
Lecture 04.05 Finite state machines
Lab Exercise 04: Parallel io and control
5 Lab 03
Lab day 6 Ass. 2
Lecture 05.01 Threads
Lecture 05.02 Interrupts
Lecture 05.03 Boolean algebra on digital signals
Lecture 05.04 Debouncing switches
Lab Exercise 05 Introduction to interrupts
7 Lab 04
Lab day 8
Lecture 06.01 ADC and DAC
Lecture 06.02 Discrete dynamic systems
Lecture 06.03 Discrete transfer functions
Lecture 06.04 Biquad cascade transfer functions
Lecture 06.05 Timer interrupts
Lab Exercise 06 Transfer function generator
9 Lab 05
Lab day 10
Lecture 07.01 DC motor velocity control
Lecture 07.02 Designing a PI controller
Lab Exercise 07 DC motor PI velocity control
11 Lab 06
Lab day 12
Lecture 08.01 Path planning
Lecture 08.02 Designing a PID controller
Lab Exercise 08 DC motor PID position control
13 Lab 07
Lab day 14
Presentations 15 Lab 08

Laboratory exercises and reports

For each laboratory exercise listed in the schedule, perform the following tasks.

Assignments

Assignment #1

Assignment #2

Video lectures

Most lectures will be available online on my YouTube channel. I recommend subscribing and familiarizing yourself with the playlist for this course.

Resources

Class resources will be posted here throughout the semester.

Slack

Everyone is required to join the messaging service called “Slack.” We’ll use it to communicate with each other during the semester. The Slack team you need to join is called drrico. That’s a signup link. Be sure to join the channel #577-general-2020.

Graduate student responsibilities

Graduate students have three additional responsibilities: (1) perform a literature search to understand an aspect of each laboratory exercise in greater depth; (2) as part of the introduction to each laboratory report (should be about a page in the standard format), summarize your research, citing least three academic sources; and (3) at the end of the semester, present a detailed description of an application of embedded computing, focusing on the embedded computing aspect of the application.

For resources pertaining to (1), see my Academic Literature Searching Tutorial.

Laboratory policies

A laboratory report will be due on Monday after the week it is due on the schedule. These reports will be submitted via Moodle and must be in accordance with the requirements provided here.

Laboratory procedures should be performed individually, although collaboration is encouraged. That is, discussions of how to accomplish aspects of the lab are great, but everyone should write their own code.

Laboratory reports should also be prepared individually.

Homework, quiz, & exam policies

Homework & homework quiz policies

When assigned, homework assignments should be completed by the Monday after the week it is due on the schedule. There will be a quiz over the assignment on Moodle.

Working in groups on homework is strongly encouraged, but work turned-in must be one’s own.

Exam policies

A midterm and a final exam may be given, but are not planned. If you require any specific accommodations, please contact me.

If applicable, calculators will be allowed. Only ones own notes and the notes provided by the instructor will be allowed. No communication-devices will be allowed.

No exam may be taken early. Makeup exams require a doctor’s note excusing the absence during the exam.

Grading policies

Total grades in the course may be curved, but individual assignments will not be. They will be available on Moodle throughout the semester.

Assuming no exams are given, the grading breakdown is simple.

Reports, code, assignments
100%

For graduate students, 10% of their grade will depend on their final presentation.

Academic integrity policy

Cheating or plagiarism of any kind is not tolerated and will result in a failing grade (“F”) in the course. I take this very seriously. Engineering is an academic and professional discipline that requires integrity. I expect students to consider their integrity of conduct to be their highest consideration with regard to the course material.

Cheating is academic dishonesty as well as unprofessional for prospective teachers. Do not copy other students' assignments, have someone else write your papers or plagiarize published or unpublished materials, or submit work previously graded by other instructors. See Saint Martin's University Student Handbook. Students will be graded not only on their academic success, but on professional conduct as well. Students who fail to show professionalism in their academic or personal conduct (e.g. constant tardiness, excessive absences, and/or other unprofessional behavior) may earn a lower letter grade than the total of semester accumulated points, or may even earn a failing grade.

Access and accommodations

Your experience in this class is important to me. If you have already established accommodations with Disability Support Services for Students (DSS), please communicate your approved accommodations to me at your earliest convenience so we can discuss your needs in this course.

If you have not yet established services through DSS, but have a temporary health condition or permanent disability that requires accommodations (conditions include but not limited to; mental health, attention-related, learning, vision, hearing, physical or health impacts), you are welcome to contact DSS at 360-438-4580 or dss.testing@stmartin.edu or smu.dss@stmartin.edu DSS offers resources and coordinates reasonable accommodations for students with disabilities and/or temporary health conditions. Reasonable accommodations are established through an interactive process between you, your instructor(s) and DSS. It is the policy and practice of the Saint Martin’s University to create inclusive and accessible learning environments consistent with federal and state law.

Sexual misconduct/sexual harassment reporting

Saint Martin’s University is committed to providing an environment free from sex discrimination, including sexual harassment and sexual violence. There are Title IX/sexual harassment posters around campus that include the contact information for confidential reporting and formal reporting. Confidential reporting is where you can talk about incidents of sexual harassment and gender-based crimes including sexual assault, stalking, and domestic/relationship violence. This confidential resource can help you without having to report your situation to the formal reporting process through unless you request that they make a report. Additional information and or reports can be made to the Title IX Team here on campus through the Dean of Students – Ms. Melanie Richardson, Associate VP of Human Resources – Ms. Cynthia Johnson, Public Safety – Mr. Will Stakelin, or the Provost/Vice President of Academic Affairs, Dr. Kate Boyle. Please be aware that in compliance with Title IX and under the Saint Martin’s University policies, educators must report incidents of sexual harassment and gender-based crimes including sexual assault, stalking, and domestic/relationship violence. If you disclose any of these situations in class, on papers, or to me personally, I am required to report it.

University sanctioned activities

If a student is absent from class due to university sanctioned activities, such as sports, it is the student's responsibility to request that the absence be excused, otherwise, the absence will be recorded as unexcused. Absent students are responsible for catching up with the class, and if any assignments are due on the day of the absence, it is the student's responsibility to turn in the assignments on time (prior to class). Assignments may be submitted as an attachment to email: fumie@stmartin.edu. Please request the policy handout, “Requirement for receiving Excused Absence” on the first day of the class if you think this policy might apply to you.

Center for Learning, Writing, and Advising

The Center for Student Learning, Writing and Advising is an integrated learning assistance program that offers services for students at all levels of achievement in pursuit of intellectual growth and academic excellence! The Center offers peer tutoring, study support, first year/early major advising, and writing support. Please investigate ways in which to support your learning.

COVID-19 Policies

  1. Students and faculty perform self-check for COVID-19 symptoms before coming to class Students and faculty should perform a self-check each day before coming to campus, and stay away from campus if they are ill. Students who are ill should inform faculty. Faculty who are ill should arrange for a communication plan with students if they need to miss class. Faculty are encouraged to give a gentle reminder at the beginning of each face-to-face class that students experiencing symptoms listed on the checklist should elect to remove themselves from campus. Anyone diagnosed with COVID-19, or living with/caring for someone diagnosed with COVID-19, should notify the Office of Public Safety.
  2. Support for students who are unable to attend classes for any reason due to COVID-19 (including illness, travel restrictions, and quarantine): Faculty should attempt to make reasonable accommodations for students who are unable to attend classes or complete coursework due to the pandemic. Students adversely impacted by COVID-19 should notify their faculty and academic advisor to arrange for accommodations as soon as they become aware that they will be needed. Another alternative is to use the Saints Care form on the SMU website.
  3. Attendance: This attendance policy consists of two elements. One relates to support of contact tracing efforts throughout this period of COVID-19 potential threats. The second relates to the use of attendance as a course grading element.
    1. For tracking purposes, if needed, in all face-to-face courses faculty should maintain a record of attendance throughout the semester. The attendance needs to be taken by voice call or faculty recognition of students attending each individual session. Records should be kept via the Self-Service attendance feature or some other record the instructor maintains and can produce on demand should an inquiry be necessary for tracing purposes. Attendance should not be taken by passing around an attendance sheet or having students sign in as they enter the classroom as this handling could compromise attendees.
    2. In an effort to support students who are considered high-risk or vulnerable as defined by public health officials and/or are unable to attend due to concerns about illness, campus safety, or need to care for familial obligations, attendance should not be used as a grade element during the Fall or any subsequent semesters affected by continuing COVID-19 requirements.
  4. Face Covering: The university will follow Washington state policies regarding face mask exemptions and requirements: https://coronavirus.wa.gov/information-for/you-and-your-family/face-masks-or-cloth-face-covering Employees, students, and visitors must wear fabric or disposable surgical-style masks that cover their nose and mouth when they are inside university buildings, and when they are outdoors in situations where social distancing of at least six feet is not possible. In some cases, plastic that shields nose and mouth can be substituted for a fabric mask. Face masks must be worn at all times when inside any campus building, except when alone in an enclosed room, such as an office or enclosed study room, or while participating in activities in which a face mask or shield cannot practically be worn, such as when eating and drinking or playing a musical instrument or singing, as part of work. Community members should make every effort to eat and drink only when appropriately distanced from others, or in designated areas. A limited number of classrooms that contain plexiglass barriers in the podium area will allow the instructor to remove their mask, as long as they remain behind the plexiglass barrier. Students must wear masks in classrooms at all times. Prior to stepping beyond the barrier the instructor must re-mask. It is the responsibility of all of the campus community to address students and others on campus who are not following the mandate for face masks. Any student, instructor or visitor who is not wearing a mask will be directed to: (1) the Office of Public Safety or another designated location for a disposable mask; or (2) Public Safety, Disability and Support Services (DSS), or Human Resources to clarify the guidelines and need for compliance. All exemptions must be cleared in advance, similar to other classroom accommodations, with Disability and Support Services Office, or the Human Resources Office. Designated locations for masks: • Public Safety (2nd Floor Old Main) • JBLM: Night Monitor in Stone Education Center Kiosk • Looking into additional locations (perhaps library and rec center)
  5. Social Distancing in the Classroom: Faculty, students, and guests must maintain minimum physical distancing whenever possible of six feet between all on-campus personnel, including with visitors, and where physical distancing cannot be maintained, implement administrative or engineering controls to minimize exposure.
  6. Classroom arrangement: Desks and tables will be placed in a fixed manner to allow for a minimum of six feet between students seated in their desks, and from the faculty leading the class. Desks may not be re-arranged or shifted. When directing students into smaller discussion or work groups, faculty need to ensure that students maintain the six-foot physical distancing standard. Students also need to continue to use PPE (cloth facial coverings or face shields) during these activities. Recognizing that use of small group activities while enforcing physical distancing may have an impact on classroom volume, faculty are encouraged to take this into consideration when planning classroom activities.
  7. Passing out/collecting paper materials: Faculty should avoid distributing and collecting “handouts” or printed materials by hand. Ideally, the materials are uploaded to the class Moodle site before class. Some classes may need to have students bring digital devices to class. Exceptions will be made for tests that cannot be delivered electronically. When tests are hand-administered and hand-collected, faculty and students should take precautions to reduce the risk of transmission. For example, faculty may wish to use disposable gloves while handing out and collecting tests. Students should not pass tests to other students. Students and faculty may wish to use hand sanitizer before and after handling tests.
  8. Cleaning: Classrooms and laboratories will be cleaned and disinfected regularly and thoroughly by custodial staff. However, because many people will be using these spaces throughout the day, students and faculty should protect themselves by disinfecting the area and objects they will come into contact with. Students and faculty should also be considerate of others and clean up and disinfect their work area as much as possible before they leave the room. a. Upon entry into the classroom, faculty and students should disinfect surfaces in their immediate area where they will be sitting: chair, stool, desk, table, computer workstation, etc., using the appropriate cleaning products available in the classroom as follows: i. Copy machine/computer screen/smartboards: screen cleaning solution ii. Other surfaces, including keyboard/mouse: disposable wipes (e.g., Clorox wipes); iii. Used wipes should go in the garbage receptacles provided in the classroom b. Special instructions for laboratories: department-specific laboratory cleaning and disinfecting protocols must be followed. In addition, students and faculty should disinfect their work area upon arrival, as indicated above c. Before leaving the classroom, faculty should disinfect the whiteboard, computer/electronic equipment, and other surfaces they have touched (faculty will be provided with their own whiteboard markers and erasers material) d. Sanitizing stations will be available at building entrances and exits, as well as other designated areas. Students and faculty are encouraged to wash hands frequently and/or carry their own hand sanitizer. Note: each classroom will have a cleaning/disinfecting kit with appropriate solutions and applicators (spray bottle, sanitizing wipes, towels, hand sanitizer). Faculty and students are encouraged to also bring their own hand sanitizer and sanitizing wipes.
  9. Food and beverages: Because consuming food and beverages require removal of the mask, no food or beverages can be consumed in the class. If students or faculty must drink water or eat during class, they should step outside the classroom. Faculty may wish to consider giving refreshment breaks during courses that meet longer than 50 minutes.
  10. Storage of personal items (jackets, bags, umbrellas, etc.): Items such as backpacks, bags, umbrellas, and articles of clothing, should be kept in areas close to their owner. Shared lockers or common storage areas should not be used since these areas could lessen social distancing. Spaces under student chairs or desks are the best places to store these types of items.
  11. Emergency drills and events (fire, active shooter, etc.): Continue training opportunities and exercises. The COVID-19 environment provides trainers a real-time opportunity for training students, faculty, and staff.
  12. Compliance: Compliance with these policies is covered by regulations stipulated in the university contract signed by students. Students who violate these regulations repeatedly or egregiously may be referred to the Dean of Students.

Correlation of course & program outcomes

In keeping with the standards of the Department of Mechanical Engineering, each course is evaluated in terms of its desired outcomes and how these support the desired program outcomes. The following sections document the evaluation of this course.

Desired course outcomes

Upon completion of the course, the following course outcomes are desired:

  1. students will have a clear and thorough understanding of concepts, principles, and methods of embedded computing in electromechanical systems;
  2. students will understand basic computer architecture;
  3. students will understand basic C programming;
  4. students will be able to program an embedded computer;
  5. students will be able to design a basic feedback control system;
  6. students will be able to write a clear and thorough report of a laboratory exercise; and
  7. students will collaborate to complete laboratory exercises.

Desired program outcomes

In accordance with ABET’s student outcomes, our desired program outcomes are that mechanical engineering graduates have:

  1. an ability to identify, formulate, and solve complex engineering problems by applying principles of engineering, science, and mathematics
  2. an ability to apply engineering design to produce solutions that meet specified needs with consideration of public health, safety, and welfare, as well as global, cultural, social, environmental, and economic factors
  3. an ability to communicate effectively with a range of audiences
  4. an ability to recognize ethical and professional responsibilities in engineering situations and make informed judgments, which must consider the impact of engineering solutions in global, economic, environmental, and societal contexts
  5. an ability to function effectively on a team whose members together provide leadership, create a collaborative and inclusive environment, establish goals, plan tasks, and meet objectives
  6. an ability to develop and conduct appropriate experimentation, analyze and interpret data, and use engineering judgment to draw conclusions
  7. an ability to acquire and apply new knowledge as needed, using appropriate learning strategies.

Correlation of outcomes

The following table correlates the desired course outcomes with the desired program outcomes they support.

desired program outcomes
1 2 3 4 5 6 7
desired course outcomes 1