Welcome to Introduction to Arduino, spring 2020 edition!
We’re going to learn how to make small objects perform magic.
This 1-credit micro course is presented by IDeATe at Carnegie Mellon University and makes use of the IDeATe Physical Computing Lab in the A level of Hunt Library.
Instructor: Robert Zacharias, firstname.lastname@example.org (minus the cation)
This practical course is designed to quickly take students from beginner to basic functional knowledge of the Arduino microcontroller in three 5-hour sessions. You can expect to learn:
- 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,
- how to integrate a variety of physical inputs including knobs, distance sensors, and light sensors,
- how to integrate a variety of physical outputs such as motors, lights, and speakers, and
- 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. 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.
Check out the student gallery to see some prior projects!
|Friday, Jan. 24||11:30–4:20 p.m.||introduction, programming, and electronics|
|Friday, Jan. 31||11:30–4:20 p.m.||reading the world and responding to it|
|Friday, Feb. 7th||11:30–4:20 p.m.||project development, presentation, and crit|
|Sunday, Feb. 16||1–5:50 p.m.||introduction, programming, and electronics|
|Sunday, Feb. 23||1–5:50 p.m.||reading the world and responding to it|
|Sunday, Mar. 1||1–5:50 p.m.||project development, presentation, and crit|
Both sessions cover the same material at the same (approximate) pace:
|day 1||Housekeeping||Welcome, course structure, student and instructor expectations, academic integrity, lab access policy, etc.|
|Overview lecture||A tour of the Arduino Uno and how to use the IDE to talk with it|
|Arduino programming: doable!||Elementary programming; blinking an LED|
|Parts buffet||Assembling our course kits and taking a tour of what we'll be playing with|
|Elementary electronics: the necessaries||schematics, circuits, Ohm's Law, digital multimeters, solderless breadboards, and using the board's built-in power supply to power things as needed|
|Responding to the world||Reading a potentiometer to change LED behaviors|
|day 2||Ins and outs||Many different ways of getting data into, and action out of, the Arduino: sensors (photocell, switch, accelerometer, potentiometer) and outputs (LEDs, servomotor)|
|Project proposals||Project proposals presented for instructor approval and signature|
|(during week)||Optional homework||Further development of project, testing, tinkering, exploring, etc.|
|day 3||Project build||Work session|
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 predecent. The IDeATe space reservations calendar is available so you can look up when classes, office hours, and other events are scheduled in the space.
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.
The first two days
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
- A quick tour around the Uno
- Assembling class kits with brief introduction to every item
- Complete list of kit contents
Hello blinky world
- Navigating the Arduino integrated development environment (IDE)
- Writing a blinking sketch from scratch
- Using built-in help in the IDE
- Downloading firmware to the Arduino
- Blinking the LED
- Bad code won’t break your Arduino but bad wiring can! Even worse: really bad wiring can cook your computer’s motherboard.
- 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
- Basic schematic symbols (trace, node, resistor, LED, switch, etc.)
- Reading a simple schematic, and following the current
- Floating inputs don’t tell you much
- Using a breadboard
- Voltage dividers resistor/photoresistor, resistor/LED.
- Using a multimeter to measure voltage, resistance, and continuity
- Soldering basics (shown on the document camera)
Responding to the world
- Reading a value (a button push or potentiometer position)
- 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
- Wiring up an LED with current limiting resistor.
- Modifying behaviors to do more interesting things
Ins and Outs
- Wiring up buttons and switches (pull-down or pull-up resistors)
- The cleverness of pulse width modulation (PWM) and
- Reading a potentiometer, infrared proximity sensor, photointerruptor
- Reading a photocell
- Reading an IR proximity sensor
- Driving a hobby servo with the Servo library
- Adding libraries for broader functionality
- Reading a digital input (ultrasonic ranger) through the NewPing library
- Powering the Arduino:
- through the USB cable
- via the
VINpin from an external power source such as 9V battery
- with 5V supplied into the
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 a build time, and in the last hour you’ll show your work for a critique 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.
Enrolled students get a kit that offers a good starting point for learning physical computing inputs and outputs.
With only three classes, perfect attendance is mandatory (and worth half of the course grade). 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.
Grading is pass/fail.