Year 4, Term 3: SensorsFocus: Analog to digital conversionsScope and sequence: Analog to digital conversions |
|
Learning
intention: Students
use micro controllers to monitor and log data from
electronic sensors.
|
|
NSW Syllabus
|
Australian Curriculum (version
9.0)
|
"A student questions, plans and
conducts scientific investigations, collects and summarises data
and communicates using scientific representations." (ST2-1WS-S)
|
"Students learn to implement
simple algorithms as visual programs involving control
structures and input." (AC9TDI4P04)
|
Electric sensors can sense changes in the physical world such as temperature, moisture and acceleration. When used in conjunction with devices such as micro controllers, sensors can be used in various ways to interact with our surroundings.
Symbols game
The <, > and = symbols were covered in SILO 1.2 'Symbols'. The following game build on this knowledge in the context of coding and the concept of 'if then'. Paper cards could be made but cardboard works better. The image below shows number cards and symbol cards. The numbers are between 1 and 100 but the symbols cards have = on one side and < on the other. Depending on the orientation of the < card it could be < or >. The game is played as follows:
This video by Martin Levins titled Sensors 1 (5:10) provides an excellent introduction to sensors.
This video by Martin Levins titled Sensors 2 (7:46) provides an overview of some commons sensors and how they work.
This video by Martin Levins titled Sensors 3 (4:47) shows how sensors can be used with micro controllers such as the micro:bit.
Potentiometers (pots) are variable resistors. Because the resistance can be varied by turning the shaft, usually accompanied with a knob, they are often used for applications such as volume controls.
By using the following code, the simulator will display the resistance on a scale of 0 to 1023 if you drag your cursor along Pin 0 on the bottom left-hand side.
Making a simple synthesizer
Using the same cables to connect the pot to your micro:bit you can make a simple synthesizer. As you rotate the knob you will produce a continuously variable frequency using the following code:
The main concept in this unit is understanding the difference between analog and digital. The following video (7:12) titled Digital vs analog. What's the difference? Why does it matter? explains this well.
The following screenshot from the same video
helps illustrate the difference between digital and analog using
variations in colour.
https://microbit.org/get-started/user-guide/data-logging/#automatic-logging
What is data logging?
How does micro:bit data logging work?
This work is licensed under a Creative
Commons Attribution-NonCommercial-ShareAlike 4.0 International License.