How does a microcontroller connect safely to sensors and to motors, and how does feedback close the loop?
Interfacing a microcontroller: input interfacing (signal conditioning, switch debouncing, the ADC), output interfacing (transistor and MOSFET drivers, relays, motor control with PWM and an H-bridge), and the closed-loop control system.
An Eduqas A-Level Electronics answer on interfacing a microcontroller: conditioning and reading sensor inputs (including switch debouncing and the ADC), driving outputs safely through transistor, MOSFET and relay drivers, controlling motor speed and direction with PWM and an H-bridge, and the structure of a closed-loop control system.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
Eduqas wants you to interface a microcontroller: conditioning and reading sensor inputs (including debouncing and the ADC), driving outputs through transistor, MOSFET and relay drivers, controlling a motor with PWM and an H-bridge, and the structure of a closed-loop control system. This connects the programmable brain to the real world safely.
The answer
Input interfacing
Output interfacing
Motor control: PWM and the H-bridge
Closed-loop control
Examples in context
Interfacing is where a microcontroller project comes together: the sensing circuits and ADC read the world, the transistor, MOSFET, relay and H-bridge drivers act on it, and PWM controls power and motor speed. The H-bridge and PWM let a robot drive and steer; closed-loop control keeps a heater at a set temperature or a motor at a set speed. These are exactly the input and output subsystems the Eduqas non-exam assessment integrated project must design, build and test.
Try this
Q1. State why a microcontroller output cannot usually drive a motor directly. [1 mark]
- Cue. The pin can only supply a small current; the motor needs far more, so a transistor or MOSFET driver is required.
Q2. State what an H-bridge allows you to do with a DC motor. [1 mark]
- Cue. Drive it in both directions (reverse the current) and, with PWM, control its speed.
Q3. State the difference between open-loop and closed-loop control. [2 marks]
- Cue. Closed-loop senses the output and corrects the error; open-loop applies a fixed drive with no feedback.
Exam-style practice questions
Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Eduqas 20216 marksA microcontroller must drive a small DC motor in both directions and control its speed. Describe the circuit used and explain how the speed and direction are controlled.Show worked answer →
Circuit (up to 3 marks): a small DC motor that must run both ways is driven by an H-bridge, four switching transistors (or MOSFETs) arranged so that the current can be sent through the motor in either direction depending on which diagonal pair is turned on. The microcontroller outputs control the transistor gates, and flyback diodes protect against the motor's inductive spikes.
Direction (up to 1 mark): turning on one diagonal pair drives the motor one way; turning on the other diagonal pair reverses the current and the motor turns the other way.
Speed (up to 2 marks): the speed is controlled by pulse-width modulation (PWM), switching the drive transistors on and off rapidly and varying the duty cycle; a larger duty cycle gives a higher average voltage and so a faster motor.
Markers reward the H-bridge of four transistors for reversal, selecting the diagonal pair for direction, and PWM duty cycle for speed (with flyback protection).
Eduqas 20195 marksExplain what switch bounce is and how it can be removed, and explain what is meant by a closed-loop control system.Show worked answer →
Switch bounce (up to 3 marks): when a mechanical switch closes, its contacts physically bounce, making and breaking the connection several times over a few milliseconds. A microcontroller reading the input fast may count these as many separate presses. It is removed by debouncing: in hardware with a capacitor (or a Schmitt trigger) that smooths the contact, or in software by waiting a short time after the first edge and re-reading the input.
Closed-loop control (up to 2 marks): a closed-loop (feedback) control system measures the actual output with a sensor, compares it with the desired value, and adjusts the drive to reduce the error, so the output is automatically corrected. This contrasts with open-loop control, which has no feedback and cannot correct for disturbances.
Markers reward contact bounce causing multiple false reads, debouncing in hardware or software, and the closed-loop sensor-compare-correct feedback structure.
Related dot points
- Microcontroller architecture: the CPU, memory and input/output ports, digital input and output pins, pull-up and pull-down resistors, and the analogue-to-digital converter and PWM peripherals.
An Eduqas A-Level Electronics answer on microcontroller architecture and interfacing: the CPU, memory and input/output ports, digital input and output pins with pull-up and pull-down resistors, and the built-in peripherals (analogue-to-digital converter, PWM, timers) that connect the microcontroller to the real world.
- Assembly language programming: instructions and registers, reading inputs and writing outputs, branching and loops, delays, and the program development cycle (flowchart, code, assemble, test).
An Eduqas A-Level Electronics answer on assembly language programming: instructions and registers, reading input pins and writing to output pins, branching and looping for decisions and repetition, generating delays, and the flowchart-code-assemble-test development cycle required for the non-exam assessment.
- High power switching systems: relays and the flyback diode, power MOSFETs, the thyristor and triac for AC loads, and pulse-width modulation for power control.
An Eduqas A-Level Electronics answer on high power switching systems: the relay with its flyback diode, the power MOSFET as a logic-driven switch, the thyristor and triac for switching AC loads, and pulse-width modulation as an efficient way to control power.
- Transistor switching: saturation and cut-off, choosing the base resistor, the Darlington pair, and driving output transducers such as lamps, LEDs, buzzers and motors.
An Eduqas A-Level Electronics answer on using a transistor as a switch: the saturation and cut-off states, choosing the base resistor to saturate the transistor, the Darlington pair for high gain, and driving output transducers such as lamps, LEDs, buzzers and motors from a logic signal.
Sources & how we know this
- Eduqas GCE AS/A Level Electronics specification (A410QS) — WJEC Eduqas (2017)