Grade Level: 10 (9-12)
Time Required: 4 hours (60 min to create the clouds; 120 min to create the circuitry; 60 min to combine them)
(60 min to create the clouds; 120 min to create the circuitry; 60 min to combine them)
Expendable Cost/Group: US $18.00 This activity also uses many non-expendable (reusable) items; see the Materials List for details.
This activity also uses many non-expendable (reusable) items; see the Materials List for details.
Group Size: 3
Activity Dependency: None
Subject Areas: Computer Science, Science and Technology
SummaryStudents put their STEAM knowledge and skills to the test by creating indoor light fixture “clouds” that mimic current weather conditions or provide other colorful lighting schemes they program and control with smartphones. Groups fabricate the clouds from paper lanterns and pillow stuffing, adding LEDs to enable the simulation of different lighting conditions. They code the controls and connect the clouds to smart devices and the Internet cloud to bring their floating clouds to life as they change color based on the weather outside.
The Internet of things (IoT) is revolutionizing the way we interact with the world and go about our everyday lives. Nest thermostats enable people to remotely turn on their home air conditioners or furnaces so their houses are cool or warm when they arrive. Computer engineers are creating new technology that takes advantage of the IoT. Countless applications exist—from the Nest thermostat device to cloud-based, voice-controlled intelligent virtual personal assistants like Amazon’s Alexa. Some applications are just for fun—like creating a device that scans specific websites and uses the information for an output, or like using real-time weather data to control home lighting, as in this activity.
After this activity, students should be able to:
- Identify circuit components and explain their purposes and importance.
- Describe the Internet of things.
- Construct a functional circuit on a breadboard by soldering.
- Assemble and test a circuitry system that uses programming, a smart device, LEDs and other components.
- Utilize a smart device to control LED lights.
Each TeachEngineering lesson or activity is correlated to one or more K-12 science,
technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN),
a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics;
within type by subtype, then by grade, etc.
Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.
|NGSS Performance Expectation|
HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering. (Grades 9 - 12)
Do you agree with this alignment? Thanks for your feedback!
|Click to view other curriculum aligned to this Performance Expectation|
|This activity focuses on the following Three Dimensional Learning aspects of NGSS:|
|Science & Engineering Practices||Disciplinary Core Ideas||Crosscutting Concepts|
|Design a solution to a complex real-world problem, based on scientific knowledge, student-generated sources of evidence, prioritized criteria, and tradeoff considerations.|
Alignment agreement: Thanks for your feedback!
|Criteria may need to be broken down into simpler ones that can be approached systematically, and decisions about the priority of certain criteria over others (trade-offs) may be needed.|
Alignment agreement: Thanks for your feedback!
Design problems are seldom presented in a clearly defined form.
Do you agree with this alignment? Thanks for your feedback!
Information and communication technologies include the inputs, processes, and outputs associated with sending and receiving information.
Do you agree with this alignment? Thanks for your feedback!
Use computers and calculators to access, retrieve, organize, process, maintain, interpret, and evaluate data and information in order to communicate.
Do you agree with this alignment? Thanks for your feedback!
Note: The expendable cost for this activity is somewhat low because the main items—LED RGB strip, Arduino Pro Mini, FTDI basic breakout, Thing dev board, and other electronics (~$190 per project/group)—are expensive, yet considered fully reusable by taking apart the finished products. In addition, SparkFun provides a shopping cart list of the necessary SparkFun materials.
Each group needs:
- 1 DC barrel power jack/connector, such as for $1.25 at SparkFun
- 1 electrolytic decoupling capacitor - 1000uF/25V, such as for 35¢ at SparkFun
- 1-ft hook-up wire - yellow (22 AWG), such as a 25-ft spool for $2.50 at SparkFun
- 1-ft hook-up wire - black (22 AWG), such as a 25-ft spool for $2.50 at SparkFun
- 1 resistor 330 ohm 1/6th watt PTH, such as for 75¢ at SparkFun
- 1 momentary pushbutton switch - 12mm square, such as for 50¢ at SparkFun
- 2 female headers – rows of 10 holes, such as for $1.50 each at SparkFun
- 1 6-ft SparkFun Cerberus USB cable, for $7 at SparkFun
- 1 LED RGB strip - addressable, sealed (5 m), such as 5 meters for $120 at SparkFun (see helpful explanatory video at same URL); 5 meters nicely lights a cloud made from ~5 lanterns
- 3 male-female header wires, such as from a 100-pack of 6-inch M/F wires for $25 at SparkFun
- 1 Arduino Pro Mini 328 - 5V/16MHz, such as for $10 at SparkFun
- 1 SparkFun FTDI basic breakout - 5V, such as for $15 at SparkFun
- 1 break-away male headers - right angle – row of 6 holes, such as for $2 at SparkFun
- 2 break-away headers – straight – rows of 10 holes, such as for $1.50 each at SparkFun
- SparkFun solder-able breadboard, for $5 at SparkFun; note that this activity procedure consists of soldering components to a solderable breadboard, but feel free to build the circuit on a breadboard first to either test everything out or avoid soldering
- 1 SparkFun ESP8266 Thing dev board, for $16 at SparkFun (perfect for Internet of things projects)
- 1 5-ft hook-up wire for cloud power; stereo wire works well
- 4-5 white paper lanterns, such as a 6-pack of 12/10/8-inch lanterns for $7 at Amazon; joining together lanterns of different sizes creates more realistic-looking clouds
- 1 wooden dowel (or stick), of any diameter or length, on which to hang the cloud of lanterns (see Figure 5)
- 1 power source, able to put out at least 5V and 4A, such this one for $15 from AdaFruit; for best results, use a pricier 6V 8A power source
- smart device with Blynk App; download app for free at https://blynk.io/
- computer with access to Arduino programming platform
- GitHub libraries for Blynk; download for free at https://github.com/blynkkk/blynk-library
- Neo-Pixel library; download for free at https://github.com/adafruit/Adafruit_NeoPixel
- GitHub cloud repository; download for free at https://github.com/sparkfun/IoT_CloudCloud
- Cloud Wiring Handout
To share with the entire class:
- polyfil pillow filling
- fishing wire
- hot glue gun and hot glue sticks
- soldering iron and solder
- flashlights, 2-3 for a class of 30
Worksheets and AttachmentsVisit [ ] to print or download.
- A basic understanding of circuits; if necessary, conduct or refer to the Circuits lesson
- Basic Arduino programming skills
- Soldering skills
While the designers of large buildings such as office buildings and schools strive to create elegant workspaces that people enjoy spending time in, it is not unusual for large buildings to have some spaces with no windows. Even rooms with a few windows and natural light may not have good views or connections to the outdoors. It is also impossible to create spaces that meet everyone’s desired ambiance. So, as an engineer, you decide to spice up your personal work area to “bring the outdoors in.”
Who has heard of the term “the Internet of things”? (See what students know about the IoT.)
Our world now consists of billions of computing devices with the potential to share data using the existing infrastructure of the Internet. These “things” are the many items in our lives that are embedded with electronics, software, sensors, actuators and network connectivity such that they can exchange useful data—they are the computing devices in vehicles, home appliances and all sorts of other electronic items.
The Internet of things is changing how we interact with the world in our everyday lives. The IoT makes remotely collecting/receiving data and sensing/controlling devices easier than ever—it’s a merger of the physical world and computer-based systems. Using the IoT, people can control their home lights and heating/cooling systems using smartphone apps, doctors can remotely check peoples’ cardiac monitors and pacemakers, and Google searches for “where are my keys” yield location answers specific to us!
Other IoT applications include built-in auto sensors, farm/wild animal transponders, field operating devices that aid search and rescue operations, live-feed cameras, and cloud-based, voice-controlled virtual personal assistants (like Amazon’s Alexa). In more complex systems, the IoT encompasses technologies like smart grids, virtual power plants, smart homes, intelligent transportation and smart cities.
So the Internet of things (IoT) is the network of these physical devices—the “things”—and our ability to flow data through the Internet between them. The possibilities are only limited by our imaginations!
Your engineering project: Using an Arduino, other microprocessors and hundreds of LEDs, you will create a system that pulls real-time weather data from the Internet and relays the data to a floating light fixture of handmade cloud lanterns that mimics the weather/lighting outside. In addition to basing the cloud color on the weather, you will also set up the light to display a multitude of desired colors that you control from a smartphone or other smart device. Are you ready to create your “cloud-connected cloud”? Let’s get started!
In this activity, students take advantage of the Internet of things (IoT) to collect weather data from a source of their choice and create a hardware and software system to visualize the data in the form of an indoor cloud light fixture.
For more background information, watch the 17-minute October 2012 TED talk, The Internet of Things: Dr. John Barrett at TEDxCIT, at https://www.youtube.com/watch?v=QaTIt1C5R-M.
Before the Activity
- Assemble the materials and make copies of the Cloud Wiring Handout.
- If students are unfamiliar with soldering, then solder the male headers to the SparkFun Thing board and female headers onto the breadboard in advance. Alternatively, a few days before the activity, lead students through a short How to Solder: Through-Hole Soldering tutorial at https://learn.sparkfun.com/tutorials/how-to-solder-through-hole-soldering.
- On each pushbutton switch, cut off the two legs that are diagonal to each other so that they do not cause a short circuit.
- The female and straight male headers on the Materials List come as single rows of 40 holes. Cut them each into four pieces so each row has 10 holes.
- Cut the right-angle male headers into rows of 6.
With the Students—Introduction
- Present to the class the Introduction/Motivation content for background and project introduction.
- Divide the class into groups of three students each.
- Distribute the materials and handout.
With the Students—Physical Cloud Making
- Have groups assemble the clouds—the outer cloud structure for the light fixtures. Start with an open white paper lantern and hot glue pieces of polyfil in small sections (see Figure 1-left) until the entire lantern is covered. Tip: To make the cloud look cool when it is lit up, swirl and twist the polyfil before gluing it on or make other fun crazy shapes (see Figure 1-right).
- When the lantern is fully covered with polyfil (don’t worry about the top and bottom holes at this point), have students hold a flashlight inside to see what the lantern looks like when lit up. With this feedback, cover any visible bare spots with more polyfil so the lantern is hidden behind cloud-like fluff, as seen in Figure 2.
- Have students repeat this process for all the lanterns (see Figure 3).
- Once all lanterns are covered in polyfil, have students use fishing wire to tie them together. A good approach is to pick one lantern to be the highest point of the cloud and then tie the tops of the other lanterns to the top of that one (see Figure 4-left). This arrangement makes the resulting cloud look like it is “bobbing” and “shifting,” but if students want it to be more secure, have them tie the lanterns more tightly to each other and even tie the bottoms together as well (see Figure 4-right).
- Once the lanterns are tied together, have each team secure its cloud to a wooden dowel to make it easier to transport and hang (see Figure 5). Direct them to set up the cloud near their workstations by suspending it between two tables or chairs so that they can easily install the lights and see what the cloud looks like lit up. Let them continue to add or remove the polyfil covering as they see fit.
Electronics Assembly Part 1: Building the Pro Mini Circuit
- Following the handout diagram and table (also shown in Figure 6 and Table 1), have teams connect the components. Note: Pins not listed in Table 1 are not used.
- As teams are working, bring the following points to their attention:
- Point out the placement of the 1000-microfarad capacitor between the LED power and ground. Doing this helps to better distribute the current so that you do not accidentally blow out the first LED. As a precautionary measure, this is a good practice to follow for any string of wires.
- Also point out the placement of the 330Ω resistor between the DIN of the LEDs and the microcontroller. This is another prudent practice in order to protect the addressable LEDs.
- Inform students that they are using addressable LEDs. Unlike non-addressable LEDs, in which each LED shows the same color as its neighbor, addressable LEDs can be programed to show various colors within one light strip. Since they only work in one direction, make sure students plug in their addressable LEDs from the end of the spool hanging off. (For testing purposes on a breadboard, students can us three male-female wires to connect from the LED spool to their breadboards.)
- Make sure students notice that the Pro Mini is powered separately from the LEDs—through the mini USB port on the FTDI Basic; then the USB cord can be connected to a computer or a USB wall charger. Note: See the Additional Multimedia Support section for documents about hooking up the Arduino Pro Mini to the FTDI board. An incorrectly plugged in FTDI can burn out the Arduino Pro Minis.
Code Part 1: The following code runs the lights off of the Pro Mini so that students can scroll through the different pre-programmed lighting sequences.
- Have groups download onto their computers the most recent GitHub Cloud repository, https://github.com/sparkfun/IoT_CloudCloud and open the folder sketch titled LED_Button_Demo.ino. To find it, click on “Pro_Mini,” then “LED_Button_Demo.”
- Direct teams to plug in the Pro Mini, choose Pro Mini as the device, select the corresponding COM port, and then click upload.
- Before uploading the code, have students add the Adafruit NeoPixel library. To do this within the Arduino interface, select Sketch > Include Library > Manage Libraries. When “Manage Libraries…” is selected, a separate window pops up > search for “Adafruit NeoPixel.” To include this library, select “Adafruit NeoPixel by Adafruit.”
- Have students test that the code works with the soldering job. Check to make sure the LED strip lights up as shown in Figure 7. To do this, plug in and turn on the power supply, and then upload the “LED_Button_Demo” code from the Arduino application on the computer. Press the button on the circuit to get the LED 5 m spool to begin lighting up.
- If the code does not upload, check that the correct board is selected in Arduino. To do this, select Tools > Board > “Arduino Pro or Pro Mini,” then Tools > Board > select the processor you bought; it is specified in its packaging, such as “ATmega328(5V, 16 MHz),” and finally under Tools > Board > select the correct com port, for example, “COM 7.”
- If the code uploads, but the lights do not turn on, check that the addressable LEDs are correctly wired. These LEDs only work in one direction, so plug in the red, green and yellow wires from the end of the spool that they can pull. (The arrows on the spool from this end point towards the right.)
- Check that the correct power supply is being used. For example, a battery that supplies 5V and has a max current of 4A.
- In order to prevent any short circuiting and create a stronger connection, advise the teams to use hot glue to cover the wires leading to the barrel jack. While gluing, make sure nothing is plugged in! (See Figure 8.)
Electronics Assembly Part 2: Adding the Internet-Connected Portion
This section covers adding a SparkFun Thing to the project to enable Internet connectivity. Keep all the soldering done in Part 1, but add a SparkFun Thing board to enable using a smart device and pulling weather data.
- Have students connect the components following the handout diagram and table (also Figure 9 and Table 2). Note: Pins not listed in Table 2 are not used.
- Point out the use of the capacitor and resistor, as previously mentioned.
- If not already done, instruct students to carefully solder in the female headers where the Thing board will sit on the breadboard (see Figure 10) and male headers to the Thing board (see Figure 11). This completes the circuit (see Figure 12).
Code Part 2: Because this project requires two boards with microcontrollers, they must be programed separately. The following codes provide groups with the opportunity to select their own colors and utilize weather data instead of using pre-programed data from Code Part 1.
- Have teams open the GitHub Cloud repository. Then open the sketch titled LED_Control.ino. To find it, click on “Pro_Mini,” then “LED_Control.”
- Have students hook up the Pro Mini as before (plug in the Pro Mini, choose Pro Mini as the device, select the corresponding COM port, and then click upload).
- In order for their code to upload, have students add two new libraries within the Arduino application on their computers—the “Adafuit_Neopixel” and “AltSoftSerial” libraries. Follow these steps: Sketch > Include Library > Manage Libraries… search to find each library > click to install.
- Direct each team to set up Blynk on its smart devices as instructed on the handout. To do this, they download the app, create a new project, and get an authentication token, which they will need to paste in the SparkFun Thing code. Then they insert some widgets and assign them virtual pins, as shown in Table 3. Pages 4 and 5 of the handout provide a step-by-step photo guide of this process. After creating all the LEDs, buttons, the ZERGBA, and the LCD, and assigning them to the correct virtual pins, they can be arranged to look like Figure 13, and the Blynk app is ready for use.
SparkFun Thing Code
- To program the SparkFun ESP8266, a special add-on for the Arduino IDE is required to be able to choose the ESP8266 board. Give students time to look over the ESP8266 Thing Hookup Guide at https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon (link provided on the handout).
- Next, students download the GitHub libraries for Blynk, Adafruit’s Neo-Pixel Libraries, and lastly add the GitHub Cloud Repository for this project. Remind students to extract all zip folders.
- Tell students to open the Thing code in the GitHub Cloud Repository, and open the sketch titled CloudCloud.ino
- Have them change the Wi-Fi and password to your network.
- Add the authorization token from the Blynk app, and upload it to the SparkFun Thing via computer.
- To obtain weather from a specific city, change the code by adjusting the location latitude and longitude, which students can find via an Internet search. It is fun to let students select any location they want for weather data.
- When students are uploading the code, remind them to choose “SparkFun ESP8266 Thing” as the board under the Tools tab.
- Direct students to select “Upload using: serial,” “CPU frequency: 80 MHz,” and “Upload speed: 115200” under Tools. Make sure students’ Thing boards switches are ON. Direct them to choose the COM port that the Thing board is hooked up to, and press the Upload button. If any issues arise, see the Troubleshooting Tips section. Students also need to add a new library using the same steps they followed to add new libraries in the Code Part 1 and Code Part 2 sections.
- Once uploading is finished, tell students to unplug the Thing board from the computer, hook it back up to the circuit, power the Pro Mini (that is also powering the Thing board) and the LED strip.
- Have students make sure the Thing board switch is turned ON and wait 30-60 seconds.
- Direct the groups to open up the Blynk app and run the project that was created by pressing Play in the top right corner.
Installing the LEDs into the Clouds
- With the LEDs up and running, tell students to place them into the cloud and test how it looks (see Figure 14). Give teams time to distribute the lights between the lanterns and adjust them as they see fit.
- Once groups are happy with the LED distribution, tell them to use fishing line to tie the LED strips to the top of each paper lantern, as shown in Figure 15. It is alright if the LED strip is not very secured in the lantern because it doesn’t make much difference whether they are secured or not. Since they will always be hanging in the same way and are not expected to shift much, just securing the strip to the lantern at a few spots is sufficient.
- Give students time to glue additional polyfil to their cloud fixtures to fill in any bald spots and cover any exposed LED strips (as seen in Figure 16). Tip: Rolling the polyfil makes it denser so it better covers the LED strips.
- Let students explore controlling their clouds using the Blynk app.
- Conclude with the post-activity assessment—a class show and discussion—as described in the Assessment section.
Internet of things: The network of billions of computing devices (embedded in vehicles, home appliances, other electronic items) that are able to connect and exchange data through the existing Internet infrastructure. The term was coined in 1999.
Think-Pair-Share: See what prior knowledge students have about the Internet of things. Expect that students might say that the IoT includes devices/items that connect to the “cloud” and can be controlled over wireless networks, Nest home devices that are used to control home appliances such as air conditioners, baby monitors that parents can control when away from their children.
Activity Embedded Assessment
Group Work: Observe students as they work. Make sure each group member is contributing, such as by assisting with the wiring, creation of the cloud or relaying instructions. Encourage students to take on different or more than one role.
Class Show: Have each group show off its design, explaining its cloud fixture settings and weather data source. Students’ explanations reveal their depth of comprehension of the project and related concepts.
Class Discussion: Conclude with a discussion about other creative ways to use the Internet of things and display weather data (besides fun cloud light fixtures!). Example student answers: Incorporate into a wall mirror a screen with weather data, create a screen over a window that displays weather from other locations, etc.
- Have students wear safety goggles when soldering and remind them that the solder can get very hot.
- Alert students to be careful when using the hot glue gun since hot glue may seep through the polyfil during placement and burn their skin.
Specific troubleshooting tips are provided in the Code Part 1 section.
When uploading to the Thing board, remember:
- If errors arise when attempting to upload undefined libraries, make sure that students have added the file states.h to the project.
- If issues still exist, check the Arduino IDE version being used; the provided instructions are written for version 1.6.5, so that is the recommended version to use.
For lower grades, pre-solder the male and female headers to the Pro Mini, breadboard and Thing. Assist students when hot gluing polyfil onto the lanterns.
Additional Multimedia Support
Connecting the Arduino Pro Mini to an FTDI board schematic; scroll to Hardware Tour section: https://learn.sparkfun.com/tutorials/sparkfun-usb-to-serial-uart-boards-hookup-guide?_ga=2.14041777.720853909.1523222759-833523215.1523222759
Using the Arduino Pro Mini 3.3V tutorial: https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v?_ga=1.1452597.564444804.1449868290
ESP8266 Thing Hookup Guide: https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon
Installing Arduino IDE tutorial: https://learn.sparkfun.com/tutorials/installing-arduino-ide?_ga=1.194414377.564444804.1449868290
Installing an Arduino Library (What’s a Library?) tutorial: https://learn.sparkfun.com/tutorials/installing-an-arduino-library?_ga=1.194414377.564444804.1449868290
WS2812 Breakout Hookup Guide: https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide?_ga=1.241624710.564444804.1449868290
Activity from SparkFun’s LED Cloud-Connected Cloud activity by Sarah Al-Mutlaq (includes a great 6-minute recap video) at https://learn.sparkfun.com/tutorials/led-cloud-connected-cloud
Copyright© 2017 by Regents of the University of Colorado; original © 2016 SparkFun Education
ContributorsSarah Al-Mutlaq; Kent Kurashima
Supporting ProgramSparkFun Education
Last modified: February 13, 2020