How does a voltage comparator switch at a threshold, and how do we interface it to an output?
The voltage comparator as an integrated-circuit switching circuit that compares an input voltage with a reference, the use of a potential divider to set the reference and threshold, and interface circuits (including a relay or transistor driver) to switch an output.
A focused answer to WJEC Eduqas GCSE Electronics on the voltage comparator and interfacing, covering how a comparator switches at a threshold set by a potential divider, and how a relay or transistor driver interfaces the output to a load.
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 topic is asking
WJEC Eduqas wants you to understand the voltage comparator as an integrated-circuit (IC) switching circuit that compares an input voltage with a reference and switches its output high or low at a threshold, how a potential divider sets that reference, and how to interface the comparator output to a real load using a transistor driver or relay.
The voltage comparator
The comparator is the basic decision-maker of an analogue sensing system: it answers "is this voltage bigger than that one?" with a clean high or low output. The switching is sharp, so a slowly changing sensor voltage produces a sudden change of output as it crosses the reference. This makes it ideal for turning an analogue measurement into an on/off decision.
Setting the reference and threshold
A typical sensing circuit has two dividers: a sensor divider (with an LDR or thermistor) feeding one input, and a reference divider feeding the other. The reference divider sets the switching point. If a variable resistor is used in the reference divider, you can adjust the threshold, for example to choose how dark it must get before a light switches on. The comparator then switches its output as the sensor voltage rises or falls through this set reference.
Interfacing the output
Interfacing is the same problem met with output sub-systems: the small control signal must switch a large load. A transistor or MOSFET driver provides the current the comparator cannot. A relay is an electromagnetic switch: a small current through its coil closes contacts that can carry a large current, completely separate from the control circuit. This isolation protects the low-voltage electronics and lets the system switch mains or motors safely. A relay's coil usually needs a transistor to drive it, and a protection diode across the coil to absorb the voltage spike when it switches off.
Using data sheets
Designing a switching interface means checking real limits. The comparator data sheet gives how much current its output can supply and the supply voltage range; the transistor or MOSFET data sheet gives the maximum collector or drain current and the turn-on requirement; the relay data sheet gives the coil voltage and the maximum current and voltage the contacts can switch. Choosing parts that stay within these limits is an examinable design skill.
Try this
Q1. State the condition for a comparator output to be high, in terms of its two inputs. [1 mark]
- Cue. When the non-inverting () input voltage is greater than the inverting () input voltage.
Q2. State one advantage of using a relay rather than a transistor alone to switch a mains load. [1 mark]
- Cue. A relay gives electrical isolation between the low-voltage control circuit and the mains.
Exam-style practice questions
Practice questions written in the style of WJEC exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Eduqas style4 marksA comparator has a sensor divider on its non-inverting input and a fixed reference on its inverting input. Explain how the output behaves as the sensor voltage rises through the reference.Show worked answer →
A Component 1 Explain question on a comparator. A comparator compares its two inputs and drives its output high or low depending on which input is larger (1 mark). While the sensor voltage on the non-inverting () input is below the reference on the inverting () input, the output is low; when the sensor voltage rises above the reference, the output switches high (2 marks for the correct direction of switching about the threshold). The switch happens sharply as the sensor voltage crosses the reference, which is the threshold (1 mark). Markers reward comparing the two inputs and the sharp high/low switch at the threshold.
Eduqas style3 marksExplain why a relay or transistor is used to interface a comparator output to a mains lamp, and why a relay can be useful.Show worked answer →
A Component 1 Explain question on interfacing. A comparator output can only supply a small current at a low voltage, far too little to run a mains lamp (1 mark). A transistor or relay driven by the comparator switches the large current the lamp needs (1 mark). A relay is useful because it gives electrical isolation between the low-voltage control circuit and the mains, and can switch a higher voltage or AC that the electronics cannot handle directly (1 mark). Markers reward the small-output problem, the interface switching the large load, and isolation as a relay benefit.
Related dot points
- The npn bipolar transistor and the n-channel enhancement MOSFET used as switches: how a small input controls a larger output current, the meaning of saturation and cut-off, and the differences between the two devices.
A focused answer to WJEC Eduqas GCSE Electronics on transistor and MOSFET switching, covering how an npn transistor and an n-channel enhancement MOSFET act as switches, saturation and cut-off, and the differences between the two devices.
- Input sensors as variable resistors: the light-dependent resistor (LDR) and the NTC thermistor, how their resistance varies with light and temperature, and using them in a potential divider so the output voltage responds to the physical quantity.
A focused answer to WJEC Eduqas GCSE Electronics on input sensors, covering how an LDR and an NTC thermistor change resistance with light and temperature, and how a sensor in a potential divider produces a voltage that responds to the physical quantity.
- The potential divider: how two resistors share a supply voltage, the potential divider equation, and designing and analysing a divider to produce a required output voltage.
A focused answer to WJEC Eduqas GCSE Electronics on potential dividers, covering how two resistors share a supply voltage, the potential divider equation, and designing and analysing a divider for a required output voltage.
- Amplification as increasing the voltage (or power) of a signal, the voltage gain equation, the gain-frequency response and bandwidth, and clipping distortion when the output is limited by the supply.
A focused answer to WJEC Eduqas GCSE Electronics on amplifier basics and gain, covering amplification, the voltage gain equation, the gain-frequency response and bandwidth, and clipping distortion.
- The Schmitt inverter and its switching with hysteresis, used to debounce switches and to give a clean digital output from a slow or noisy analogue input, and comparing transistors, comparators and Schmitt inverters as interface circuits.
A focused answer to WJEC Eduqas GCSE Electronics on Schmitt triggers and interfacing, covering Schmitt inverter switching with hysteresis, debouncing switches and cleaning slow or noisy signals, and comparing transistors, comparators and Schmitt inverters as interfaces.
Sources & how we know this
- WJEC Eduqas GCSE Electronics specification (from 2017) — WJEC Eduqas (2017)