Intro to Arduino: Syllabus

99-355 A3 and B3
1 unit micro-course, Spring 2018
Hunt Library A10 (IDeATe’s Physical Computing Lab in the basement level)
Instructor: Robert Zacharias, rzach@cmu.education without the cation
Prerequisites: none

Course Description

This practical course is designed to quickly take students from beginner to basic functional knowledge of the Arduino microcontroller in three weekend 3-hour sessions followed by 2-hour lab periods. You can expect to learn a) how to write and upload simple code for the Arduino to perform basic logic functions like reading a switch to change a motor’s direction, b) how to integrate a variety of physical *in*puts including knobs, distance sensors, and light sensors, c) how to integrate a variety of physical *out*puts such as motors, lights, and speakers, and d) how to put all of these together to build simple self-contained low-cost low-power systems.

The course culminates in students producing and artful and/or functional interactive creation of their own design. Enrolled students have access to IDeATe’s well-equipped Physical Computing Laboratory in the basement of Hunt Library. Undergraduates, graduate students, faculty, and staff interested in learning new skills in an interdisciplinary environment are welcome. There are no technical prerequisites.

We’re fitting lots of learning into a very small amount of time. The purpose of the course is not to do a warp-speed introduction to all things microcontroller, but rather to give students the foundation necessary to further elaborate their own skills in whatever direction they choose. The course structure is light on lecture and heavy on hands-on learning and practice.

Schedule

The Spring 2018 dates are as follows:

A3 session

date time material
Sun, Jan 28
1 p.m.–6 p.m.
introduction, programming, and electronics
Sun, Feb 4
1 p.m.–6 p.m.
reading the world and responding to it
Sun, Feb 11
1 p.m.–6 p.m.
project development, presentation, and crit

B3 session

date time material
Sat, Feb 17
1 p.m.–6 p.m.
introduction, programming, and electronics
Sat, Feb 24
1 p.m.–6 p.m.
reading the world and responding to it
Sat, Mar 3
1 p.m.–6 p.m.
project development, presentation, and crit

Housekeeping

This course meets only three times, and so it follows that attendance at all three sessions is mandatory. (Emergencies are excepted of course; please contact the instructor at your earliest convenience in that case.)

For the duration of the course, students have (or should have–please speak with the instructor if there’s a problem) card swipe access to the IDeATe Physical Computing lab. Students are allowed to use the lab any time the building is open during the course period, though classes conducted in the room take predecence. The lab calendar is visible to anybody with an AndrewID: click on “Physical Computing (A10)” in the upper left corner of IDeATe@Hunt Reservations Calendar.

Every registered student gets a kit of parts to keep. Students may borrow non-consumable electronic materials such as specialized sensors, motors, etc., that are stored around the room in Phys Comp, but they must return these to where they came from the end of the course. Students may not remove tools or equipment such as digital multimeters, power supplies, scissors, wrenches, etc., from the room at any time. Please don’t do this!

The instructor expects that students:

  • Will arrive on time and ready to start (we have only fifteen contact hours in total so every minute is precious!)
  • Will work on class material for the duration of the course
  • Will be patient with themselves as they learn a new skill set
  • Will ask questions! Odds are very good that others in the room have the same question as you.

Students can expect the instructor to:

  • Arrive prepared to teach
  • Maintain a positive learning environment where ignorance isn’t an embarrassment
  • Provide meaningful feedback and constructive criticism

A word on academic integrity

In the open-source hardware and software world, a great deal of work is built upon the freely shared contributions of others. You are welcome to (and expected to!) incorporate into your work at least some code, circuit designs, plans, cutfiles, fabrication methods, etc., from a public source you find. That said, take care to appropriately attribute authorship and sources, and even inspirations if you so choose. If you make something you think others may find interesting or useful, consider sharing it through a community platform. A wholesale copy of existing work is not acceptable for your final project, but a modification or adaptation probably is. Speak with the instructor if you have any questions.

Topic overview

Overview lecture

An introduction and contextualization of the Arduino microcontroller.

  • Brief history of the Arduino
  • What is a microcontroller?
  • A smattering of project examples
  • What the Arduino can and can’t do

Hello blinky world

  • A quick tour around the Uno
  • Navigating the Arduino integrated development environment (IDE)
  • void setup() and void loop()
  • Writing a blinking sketch from scratch
  • Using built-in help in the IDE
  • Downloading firmware to the Arduino
  • Blinking the LED

Writing more sophisticated software

  • Variables, variable types, and scope
  • Doing math, comparisons, etc.
  • Control logic (if and else)
  • Iteration (for and while loops)
  • Avoiding blocking code
  • Nesting indefinitely

Parts buffet!

  • Assembling class kits with brief introduction to every item
  • Complete list of kit contents: Course Kit Guide

