Colours and Lines
Use the Colour Sensor to detect and follow lines.
- Read through the pupil material in the EV3 Classroom App.
- Collect information about how the Colour Sensor works, and how the Colour and Reflected Light Intensity Modes could be used.
- You’ll need black electrician’s tape to create a thick black line.
- To complete this lesson, the pupils will have to have built the Driving Base model, which will take about 30 minutes to complete.
2. Engage (5 Min.)
- Use the ideas in the ‘Ignite a Discussion’ section below to engage your pupils in a discussion relating to this lesson.
- Divide your class into teams of two pupils.
3. Explore (20 Min.)
- Have each team build the Colour Sensor Down extension for their Driving Base.
- Allow the pupils time to use the programming stacks that have been provided to explore how the Colour Sensor can be used to detect and follow a line.
4. Explain (10 Min.)
- Have your pupils use the programming stacks to calibrate the Colour Sensor and then observe its effect.
- Facilitate a discussion about why it’s important to calibrate the Colour Sensor.
5. Elaborate (10 Min.)
- Challenge the pupils to program a better line-follower program.
- Don’t forget to leave some time for tidying up.
- Give feedback on each pupil’s performance.
- To simplify the process, you can use the assessment rubrics that have been provided.
Ignite a Discussion
Hardcoding the exact movements that a robot must make isn’t very efficient. Therefore, robots have different guiding systems to help them navigate their environment. One simple yet effective option is to use coloured lines on the floor, which a robot can follow using a sensor.
Use these questions to engage your pupils in a discussion about robots that can detect colours:
- Do you know of any robots that can detect colours?
- What are the advantages and limitations of using coloured lines as a means of navigation?
- What’s reflected light intensity, and how does a Colour Sensor work?
Setting Up the Path
Provide your pupils with black electrician’s tape to use for creating a thick black line to detect and follow. Allow them to explore different types of lines but advise them that very sharp angles are hard to follow.
Using the Colour Sensor
The Colour Sensor can be used in 2 different modes to solve this challenge (i.e., Colour Mode or Reflected Light Intensity Mode).
The Colour Sensor’s Reflected Light Intensity Mode will give maximum precision. Following a line is an alternating detection of 2 colours or 2 reflected light intensities. Spend some time with your pupils exploring the ways in which the sensor reports values.
Simplify this lesson by:
- Explaining the Colour Sensor’s Reflected Light Intensity Mode
- Simplifying the line that the Driving Base should follow
Take this lesson to the next level by:
- Challenging your pupils to modify their programs to follow lines of different sizes, colours and shapes
- Presenting a program called simple proportional line follower (see the Coding Tips section above) and having your pupils try to decode how the program works
Teacher Observation Checklist
Establish a scale that suits your needs, for example:
- Partially accomplished
- Fully accomplished
Use the following success criteria to evaluate your pupils’ progress:
*The pupils are able to program their Driving Bases to react to lines using the Colour Sensor.
- The pupils are able to calibrate the Colour Sensor and explain the importance of sensor calibration.
- The pupils are able to optimise their line-following programs to be more accurate.
Have each pupil choose the level that they feel best represents their performance.
- Bronze: I’ve made the Driving Base stop at a line.
- Silver: I’ve programmed the Driving Base to follow a line.
- Gold: I’ve programmed the Driving Base to follow a line and I’ve calibrated the Colour Sensor to account for changing light conditions.
- Platinum: I’ve not only programmed the Driving Base to follow a line and calibrated the Colour Sensor to account for changing light conditions, but I’ve also optimised it to move the Driving Base faster and more effectively.
Language Arts Extension
To incorporate the development of language arts skills:
- Have your pupils create a program called simple proportional line follower (see the Coding Tips section above) and create a presentation explaining how the performance of this program compares to their previous line-follower programs.
Note: This will require additional time.
The pupils who enjoyed this lesson might be interested in exploring these career pathways:
- Information Technology (IT Applications)
- Manufacturing and Engineering (Machine Technology)
- Manufacturing and Engineering (Pre-Engineering)