Loading...
Hello, there.
My name's Mrs. Taylor, and thank you for joining me for our lesson today.
Our lesson today is "Input Components" and this is part of the "Systems Approach to Design: Sustainable Futures" unit.
The outcome: I can identify and use different input components in control systems. There are five keywords today.
Switch, which means controls the flow of current by making or breaking a circuit.
Actuator, a component that converts energy or a control signal into a physical movement or action.
Sensors, a component that can emit a signal depending on the environmental conditions.
Pseudocode, note that the P is silent, pseudocode is a way of writing out computer programme instructions using plain English.
And flowchart, which is a diagram that shows the steps of a process from beginning to end.
There are two parts to the lesson, switches and sensors.
We begin with switches.
A switch controls the flow of current in a circuit or system by making or breaking the circuit, it is a mechanical component.
Making the circuit means to connect and allow current to flow.
Breaking the circuit means to disconnect and prevent current flowing.
Here we can see a picture of a lamp with a switch, and the symbol for a push to make switch, and one for a push to break switch.
Switches can be momentary or latching.
This means they can connect the circuit or system and allow the current to flow just for a moment when the button is pressed, or they can latch and connect the circuit or system until the button is pressed again to unlatch it and disconnect.
Here is a push switch, which is momentary, and a slide switch, which is latching.
Switches have a different number of poles and throws.
A pole is the number of separate circuits the switch makes or breaks.
The throws are the number of positions each pole can be moved to.
Here we can see the symbol for a single pole, single throw switch, abbreviated to SPST.
And here, we can see the symbol for a single pole, double throw switch, abbreviated to SPDT.
We now have a check for understanding.
Which of these shows a single pole, double throw switch symbol? Pause the video and have a go.
Fantastic, let's check.
That's right, it's C.
We can see that it has a single pole and a double throw, well done.
Toggle switches are off used for on or off.
Rotary switches are used when there are many poles needed, for example, here on a washing machine.
Button A and B on the micro:bit can be used as switches to send a signal.
Switches can also be added to the micro:bit as off-board components and connect to the pins.
Here we can see the micro:bit with a momentary push to make switch with an LED, and here we can see the latching slide switch on with an LED, and the latching slide switch off with an LED.
Sometimes an electrical signal needs to be converted into a mechanical action.
Switches are components that control an electrical signal by the mechanical action of making or breaking the circuit.
An actuator is used to create a mechanical action.
Actuators are used to create a mechanical action in various different systems, including camera zoom lenses, heaters or coolers, robotic arms, and conveyor belts.
And we can see some examples here.
Here we have a check for understanding.
Read the sentence and complete it by adding the missing words.
Pause the video and have a go.
Wonderful, let's check.
Switches are components that control an electrical signal by a mechanical action of making or breaking a circuit, well done.
We now move to task A.
Open Tinkercad and this file from the gallery.
Simulate the programme.
Describe what happens when button A is pressed.
Describe what happens when button B is pressed.
Amend the programme so that when button A and B are pressed simultaneously, both outputs are on.
Describe how you did this, then simulate the programme to test it.
Part seven, add an off-board switch to control an additional output.
And part eight, simulate and describe what happens.
Pause the video and have a go.
Fantastic, let's have a look at some of the answers you may have come up with.
For part three and four, you may have said, for part three, "When button A is pressed, the onboard LEDs display a smiley face for one second and then turn off.
I can press button A again and it repeats." And for part four, "When button B is pressed, the off-board blue LED illuminates for one second and then turns off.
I can press button B again and it repeats." For part five and six, you may have said, "I changed the first if statement from 'If button A' to 'If button A and B is pressed'.
I tested this and only the smiley face illuminated.
I then moved the digital pin high and low to the same If sequence as the onboard LEDs and removed the second If statement.
Now, both outputs come on when button A and B are pressed simultaneously." And for part seven and eight, you may have said, "I added a slide switch and a motor.
Now, when I slide the switch, the motor turns.
When I slide the switch the other way, the motor stops turning.
When I press button A and B, the smiley face and blue LED still flash on for one second." Well done.
We now move to the second part of the lesson, sensors.
Sensors are input components that convert physical properties of the environment into digital signals for processing.
Sensors can be onboard or off-board components.
For example, the micro:bit has several sensors built in, these are onboard.
For example, the first row of LEDs sense light.
The microphone senses sound.
The processor with a temperature sensor can sense the temperature.
The accelerometer can sense different forces.
And the compass can sense the magnetic field.
Off-board sensors include a force sensor, soil moisture sensor, an infrared sensor, passive infrared sensor, tilt sensor, photo diode, and ambient light sensor.
Here we have a check for understanding.
Which of these are micro:bit onboard sensors.
Is it A: an accelerometer, B: a temperature sensor, C: an infrared sensor, or D: a soil moisture sensor? Pause a video and have a go.
Wonderful, let's check.
That's right, it's both the accelerometer and the temperature sensor.
They are onboard sensors, well done.
Izzy has identified which inputs she would like to include in her control system.
Which micro:bit onboard sensors could Izzy use? She wants to measure light levels, measure temperature, and measure moisture in the soil.
Izzy says "Micro:bits have an onboard light and temperature sensors.
They don't have anything to measure the moisture content of the soil.
The advantage of onboard sensors is that we don't need to buy or connect additional components.
This make the control system less expensive and more compact to produce." Here we have another check for understanding.
What are the disadvantages of off-board components? Is it A: the cost of the system, B: less compact design, C: easier to code, or D: a more complex system.
Pause the video and have a go.
Wonderful, let's check.
That's right, it's A, B, and D.
The disadvantage of off-board components is the cost, less compact design, and a more complex system, well done.
Control systems can be coded using blocks, text, or a combination of both.
They can be planned using the systems approach of flowcharts or pseudocode.
Pseudocode is a way of writing out computer programme instructions using plain English.
Izzy has begun to write her programme in pseudocode.
"Measure light level.
If above 50, no action.
If below 50, turn on the light." Here we have task B.
Part one: Plan your sustainable futures control system inputs and explain your decisions.
Include why you chose onboard or off-board sensors.
Part two: Plan your control system using A, pseudo code, and B, a flowchart.
And part three: Model and simulate your control system in Tinkercad, explain the outcome.
Pause the video and have a go.
Great, let's have a look at some of the answers you may have come up with.
For part one, Izzy says, "I chose to use the onboard light and temperature sensors.
I want a neat and compact control unit, so didn't want to have off-board components connected with lots of wires for the inputs." For part two, Izzy shares her pseudocode.
The first part, "Measure light level.
If light level above 50, no action.
If light level below 50, turn on the light." And the second part, "Measure temperature.
If temperature above 30 degrees Celsius, open the window.
If temperature below 30 degrees Celsius, close the window." Part 2b, Izzy shares her flowchart, "Start, measure temperature, followed by the question in a decision diamond, 'Is the temperature above 30 degrees Celsius?' Yes, open the window, or no, close the window." And part 2b, A second part of Izzy's control system, "Start, measure light levels, and a question in the decision diamond, 'Is the light level above 50?' Yes, turn the light off.
No, turn the light on." For part three, here is an example of a programme that you may have come up with.
There is an LED output on pin 0 and a motor output on pin 1.
Here is the explanation.
"Changing the light levels with the built-in sensor and slider works really well.
The LED lights up when the levels are less than 50.
The temperature sensor also works well.
The motor turns on when the temperature is above 30 degrees Celsius, which could open the window.
However, when the temperature is below 30 degrees Celsius, I need the window to close.
At the moment, this code does not do that.
I think I need the motor to turn the other way.
I will investigate this further," says Izzy.
Here we have a summary of our learning today.
A switch controls the flow of current in a circuit or system by making or breaking a circuit.
A switch is an electro mechanical component.
Switches can be momentary or latching.
Actuators are used to create a mechanical action in various different systems. Sensors are input components that convert physical properties of the environment into digital signals for processing.
Sensors can be onboard or off-board components.
Well done, and thank you for joining me for our lesson today.