NSF-GK12 Program at Chelsea High School

Home

Biography

NSF-GK12 at Boston University

Boston University

Chelsea High School

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Lesson 3: Light Sensitive Navigation with Photoresistors

Subject Area
Engineering

Grade

11-12
Estimated Length
3-4 Lectures

Prerequisite Knowledge/skills

Basic knowledge of programming such as logic statements (AND, OR, IF … ELSE, and FOR, DO, and WHILE loops) and commands needed for robots movements.  Familiarity with electrical circuits and Kirkoff’s laws.

Description of New Content

 

This lesson introduces students to photo sensors. Through several examples and activities, students explore the applications of photo sensors in robotics. Students conduct a hands-on class activity in which they design and implement closed-loop photo sensor controllers for their robots. Also, students practice some circuit analysis through examples and exercises.
Goals
The purpose of this lesson is to introduce photoresistors and some of their applications such as light sensitive navigation of robots.

Materials Needed

 

 

  1. Robots
  2. Photoresistors – Cds (2 per robot)
  3. Resistors – 2 kΩ, 220 Ω, 470 Ω, 1 kΩ, 4.7 kΩ, 10 kΩ (2 of each per robot)
  4. Jumper wires
  5. 5-volt power supply and multimeter (1 per group)
  6. Computers for programming

Procedure

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Introduction:

Ask students whether robots are aware of their environment.  What do they need to recognize their surroundings? Make a comparison between robots and humans and ask what enables humans to understand about their environment. More specifically, ask what robots need to recognize areas with light or dark. Give several examples of the situations why robots need to sense light. Establish that photo sensors in machine world are analogous to eyes in biological world.

Introducing Photoresistor:

Ask students to describe the function of a resistor.  Ask whether resistors have fixed values. Introduce the photresistors at this point and ask students to guess how photoresistors work using its name as a hint. Establish that the photoresistor is a light dependent resistor meaning that its resistance value depends on the brightness or illuminance of the light that shines on its light detecting surface. Draw a photoresistor and its schematic symbol on the board and ask students to find it in their kit.

Activity #1: Building and Testing Photoresistor Circuits

Draw this schematic on the board and explain how the photoresistor circuit works. As an example, using a 5 V input, resistance of 2 kΩ for photoresistor, and Kirkoff’s Laws, calculate the output (2.5 V).  Have students solve the same problem with a different value for photoresistor. Establish that the output voltage is calculated using the following equation:

V_output  = 5V x (2000 Ω) / (2000 Ω + R)

where R is the resistance of the photoresistor.

Have students build the equivalent circuit.  This sensor circuit will be able to detect the difference between shade and no shade. Ask students to test their circuits with an input of 5V (using power supply) and read the output voltage using the multimeter.  Ask students to experiment with different voltage dividers by replacing the 2 kΩ resistor with different resistors (470 Ω, 1 kΩ, 4.7 kΩ, and 10 kΩ) to determine which resistors work best under the lighting conditions. The best combination is one that is not overly sensitive, but does not require them to cup their hands over the photoresistor either.

Reading Sensor Output Values in Computer:

Ask students to find I/O (Input/Output) pins on their robots. Ask them what they think the functions of these pins are. Give a brief description of the I/O pints’ functions and have students to rebuild two photoresistor circuits, one on the right and the other on the left side, on the robot’s breadboard using their best combination of resistors found in activity #1.

Help students to code their robots to read the sensor values (for a sample code click here).

Activity #2: Roam and Avoid Shadows Like Objects

Ask students whether the information provided by the sensors is useful.  How they can use the sensor readings to improve the robot performance. Guide the class towards the use of logic statements (IF…ELSE). Have students write directions for their robots to roam around a space and avoid shadows on a piece of paper. Check students’ work and guide them towards the use of IF…ELSE statements. Once the directions are complete, have the students to program their direction in the language of robots (for sample code click here). Allow students to test their robots on a white surface with dark spots. If the robots do not perform well, help the students with the debugging of their codes by asking questions such as

      • what part of the surface does the robot have problem with?
      • what is your current command for that part?
      • if you were the robot, what directions would you need to over come this problem?
      • how do you translate those directions into commands in your program?

Evaluation

 

Draw a schematic of a photoresistor circuit on the board with input of 5 V, output of 2.1 V, and voltage divider resistance of 2 kΩ. Ask students to calculate the value of photoresistor’s resistance.

Introduce a new activity #3: Follow Flashlight Beam. Have students to write directions needed for the robots to execute this activity

Extensions

 

More information can be obtained from the sensors by adding a capacitor to the circuit. It can be an activity to demonstrate the advantage of RC circuits and their effects on sensor reading.

Activities #2 and #3 can also be repeated when Infrared (IR) sensors are introduced.
Reference Robotics with the Boe-Bot (PARALLAX inc.)

 

 

Contact Morteza at morteza@bu.edu

 

Any Questions? Contact Morteza at morteza@bu.edu