Programmable Components and Flowcharts
How a programmable component uses a flowchart to switch outputs on and off in response to inputs and decisions, including analogue inputs and simple routines.
Justify the choices, the way you are assessed
Free interactive practice on the decisions the assessment actually asks you to justify.
Start revising freeWhat you'll cover
Machines that follow instructions
A programmable component, such as a microcontroller, is a tiny computer built into a product. It runs a program that reads inputs and switches outputs on and off automatically. Designers plan that program as a flowchart: a diagram of the steps and decisions the component follows. In this module you will read, complete and design simple flowcharts.
The flowchart symbols
A flowchart is built from a few standard shapes:
Match each symbol
- Terminal (rounded box)
- Parallelogram
- Rectangle
- Diamond
- Marks the start or stop of the program
- Reads an input or switches an output
- An action the component carries out
- Asks a yes/no question and branches the flow
Read the flowchart
A night-light turns an LED on when it gets dark. Put its flowchart in order, following the arrows.
- Start
- Read the light sensor
- Decision: is it dark?
- If yes, switch the LED on
- Stop
Which symbol?
Which flowchart symbol is used for a decision that asks a yes/no question?
- A diamond
- A rectangle
- A parallelogram
- A rounded box
Digital and analogue inputs
A programmable component can read two kinds of input.
Spot the analogue inputs
Select the TWO inputs that are analogue.
- An LDR light sensor
- A thermistor temperature sensor
- A push-to-make switch
- An on or off toggle button
Responding to analogue inputs
Because an analogue input gives a range of values, the program compares the reading to a set threshold. For example: IF the light level is below the threshold, THEN switch the LED on. Programs also use simple routines to control timing and repetition: a delay waits for a set time, a loop repeats steps, and a count keeps track of how many times something happens.
Programmable logic in words
A flowchart begins and ends with a _____ symbol. A _____ symbol, shaped like a diamond, asks a yes/no question. A programmable component reads an _____, such as a switch or a sensor, then switches an _____, such as an LED, on or off. A sensor that gives a range of values, like an LDR, is an _____ input.
Inputs or outputs?
A programmable component reads inputs and switches outputs. Tap the TWO that are OUTPUTS.
- An LED
- A push switch
- A buzzer
- An LDR light sensor
- A temperature sensor
Work the flowchart
A security light uses a programmable component and a light sensor. Work through its logic.
- The flowchart needs to ask "Is it dark?" Which symbol is used for this step?
- The answer to "Is it dark?" is yes. What should the flowchart do next?
- The light sensor gives a changing range of readings. What type of input is it?
Describe the system
A greenhouse uses a programmable component to switch on a fan when it gets too hot. Describe how the system works, from input to output. Write in clear, full sentences.
- Name the input (a temperature sensor) and say whether it is analogue or digital
- Explain the decision the flowchart makes, using a threshold
- Name the output the component switches on
- Put the flowchart steps in order, from start to stop