An Arduino Learning Sequence for Middle School

There is a lot of work going on in the maker/DIY and education communities surrounding the Arduino programmable microcontroller. It is a good platform for teaching not only programming but also concepts of physical computing, automation, and control.

This is the second year we’ve used Arduino with 8th grade students here at Challenger Middle School in a course called Rapid Prototyping. Some of the students are familiar with programming but most are new to it. I have to say it is a lot of fun. Here is sort of a “thumbnail sketch” of how we proceed.

The Board

RBBB form Modern Device

RBBB from Modern Device

We use the RBBB (Really Bare Bones Board) from Modern Device. Bought as a kit they are only $11. Before the Arduino unit (which lasts about two weeks—yes, two weeks! –more on that later). there is a soldering unit and just about all our RBBBs have been assembled by students. And, importantly, students have studied basic electronics and DC circuits in a previous unit.

So far the RBBBs have been pretty reliable and completely repairable (except for one). I’ve repaired nine so far this year (mostly broken resonators and a few damaged MCUs).

The BUBs (USB interfaces that go between the Arduino and a USB cable), also from Modern Device, are a bit fragile but we have only broken a couple so far. I prefer to use an FTDI cable, but they are a bit more expensive.

The Software

arduinologoWe use the standard installation of the Arduino IDE downloaded from arduino.cc which of course used the progrmming language C. There is also a Keynote presentation given before we begin that provides an overview of microcontrollers and the Arduino specifically.

After that, the first lesson is to basically go over the blink sketch in detail to explain all its parts, the syntax of C, and how an Arduino sketch functions [variables, setup() and loop()]

A Programming Task Checklist

After the introduction, students are turned loose with a checklist of programming tasks to complete. They work through the tasks with my help and I initial their checklist as each task is completed. The checklist is maintained by each student as an editable PDF on their iPad using the Notability app (every student has an iPad).

RBBB on a breadboard with e motor driver chip ready for hookup.

RBBB on a breadboard with a motor driver chip ready for hookup.

Students work individually and when they are done (or have gone as far as they can in the allotted time), they upload the annotated checklist to the assignment page on ALEC (our version of Moodle.  I evaluate it and the grades are automatically posted to our reporting system, Infinite Campus. There are 9 tasks on the list and 1/2 a point is deducted  (out of 10 points total) for each task not completed.

The Sequence of Tasks

The tasks are designed to build computer,  circuit, and coding skills. We begin with an Arduino example sketch, and assemble the circuits on a breadboard. These are the tasks:

1) Blink – But they must modify the program so it doesn’t reference the built in LED found on an Uno.

2) Blink three times followed by a longer pause – students must add code to blink.

3) Alternating blink of two LEDs – must add more code.

4) Button – Must keep an LED attached to pin 13 for it to work. Later on we employ the INPUT_PULLUP method of using a button.

5) Debounce – No circuit change required. Shows how a momentary switch can be made to behave like a latching switch.

6) Fade – Demonstrates one way to control the brightness of an LED.

7) Analog Fade – Introduces the for loop. Students must adjust the variables to create different fade rates to understand what they do and how to control the LED. It is good to talk about pulse width modulation at this point and demonstrate it with an oscilloscope.

8) Tone Multiple – Introduction to sound generation. Instead of using three speakers on three pins, we use one. Students have to modify the program to play multiple tones using one speaker output. Those who know music enjoy sequencing a simple tune of their choice. “The Imperial March (Darth Vader’s Theme)” has been my favorite so far.

9) Motor – Use a provided hook up diagram and program to operate a DC motor with a switch. Uses the Texas Instruments 74410ONE H-Bridge motor driver IC. If there is time the, students cam experiment wth the program to make the motor operate in different ways. We have a number of motors to choose from.

That summarizes the microcontroller programming unit. After that we do a unit on 3D modeling and fabrication, and finish up with a project to build a simple autonomous vehicle using Arduino, 3D printing, and a selection of stock mechanical parts (wheels, hubs, bearings, etc.).

Leave a Reply

Your email address will not be published. Required fields are marked *