Night light

Main Idea

In Physics students learn about the light and the electricity. The problem of the streetlights’ operation is introduced to students in order to get them involved in making a circuit consisted of a photoresistor and a led. They program a night light using the S4A software. This learning scenario aims to introduce to students programming concepts which they use them to address a real-life problem.

CreatorMaria Nikita
SubjectPhysics, Computer Science
Length 40 minutes
Pedagogical ApproachHaptic learning, Real life
CompetencesAlgorithms, Problem solving, Decomposition
GradesPrimary school, 5th grade, students with no special needs
TechnologiesS4A (Scratch for Arduino) software, Arduino kit
Description

Introduction: In Physics students learn about the light, the electricity, and the circuits.

Αctivity 1: The teacher introduces the problem of streetlights that don’t always come on when it gets dark, but earlier. This is something that causes waste of energy and light pollution. When the time changes (daylight saving time) the streetlights must be regulated again to come on the right time. The teacher asks if it would be more practical to have a sensor that can react to light. (5 minutes)

Discussion: Students discuss in class how a sensor that can react to light would make the streetlights be automatic. The teacher presents to students a photoresistor (light-sensitive resistor) and explains to them its use. (10 minutes)

Activity 2: Students split up in groups of 3 or 4. The teacher gives to each group an Arduino UNO board, a breadboard, a photoresistor, a LED, 2 resistors (220Ω and 10kΩ), jumper wires and a USB cable. Groups are also given a hard copy with the Arduino circuit design that they are about to make. The teacher explains to the students that they are going to make an automatic night light. The students are encouraged to collaborate for the purpose of placing the right components in appropriate positions on the breadboard and on the Arduino board. Meantime, the teacher explains in simple words what the Arduino is and what is the role of every other component they use. (25 minutes)

Activity 3: The students create a program in S4A which uses the input of the photoresistor to trigger the LED. The students are already familiar with the Scratch environment, so the S4A environment does not seem completely new to them.

Worksheets

AOpen the S4A program. Connect the Arduino board with the computer using the USB cable. Watch the Analog0 value on the sensor board.

  1. Cover the photoresistor with your hand. What do you observe?

———————————————————————————————————————————————

  • Turn off the lights of your class (or shut the curtains). What do you observe?

———————————————————————————————————————————————

  • What is the threshold value that differentiates darkness from lightness? 

———————————————————————————————————————————————

Β. Program the LED to switch on and off depending on the value of the photoresistor sensor (Analog0 value).

  1. Which block are you going to use to check if the value of sensor is less than the threshold?

———————————————————————————————————————————————

  • Which block are you going to use to switch on the LED if there is darkness in your class and switch off the LED if there is lightness?

———————————————————————————————————————————————

  • Which block are you going to use to have your program repeat forever?

———————————————————————————————————————————————


C. Run and check your program. Cover/uncover the photoresistor with your hand or close/open the curtains of your class and see if your night light works properly. Make any changes if necessary.

(20-40 minutes)

Activity 4: Students enrich their program. They create a story regarding the dark and  the light.

A. Create a story regarding the dark and the light. Add backgrounds and sprites to your program. Follow the instructions above:

– Choose a background which presents a place during the daylight and a background which presents a place during the night.

– Choose sprite(s).

B. Add commands to your program. Program the background to change from day to night if the value of sensor is less than the threshold and the opposite. At the same time program your sprite(s) to say or/and do something specific if there is daylight and say or/and do something different if there is dark.

(20-40 minutes)

Leave a Reply

Discover more from Computational Thinking and Acting

Subscribe now to keep reading and get access to the full archive.

Continue reading