Elementary electronics

  • Bad code won’t break your Arduino but bad wiring can
  • Current, voltage, resistance, Ohm’s Law, and practical ways to avoid damaging yourself or your board
  • Reading resistor codes
  • Maintain sufficient resistance between power and ground
  • Reading a simple schematic; nodes and wires
  • Floating inputs don’t tell you much
  • Using a breadboard
  • Voltage dividers resistor/photoresistor, resistor/LED
  • Using a multimeter to measure voltage and resistance
  • Wiring up a switch with pullup resistor
  • Wiring up an LED with current limiting resistor
  • Wiring up a photoresistor voltage divider (as a basic analog sensor)
  • Soldering basics (shown on the document camera)

Responding to the world

  • Reading a value (like a button push)
  • Telling the Arduino to do something with this information (like switching an LED)
  • Seeing the result of this on the computer via the serial monitor
  • Modifying behaviors to do more interesting things

Ins and Outs

  • Wiring up buttons and switches

  • Using a breadboard

  • Driving LEDs as outputs

  • The cleverness of pulse width modulation (PWM)

  • Reading a potentiometer, infrared proximity sensor, photointerruptor

  • Reading a photocell

  • Reading an IR proximity sensor

  • Driving a hobby servo with the Servo.h library

  • Using a transistor circuit to drive heavier loads

  • Adding libraries from the web for greater functionality:
    • Reading digital input (accelerometer) via I2C bus
    • Reading digital input (ultrasonic ranger) through a library
  • Wiring up a speaker and generating tones

  • Using a voltage regulator with an external power source

  • Powering the Arduino via the VIN pin from an external power source

Final project

The purpose of this course is to give you a structured opportunity to learn something you want to learn. You will define your final project goals and expectations, in consultation with the instructor. By the afternoon of the second class, you will have a proposal consisting of a couple sentences and a hand-drawn sketch. We’ll discuss your ideas one-on-one before you leave the second class. The third class is mostly build time, and towards the end you’ll show your work for a quick crit by your classmates, the instructor, and yourself.

  • At a minimum, your project must at least:
    • Be driven or meaningfully affected by data that comes in from the world
    • Interpret the incoming data
    • Act on the data by changing some physical output(s)
    • Use an Arduino to do this!
  • A stronger project might:
    • Read multiple input data streams
    • Produce multiple different physical outputs
    • Have “state” or “history,” e.g. doing something twice in a row does not necessarily produce an identical outcome
    • Involve the use of a sensor and/or output device of particular interest to the student
    • Be especially well-made physically, electronically, and/or in software
    • Reflect creative use of the available resources towards an interesting or meaningful end
    • Play a game with itself or a user (or users)
    • Solve a real-world problem big or small
    • Amuse, delight, excite, or surprise

A word on fruit height

Scoping a creative project can be very challenging. For the purpose of this class, it would be inappropriate for a student to make a remote health monitor that collects electrocardiography data, analyzes the heart trace for arrhythmia, and transmits results to a server. That’s high-hanging fruit: it would be an appropriate goal for a team of experienced builders of embedded systems, but not for a beginner.

It would also be inappropriate for a student to submit for their final project a button that turns a light on and off, because that’s obviously low-hanging fruit.

The goal for the final project is to aim for a challenging, but reasonably achievable, outcome: middle-height fruit.

Final project proposal form; ordering materials

A final project proposal form must be filled out on paper by students and signed off on by the instructor prior to the end of the second class. The form asks students to identify the learning areas they wish to focus on; any special materials they will need; and to provide simple, preliminary mechanical and electrical drawings of what they want to build.

Students are welcome to purchase their own materials for project use. IDeATe is able to purchase relatively inexpensive parts and supplies for final projects in this course. Students who will need any special materials should use this web-based IDeATe material request form to submit requests as early as feasible, but no later than noon on Monday proceeding the final weekend class session.

Class materials

All IDeATe students have access to the Physical Computing Lab (Hunt Library room A10) and all of its resources and materials; the Phys Comp inventory has a comprehensive, searchable listing of stocked materials.

Enrolled students get a kit that offers a good starting point for learning physical computing inputs and outputs: Course Kit Guide.

Students may use an IDeATe cluster MacBook Pro during class time or bring their own laptop on which the Arduino Software has been installed. The software is open-source, free-as-in-beer, and available for Mac, Windows, and Linux.

Grading

With only three classes, perfect attendance is mandatory (and worth about half of the course grade). Another 5% of the grade is for completing a survey at the end of the course. Students earn the other half of their grade based on their participation, effort, creativity, and learning gain, as demonstrated during class time and through their final project. Emphasis is on creative exploration rather than polished and flawless execution. An interesting idea with incomplete execution may receive a higher grade than a prosaic idea that’s built out successfully.

Assignment Percentage
Attendance 45%
Survey 5%
Project 30%
Ideation 20%