Sensor Circuits – Potential Divider with LDR and Thermistor

Design & TechnologyElectronics & MicrocontrollersAges 13–14Virtual lab

Use with my class

A potential divider made of a sensor (light-dependent resistor or NTC thermistor) and a variable resistor produces a voltage Vout that drives a transistor or a comparator to switch an LED, a fan or a buzzer. Move the light or temperature slider to see the sensor resistance, Vout and the load current change; graphs show the sensor's characteristic curve and Vout with the switching threshold. Swap the sensor between the top and bottom of the divider to invert the behaviour: dark- or light-activated, cold alarm or overheat alarm. A Calibration screen measures the thermistor's resistance in a water bath at known temperatures, or the LDR's resistance against illuminance and lamp distance, fits the calibration curve with uncertainties and uses it to find an unknown temperature or light level.

Lesson: Sensing circuits: potential divider with an LDR or thermistor, switched by a transistor or a comparator

What it shows

Automatic night lights, fans that start when a room gets hot and frost alarms all rely on a potential divider. A sensor whose resistance changes with light or temperature is connected in series with a variable resistor, and the voltage at the junction, Vout = Vs × Rbottom / (Rtop + Rbottom), controls a switch. A transistor starts to conduct when its base reaches about 0.7 V; a comparator switches when Vout passes a reference voltage. Putting the sensor at the top or the bottom of the divider reverses the action, and the variable resistor sets the threshold. Before a sensor can measure anything it must be calibrated: its resistance is recorded at known temperatures or illuminances, a curve is fitted (ln R against 1/T for a thermistor, a straight line on log–log axes for an LDR, where E ∝ 1/d² for a small lamp) and the curve is then read backwards.

How to use

Choose the Sensor, the Sensor position, the Switch and the Load. Move the Light or Temperature slider, or drag across either graph, and watch the sensor resistance, Vout and the load current change. Adjust Variable resistor to shift the threshold and Supply Vs to change the supply voltage. Press Swap sensor ↕ to invert the behaviour of the circuit. On Calibration, choose Sensor in, set Bath temperature or Distance d, wait for a steady reading and press Record point; then measure the unknown sample and read its value from the graph.

Parameters you can change

  • Sensor Light-dependent resistor (LDR), Thermistor (NTC)
  • Sensor position in the divider Bottom (between Vout and 0 V), Top (between +Vs and Vout)
  • Variable resistor value 0.1–100 kΩ
  • Supply voltage Vs 5–12 V
  • Load LED, Fan, Buzzer
  • Switching device NPN transistor, Comparator
  • Screen Sensor circuit, Calibration

Questions to explore

  1. Why does placing the LDR in the bottom half of the divider make the lamp switch on in the dark?
  2. To make the lamp switch on earlier at dusk, should you increase or decrease the variable resistor?
  3. With the comparator, what is the sensor resistance at the switching point, and why?