Course Profile

Goals of the Course

The course has 3 primary goals:

1. To integrate software, electronics, and mechanical structures in the design process and to understand the strengths and weaknesses of each.

2. To learn practical problem solving, testing, and debugging skills

3. To learn to communicate with, learn from, and productively cooperate with an engineer in a different discipline.

Who is it designed for?

The course is available to all EE/Comp. Eng/ME students who have had an introductory programming class and an introductory circuits class. Other department students are allowed in if there is room. In practice, it is mostly seniors with a few juniors.

Learning Objectives

The primary objectives are problem solving, teamwork, analysis, testing, and experimentation.

The vehicles for those skills are:

  • C programming in an embedded environment
  • Interrupts, timers, and I/O
  • State machines
  • Basic resistor, capacitor, transistor, and op-amp circuits.
  • A/D converters, sampling, and filtering
  • Sensor calibration and measurement
  • Motor control circuits and techniques
  • Motor performance and circuit analysis
  • Closed loop and open loop control
  • Power supplies and safety
  • Signal integrity
  • Planning and mapping in robots
  • Construction techniques
  • Debugging techniques

Maker skills it develops

The students learn to use rapid prototyping (fast and cheap) while assessing the necessary levels of durability and reliability for the task at hand. They learn to repurpose found materials as well as to fabricate custom solutions using both traditional hand tools and power tools and precision fabrication using a laser cutter and 3D printer.

The students learn to adapt actuators including 3 types of motors to specific tasks by adding mechanical structures,

The students learn to combine sensors, actuators, and Datacom by using a microprocessor and software for control. 


An introductory programming class

An introductory circuits class.

Skills, Tools and Technologies Used

We provide formal training in soldering, wiring, and use of the laser cutter. There is also safety training for other basic hand tools (drills, saws, etc). 3D printing training is optional. Supervisors are available to teach the use of other basic tools on an as-requested basis. In general, students are expected to ask supervisors or peers for assistance in using other new tools or techniques. Heavier-duty power tools are operated on behalf of students by supervisors.

Key Examples and Prior Work

The Arduino and its programming environment and libraries.

Hobby-grade sensor boards and actuators including:

  • Sharp GP2Y0A21YK
  • CanaKit UK1122 H-bridge
  • Solarbotics GM2 motor/GMB28 bracket/GMWWK1 wheel encoder/wheels
  • EasyDriver 4.4 stepper motor board
  • QTR8-RC line follower
  • Adafruit ADXL335 accelerometer

Makerbot Replicator and software

Sensor mounts from Thingiverse

Key Resources

Instructor prepared slides and lab projects

“Problem Solving and Program Design in C”, Jeri R. Hanly and Elliot B. Koffman

Introduction to Mechatronic Design” Carryer, Ohline, Kenny.

Arduino online reference

Arduino Playground

Example Assignment

The following assignment is given to teach students how to use interrupts on a microprocessor. It is a precursor to a lab where we compare open-loop and closed-loop control of speed and distance.

Experiment 4:

1. You need to mount the wheel sensor and wheel to one of your motors. There are several very small parts and few or no replacements. Be careful. You should have the following wheel-encoder parts: (actually, you should have 2 wheel encoder kits – we will only use one today)

WW-12 Parts List

  • printed circuit board, preassembled
  • self-adhesive codewheel
  • 6" five lead color-coded ribbon cable
  • two insulated washers
  • two 2-56 hex nuts
  • two 2-56 1” pan head machine screws

2. You should also have two GM-2 gear motors and 2 GMWWS wheel spacers. Take out one of each. Return the ribbon cable parts to the TA. You will use the pre-built 5-pin cable instead.

3. Lower the board over the motor output shaft, with the shaft going into the largest hole in the center of the WW-12, making sure the raised alignment pin on the motor housing enters the matching hole on the board. Make sure the slightly raised area around the motor shaft fits entirely inside the hole in the circuit board.

4. Mount the WW-12 to the motor using 2-56 machine screws and 2-56 nuts; place insulated washers between the screw heads and the circuit board.

5. Peel off the adhesive backing and install the CS-100 Codewheel Spacer onto the back of the wheel (the side into which the motor shaft is inserted), being sure to center it; then attach the codewheel sticker to the top of the Codewheel Spacer, while also ensuring it is centered with the hub.

6. Attach the wheel to the hub – preferably with a ¼” #2 screw.

7. Attach the 5-wire cable as shown. Match the markings on the PCB.

8. Using jumpers connect the VCC and ground on the encoder board to +5 and ground on the Arduino, respectively. Connect channel A to pin 2 of the Arduino and channel B to pin 3.

9. Write a program to generate an interrupt on every rising edge of channel A. The interrupt service routine should check the value on channel B. Based on the timing diagram in Figure 8 in the WW-12 documentation, increment a counter by one each time the wheel moves in one direction and generates a pulse on channel A and decrement the counter each time the wheel moves in the opposite direction and generates a pulse on channel A. Print out this counter value every time it changes.

10. Run this program. It should measure the distance travelled by the wheel in both directions. Determine how many counts correspond to one full wheel rotation. (Demo #4). In your lab report, calculate the distance travelled per count. The wheel diameter is 69mm.

(see attachment for more detail and for illustrations)

Lessons Learned

The true challenge in this course is making the difficulty of the projects “just right.” If the projects are too “cookbook” in that they follow fixed directions and have few or no opportunities for failure, then the students do not take them seriously enough and do not think hard enough about the problems to learn. Students often learn best from making mistakes, finding them, then fixing them. Moreover, there needs to be room for creative solutions in order for the class to be worth their effort. On the other hand, if the assignments are too difficult and high risk, the students often become frustrated and give up. They correctly determine that it is more productive to put their limited time into other courses.

One technique that I have used to help with this is that as long as students continue to work on labs, there is no late penalty. The philosophy is that there is no giving up. You work on each project until you get it right.

I also found that the students try to economize by having each student do what they already know rather than working together to learn from each other. I require a mandatory lab group meeting before each lab where the students review all the relevant documents and data sheets, discuss the procedure, and often prepare simple tools. There are a few simple pre-lab deliverables turned in the day before to show that they have done some preparation. This includes a “selfie of the week” which shows the students together at their physical preparation meeting with a prop assigned each week. This verifies that the meeting takes place. Once the students schedule and attend a meeting, they then generally make the effort to prepare for lab.