Introduction to circuits and Arduino coding

Summary

This activity guides students through making a simple circuit and writing a simple Arduino sketch (code) to make some LEDs blink. It precedes a lab where students build a temperature sensor, and could be used prior to any lab that has students build Arduino-based environmental sensors. Instructions are complete enough so an instructor with no previous Arduino experience can implement this activity.

Context

Audience

This is a first step in learning to build an electrical circuit and use Arduino enabling follow-on activities for building environmental sensors. This activity is appropriate for students at any level if they have no experience in electrical circuits or computer coding. We use this activity to prepare students to build oceanographic instrumentation in the SERC exercise Oceanographic Instrumentation, Measuring Temperature (https://serc.carleton.edu/teachearth/activities/178656.html)

Skills and concepts that students must have mastered

Prior to the lab students are given instructions to download the Arduino IDE to their laptops. The instructions are self explanatory for students well acquainted with the internet. No programming experience is required; the lab will lead the students through the steps to program the Arduino.

How the activity is situated in the course

This activity does not rely on course content; it can be situated at any time in the course but would be most useful as an introduction to the Arduino platform before the students are asked to tackle a more complicated project using Arduino. This lab precedes a lab where students build and calibrate a temperature sensor.

Goals

Content/concepts goals for this activity

Understand and diagram electrical current flow through a simple circuit.

Build a simple circuit using a breadboard.

Understand how to modify a simple computer code to vary the blink rate of LEDs.

Know how to add, and appreciate the use of, comments in a computer code.

Higher order thinking skills goals for this activity

Students are asked to research Arduino based sensors and reflect on the scientific or environmental questions they could address with data collected from these sensors.

Other skills goals for this activity

For educators and students intimidated by electrical instruments and computer code this activity is an easy, fun introduction to these topics.

Become familiar with some Arduino commands.

Find vendors and prices for components needed to build and control a simple circuit.

Description and Teaching Materials

Prior to this activity students are given instructions for downloading the Arduino IDE software. They should be encouraged to do this when they have a fast internet connection. In this activity students are given a kit. Students use the kit and follow along as an instructor walks through a PowerPoint, wherein there are visual instructions on building an electrical circuit, writing an Arduino sketch, and modifying both the circuit and the sketch. Additionally students complete a simple written assignment that is designed to make them; look up the definition for several of the sketch commands that they use, go online to find the cost of the materials used in the lab so they can appreciate how inexpensive it is to dabble in electronics, and answer a reflection question to get them thinking about sensors they could use to answer scientific or environmental questions.

This is the instruction file for students to use to download the necessary software. If instructors intend to do the SERC activityOceanographic Instrumentation, Measuring Temperature , after this activity students should download the Arduino IDE and the libraries mentioned in the instructions. If instructors do not intend to follow on with the measuring temperature activity the libraries are not needed. If instructors intend to follow on with a different sensor based lab they should instruct students in how to download the appropriate libraries. Preparing_Student_Computers_Intro_to_Coding.docx (Microsoft Word 2007 (.docx) 1.6MB May10 19)

This is the materials list for the student kits materials_list_blinking_light.docx (Microsoft Word 2007 (.docx) 15kB May10 19)

This is the PowerPoint to be used by the instructor Intro to Arduino.pptx (PowerPoint 2007 (.pptx) 5.2MB May10 19)

This is the handout for the students to complete student_handout.docx (Microsoft Word 2007 (.docx) 14kB May13 19)

Teaching Notes and Tips

This lab can be completed in less than 3 hours. Most students will finish the 5-light circuit and sketch in about 2 hours; they use the additional hour to synchronize their music and lights, and to fill out the student handouts.

This document has troubleshooting tips troubleshooting_tips_Intro_to_coding.docx (Microsoft Word 2007 (.docx) 14kB May10 19)

Assessment

Students email their sketches to the instructor and they are assessed on the quality of the comments they choose to include.

The handouts are collected and graded.

Student effort is assessed by how well they complete the coding/blinking LED activity.

References and Resources

Information on the Arduino coding language can be found here (https://www.arduino.cc/reference/en/)

You can see a variety of Arduino sensors here ( https://store.arduino.cc/usa/components/components-sensors)

Lots of questions related to Arduino troubleshooting are answered here (https://www.arduino.cc/en/guide/troubleshooting)

You can learn more at the Arduino forum (https://forum.arduino.cc/)

And see this site for projects people have done with Arduino (https://create.arduino.cc/projecthub)

Advertisement