Microcontrollers and Coding for Control - StudyPulse
Boost Your VCE Scores Today with StudyPulse
8000+ Questions AI Tutor Help
Home Subjects Systems Engineering Microcontrollers and coding

Microcontrollers and Coding for Control

Systems Engineering
StudyPulse

Microcontrollers and Coding for Control

Systems Engineering
01 May 2026

Microcontrollers and Coding to Control Electrotechnological Systems

Overview

A microcontroller is a compact integrated circuit that combines a processor, memory, and programmable input/output peripherals on a single chip. In VCE Systems Engineering, microcontrollers (such as the Arduino) are programmed using coding (logical instructions) to read sensors and control actuators, creating intelligent, responsive electrotechnological systems.

KEY TAKEAWAY: A microcontroller is the “brain” of a control system — it reads inputs, executes logic, and drives outputs according to a program written by the engineer.

Microcontroller Architecture

A microcontroller contains:
- CPU (processor): Executes instructions one at a time
- Flash memory: Stores the program permanently
- RAM: Temporary working memory during execution
- Digital I/O pins: Can be configured as inputs or outputs; operate at logic levels (0 V = LOW, 5 V or 3.3 V = HIGH)
- Analogue input pins (ADC): Convert analogue voltages (0–5 V) to digital numbers (0–1023 for 10-bit)
- PWM outputs: Simulate analogue output via rapid switching (used to control motor speed, LED brightness)
- Communication ports: UART, SPI, I2C for connecting peripheral modules

EXAM TIP: Know the difference between a digital pin (reads/writes HIGH or LOW only) and an analogue input pin (reads a range of voltage values as a number). Sensors like thermistors produce analogue signals; buttons produce digital signals.

Logic Statements and Program Flow

Microcontroller programs use three fundamental control structures:

Sequence

Instructions execute one after another in order:

read sensor value
calculate output
write to actuator

Selection (IF statements)

The program chooses a path based on a condition:

IF temperature > 30 THEN
    turn on fan
ELSE
    turn off fan
END IF

Iteration (loops)

Instructions repeat while a condition holds:

WHILE system is running
    read sensor
    update output
END WHILE

Boolean logic operators used in conditions:
- AND: Both conditions must be true — IF (light_level < 50) AND (time > 18:00)
- OR: At least one condition must be true — IF (button_pressed) OR (motion_detected)
- NOT: Inverts the condition — IF NOT (door_open)

VCAA FOCUS: Be able to read a flowchart or pseudocode program and describe what the system does. Also be able to write simple pseudocode or flowcharts for described system behaviour.

Symbolic Representation of Components

Circuit diagrams use standardised symbols so engineers worldwide can interpret schematics. Key symbols to know:

Component Symbol description
Resistor Rectangle (IEC) or zigzag
Capacitor Two parallel lines (one curved for electrolytic)
LED Diode triangle with two outward arrows
Diode Triangle pointing to a bar (current flows in triangle direction)
NPN transistor Circle with three terminals: base (horizontal), collector (up-diagonal), emitter (down-diagonal, arrow out)
Switch (SPST) Line with a gap and a pivoting contact
Relay Coil symbol + switch contacts linked
Motor (DC) Circle with M inside
Battery/supply Long and short alternating lines
Ground Series of horizontal lines decreasing in length
Microcontroller Rectangle labelled with pin names

APPLICATION: When drawing a control circuit schematic, always use correct symbols and label all component values (e.g. R1 = 470 $\Omega$, C1 = 100 $\mu$F). VCAA exam questions often ask students to complete or interpret circuit diagrams.

Typical Microcontroller Control Circuit

A common circuit pattern for microcontroller-driven systems:

Example: Temperature-controlled fan

  1. Sensor stage: NTC thermistor and fixed resistor form a voltage divider; junction connected to analogue input pin A0
  2. Processing stage: Microcontroller reads A0, converts voltage to temperature using calibration, compares to threshold
  3. Output stage: If temperature exceeds threshold, digital output pin goes HIGH → transistor base receives current → transistor switches ON → fan motor circuit completes

Pseudocode:

LOOP:
    raw = analogRead(A0)
    temp = convertToTemp(raw)
    IF temp > 30 THEN
        digitalWrite(fanPin, HIGH)
    ELSE
        digitalWrite(fanPin, LOW)
    END IF
    wait(500 ms)
END LOOP

COMMON MISTAKE: Microcontroller output pins typically supply only 20–40 mA. Motors and relays draw far more. Always use a transistor or motor driver IC between the microcontroller and the load to avoid damaging the microcontroller.

Flowchart Representation

Flowcharts visually represent program logic using standard shapes:
- Oval/rounded rectangle: Start / End
- Rectangle: Process (action, calculation)
- Diamond: Decision (YES/NO branch)
- Arrow: Flow of control

A flowchart for the fan control above would show: Start → Read temperature → Decision diamond (temp > 30?) → YES: Fan ON → loop back; NO: Fan OFF → loop back.

STUDY HINT: For VCAA exams, practice converting between three representations: (1) written description of system behaviour, (2) flowchart, and (3) pseudocode. Being able to move fluently between all three is a high-value skill.

Summary

Concept Description
Microcontroller Integrated chip with CPU, memory, I/O; the system brain
Digital I/O HIGH/LOW signals; used for switches, LEDs, relays
Analogue input Range of values; used for sensors (thermistor, LDR)
PWM Simulated analogue output; controls speed/brightness
Logic statement IF/ELSE, AND/OR/NOT; determines system response
Flowchart Visual representation of program logic
Circuit symbol Standardised graphical representation of a component

Table of Contents