Lesson 2 - Home Lighting: Input and Output Exploration

Lesson 2 Home Lighting – Input and Output Exploration

 

image3.png Challenges: 2-1, 2-2

Students will explore input and output systems in smart home devices.

image5.png I can use a PIR motion sensor input to control an LED output.

image5.png I can identify and connect inputs and outputs correctly.

image5.png I can explain how inputs trigger outputs in a system.

Engage

image7.png 2 min.

Imagine walking to your house on a dark evening. You don’t have to fumble for a light switch — the lights turn on automatically as you step near!

image9.png

Why does the light on automatically?

What smart lights have you seen at home or in public?

Share your ideas with your classroom!

Background

image7.png 3 min.

Lighting sensors are vital components in smart light systems. They play a crucial role in optimizing the performance and efficiency of lighting installations. There are several common types:

Light sensors, work by detecting ambient light levels.

Passive Infrared (PIR) sensors are designed to detect body heat by sensing the infrared radiation emitted by living things.

Ultrasonic sensors utilize high-frequency sound waves to detect distance.

image10.png

Inputs: Signals that tell the system what to do. These can be motion from a sensor, a button press, a voice command, or even a tap on a phone app. The PIR motion sensor is the input sensor for this lesson.

image11.png

Outputs: The system’s response to an input. This could be an LED turning on, a light dimming, a speaker playing a sound, or a screen showing a message. The strip light is the output actuator of this lesson.

image12.png

Build and Connect

image7.png 10 min.

image13.pngBuild together by the building instruction.

When groups finish building, prompt them to discuss these questions:

Where would you place the PIR motion sensor and strip light in your home to help you at night?

Why is that spot better than others?

Students should set up the PIR motion sensor and strip light based on their discussion.

Program

image14.png 25 min.

image15.png Challenge 2-1: Upload and Connect

image17.pngAsk students to connect the UNIHIKER K10 to computer with the cable.
image18.pngAsk students to load and upload the starter project [program2-1].
image19.pngimage20.png
Read the code block and figure out which pins on the UNIHIKER K10 the sensor and actuator are connected to.
Ask student to complete the drawing and make hardware connections following the diagram.
This is the standard diagram of the finished connection diagram.
image21.pngWhen groups finish connecting, prompt them to explore the PIR motion sensor and the strip light. They could wave hands in front of the sensor and observe what happens.
As groups explore, you can encourage them to start using the term input to explain the what detected by the sensor and output to describe the light. when it receives each input.
Students will discuss the relationship between inputs and outputs observed in their model.

NOTE: The strip light has two sockets. Please make sure to connect the correct side (the arrow start) to the UNIHIKER K10’s pin socket. And the other socket is for extending the strip light.

 

image15.png Challenge 2-2: Explore PIR Sensor Detection

image23.pngEncourage groups to discuss:What does read digital = 1/0 mean?Explain that this command reads digital signals of 1 or 0 from Pin 0. Here, 1 indicates detected motion, while 0 means no motion is detected.
image24.pngimage25.png
Ask students to change 1 to 0 in the comparator block so that it reads P0 = 0. Then challenge students to change the blocks in the program to make the system behaving the same.
Here’s what the completed program should look like.

Extra Practice

image14.png 5 min.

Brainstorm other objects or creatures that might trigger the PIR motion sensor (e.g., stationary hand, a moving book).

Test each item in the sensor’s working zone. Which ones trigger the LED? Why do you think that is?

Share your findings with the class—did anyone discover a surprising trigger?

 

Next Class: Lesson 3

Current Tutorial: Click Here

icon Smart Home-Lesson 2.zip 4.98MB Download(0)
License
All Rights
Reserved
licensBg
0