Documente Academic
Documente Profesional
Documente Cultură
Overview
Students develop knowledge and skills in the use of a general-purpose programming language to design, produce and evaluate a monitoring
and alert system using a microcontroller. They document their skill development tasks in a design and production folio.
Students are provided with opportunities to develop algorithms and implement them in a general-purpose programming language. Students will
program a microcontroller, connect sensors and output devices and have the opportunity to build a case for the system.
Students with disability may require adjustments to safely engage in practical tasks.
The glossary in the Technology Mandatory Years 7–8 Syllabus has definitions for terms used in the Digital Technologies context.
10 Weeks (25 hours) Functioning moisture sensor Throughout the unit of work the content marked with an * indicate
opportunities for assessment of, for or as learning.
Outcomes
A student:
TE4-1DP designs, communicates and evaluates innovative ideas and creative solutions to authentic problems or opportunities
TE4-2DP plans and manages the production of designed solutions
TE4-4DP designs algorithms for digital solutions and implements them in a general-purpose programming language
1
TE4-7DI explains how data is represented in digital systems and transmitted in networks
TE4-10TS explains how people in technology related professions contribute to society now and into the future
A microcontroller is a small, simple computer. It includes a processor (CPU), memory, and input/output pins on a single integrated circuit board.
Some microcontrollers also include integrated inputs (sensors) and output components (actuators) such as buttons, temperature sensors, LEDs
and buzzers. Microcontrollers are used in systems or products that require automatic control. An example would be the buttons that control a lift
in a multi-story building. An inexpensive and widely used microcontroller is the Arduino Uno. A microcontroller recently developed for
educational purposes is the BBC Micro:bit it has a number of integrated input and output components built onto it.
Thanks to microcontrollers, we all have the power to cheaply create a monitoring and response system to suit our needs. Using specifically
written instructions that program the microcontroller called code, we can tell the microcontroller what it needs to do when it senses data from its
environment.
2
Content Suggested teaching, learning and assessment Resources
3
Content Suggested teaching, learning and assessment Resources
4
Content Suggested teaching, learning and assessment Resources
5
Content Suggested teaching, learning and assessment Resources
6
Content Suggested teaching, learning and assessment Resources
7
Content Suggested teaching, learning and assessment Resources
Identifying and defining Class brainstorm then think/pair/share for home monitoring ideas How a fax machine works
Students: ▪ Students brainstorm situations in their home that would benefit from http://webs.mn.catholic.edu.a
define and decompose monitoring and record them in a mind map. u/science/wilko/IS94/notes/no
real-world problems, taking ▪ Individually, students extend their mind map, identifying what data 5.htm
into account functional needs to be captured for each situation and how this can be
requirements and a range captured (sensors). Reading sensors with an
of constraints, eg ▪ Students share and discuss their ideas with a partner. Arduino
economic, environmental, ▪ One student from each pair presents to the class. https://www.allaboutcircuits.c
social, technical and ▪ Repeat or combine with the above for the output(s). om/projects/reading-sensors-
usability (ACTDIP027) ) with-an-arduino/
Class presentation/explanation of sensors Arduino sensors
Teacher explains in fundamental terms how some key sensors work, https://core-
including the conversion of energy into an electrical signal, which is then electronics.com.au/arduino/se
digitised for the computer to process. nsors.html
Arduino sensors
https://www.littlebirdelectronic
s.com.au/sensors/
8
Content Suggested teaching, learning and assessment Resources
(ACTDEP038,
ACTDIP027, ACTDIP031)
DT ST
9
Content Suggested teaching, learning and assessment Resources
try coding. There are many hour of code resources available online which
provide a quick taste and brief introduction to coding for anyone without
Hour of code:
coding experience. Some example hour of code activities are listed in the
https://hourofcode.com/au
resources column.
10
Content Suggested teaching, learning and assessment Resources
BEGIN
Heat pan
Combine all ingredients in a bowl to make batter
WHILE batter remaining
Add butter to pan
Spoon batter into pan
REPEAT
Cook batter
UNTIL Bubbles burst on surface
Flip Pancake
REPEAT
Cook pancake
UNTIL Pancake turns golden brown
Place pancake on plate
ENDWHILE
Serve pancakes with berries and syrup
END
A taste of coding
▪ Students complete an online hour of code activity.
▪ Following the activity, go through the key points students should take
away from the activity, including variables, data types, process and
sequence and link back to the design project.
▪ Students write a reflection on what they learnt during the hour of
code, including any difficulties faced.
11
Content Suggested teaching, learning and assessment Resources
12
Content Suggested teaching, learning and assessment Resources
Example tutorials for Arduino Uno with MAAS ThinkerShield. MAAS Get On With It
https://maas.museum/app/upl
Example tutorials for Arduino oads/2016/10/GetOnWithIt-
v1-2-ONLINE.pdf
Example tutorials for BBC Micro:bit.
Arduino examples
Tutorials should cover: https://www.arduino.cc/en/Tut
▪ creating and saving new files orial/BuiltInExamples
▪ compiling files and uploading them to the microcontroller
▪ inputs from a few built in sensors Micro:bit resources
▪ output for a few built in actuators http://microbit.org/en/2017-
▪ setting up variables and assigning them values 03-07-javascript-block-
▪ simple operation on variables resources/
▪ decisions based on a condition (or conditions)
▪ repetition based on a condition (or conditions)
▪ storing data
▪ connecting and writing code for additional sensors and/or actuators.
13
Content Suggested teaching, learning and assessment Resources
they have learnt and how this could be applied to their project. This
is added to their design and production folio.
14
Content Suggested teaching, learning and assessment Resources
15
Content Suggested teaching, learning and assessment Resources
▪ It is recommended the teacher has a working version of the Flowchart sample code/sketch
hardware and/or software to compare students’ work if a solution to Sample code/sketch for a
a problem is not readily found. moisture sensor
Prototype
▪ Using their sketches as a guide, students set up the microcontroller
hardware by connecting the required sensor.
▪ Using the flow chart/pseudocode as a guide, students code the plant
monitoring system algorithm in the appropriate general purpose
programming language.
▪ Students write code/sketch for their chosen monitoring system. This
can be an modification of code or sketch provided by the teacher or
sourced by the student.*
▪ Students upload the code to the microcontroller. The functionality of
the code can be tested using soil samples with known moisture
content (see next section).
16
Content Suggested teaching, learning and assessment Resources
of inputs.
▪ Testing is recorded in the students’ design and production folio using
a table with headings. Each table should record the software version
(or test date), expected output, observed output and solution.
▪ Using the collected data, students include cut off values within their
code to decide when a plant needs to be watered. Students research
different plant and soil types, experimenting to determine cut off
values for moisture levels.*
17
Extension Activities
Write a piece of additional code to add a piezo alarm to the project at the top end of the dry measurement so that an audible alarm is also
heard.
Code the piezo alarm to play different tones to indicate soil moisture levels e.g. high tone for dry and low tone for moist.
Adapt the moisture sensor to gather data on food, for example: moisture levels in scones and muffins.
Draw a pseudocode flowchart to represent the Arduino code for the soil moisture sensor.
Modify the code to use a 2 line LCD display giving further information about the soil conditions and how to manage them.
Build a housing to enclose it all safely and neatly.
18
Evidence of learning
Throughout the unit the content marked with an * indicates opportunities for informal assessment:
19
Arduino Microcontroller Overview
The Arduino project started in 2003 as a program for students at the Interaction Design Institute in
Ivrea, Italy to provide a low-cost and easy way for novices and professionals to create devices
that interact with their environment using sensors and actuators.
Arduino consists of both a physical programmable circuit board (a microcontroller) and open-
source software that runs on your computer that is used to write and upload computer code to the
physical board. Information about Arduino can be found at
https://www.arduino.cc/en/Main/Software where Arduino open-source software can be
downloaded free.
Integrated Circuit
Power Jack
Inputs
A range of sensors (inputs) can be connected to an Arduino including light and moisture sensors.
Outputs
Actuators (output devices) can be connected to the microcontroller. They can include outputs
such as powering an LED or a buzzer.
1
Programming Microcontrollers
In the sample program/sketch below the Arduino is programmed to make an LED turn on and off
once per second. By changing the values (variables) in the program, both the duration of the
‘blink on’ and the duration between ‘blink off’ can be changed. The variables can also be adjusted
to ‘blink’ in different patterns, for example: sending messages in Morse code.
2
Equipment Guide – Monitor Your Home and Garden
Equipment Guide
Step by step process to build an Arduino controlled soil moisture
sensor
Parts list
Approximate
Part Quantity Option(s)* Cost
(2018)
1
Equipment Guide – Monitor Your Home and Garden
Approximate
Part Quantity Option(s)* Cost
(2018)
sensor
Little Bird Electronics DF-
$7.02
SEN0114
LEDsales
$2.20
9V_BATT_HOLDER
9V battery box /
1
snap
Ebay $1.50
Container
1 Woolworths Systema 380ml $4.25
(housing)
9 volt battery 1
* sample suppliers only, alternate suppliers may be better suited to your school context.
2
Equipment Guide – Monitor Your Home and Garden
Component assembly
1. Trim the legs of the three resistors using
side cutters. Bend the legs 900 and place in
position on the breadboard.
Note: Holes in the breadboard are
connected in rows of five (running vertically
in the diagram shown).Resistors are non-
polarised so orientation on the breadboard
is not critical.
2. Place 3 x LED’s in position on the
breadboard taking note of the orientation as
they are polarised and only go one way.
Note: There are three ways to determine
polarity. The long leg on the LED is
positive, the flat edge on the LED is on the
negative side, the cathode(cup) in the LED
is larger than the anode and is negative.
3
Equipment Guide – Monitor Your Home and Garden
Note:
Schools may use jumper wires instead of the breadboard for connections.
Schools may choose to solder the connections in lieu of the breadboard.
4
Equipment Guide – Monitor Your Home and Garden
5
Equipment Guide – Monitor Your Home and Garden
6. You can now experiment with some variations. For example, you could set a range of
values to measure water requirements for cacti which would be different to the settings
you might use for swamp hibiscus.
Note: After any changes are made you will need to upload them again to the Arduino.
6
Equipment Guide – Monitor Your Home and Garden
The numbers in the orange boxes above can be changed to suit different electrical
connections as well as different soil moisture levels for different soils/plants. This can be a
research task for students to determine the variable for each plant and/or soil.
7
Equipment Guide – Monitor Your Home and Garden
ground
+5volts
sensor output
8
Equipment Guide – Monitor Your Home and Garden
Start
no
Is value
yes LED Ok on
between 401
and 625
no
Is value yes
between 626 LED Wet on
and 1023
Delay 5 seconds
1
Equipment Guide – Monitor Your Home and Garden
Sample code/sketch
/*
* The moisture thresholds are estimates, students will need to research and adjust these
variables to suit their plants.
*/
//Arduino pins
int ledDry = 8;
int ledOk = 9;
int moistureLevel;
void setup() {
pinMode(ledDry, OUTPUT);
pinMode(ledOk, OUTPUT);
pinMode(ledWet, OUTPUT);
pinMode(moistureSensor, INPUT);
2
Equipment Guide – Monitor Your Home and Garden
Serial.begin (9600);
void loop() {
moistureLevel = analogRead(moistureSensor);
if (moistureLevel<=soilDry){
digitalWrite (ledDry,1);
digitalWrite (ledOk,0);
digitalWrite (ledWet,0);
if ((moistureLevel>soilDry)&&(moistureLevel<=soilOk)){
digitalWrite (ledDry,0);
digitalWrite (ledOk,1);
digitalWrite (ledWet,0);
Serial.print("Soil is OK ");
digitalWrite (ledDry,0);
digitalWrite (ledOk,0);
digitalWrite (ledWet,1);
Serial.println(moistureLevel);
delay(5000); // waits this long in milliseconds before taking the next reading