A variable potential divider, or potentiometer, is a three-terminal resistor with a sliding contact that produces an output voltage equal to a variable fraction of the input voltage
A thermistor is a resistor whose resistance decreases significantly with higher temperature (normal resistors change resistance very slightly with temperature)
A light-dependent resistor (LDR) is a resistor whose resistance decreases with increasing incident light intensity
Capacitor
A capacitor stores energy electrostatically
It consists of two conducting plates separated by an insulating sheet (also known as the dielectric)
When there is a potential difference across the conductors, positive charge builds up on one plate and an equal negative charge on the other; as the capacitor charges, its voltage drop increases, until it reaches the voltage of the e.m.f., at which point it stops charging
The capacitor can then be used to drive a DC circuit, discharging it
Relay
A relay is a switch that is powered by an electromagnet: when a current flows through the electromagnet, it induces a magnetic field that attracts an iron component that closes the main circuit
Advantages of using a relay are that the switching circuit is separate from the main circuit, as well as being able to use a small current to drive a large-current circuit
Diode
Diodes have low (ideally zero) resistance in one direction and high (ideally infinite) resistance in the other; in effect, they only allow current to flow in one direction
They can be used as a rectifier, converting AC in DC
Transistor
A transistor has at least three terminals and can be used as a switch or amplifier
Transistors are used to drive high-current circuits with low currents
Circuits
A light-sensitive switch can be made by comparing the output voltage of a potential divider consisting of an LDR and a fixed resistor with a fixed potential divider, and using the result to drive a relay or transistor to drive the main circuit
A temperature-operated alarm can be made in the same way with a thermistor