LGCSE Design & Technology (0189) study materials
LGCSE Design & Technology (0189) study resources

Greenhouse frost alarm false triggering

LGCSE Design & Technology (0189) · Put your knowledge to work in context.

All case studies

Greenhouse frost alarm false triggering

A student has built a greenhouse frost alarm. A 9 V battery supplies an NTC thermistor in a potential divider with a 10 kΩ fixed resistor; the divider output feeds the inverting input of an LM393 comparator. A 4.7 V Zener diode provides the reference voltage on the non-inverting input. When the temperature falls below 4 °C, the comparator output goes high and switches a small relay that sounds a 12 V buzzer. In tests the alarm works on the bench, but in the greenhouse it chirps every time the relay switches, and the trigger temperature drifts from 4 °C to about 7 °C as the battery voltage falls from 9.2 V to 8.1 V. The thermistor is on a 1 m cable, and the relay coil is mounted 20 mm from the comparator input tracks on the same stripboard. The student needs a reliable alarm that runs for at least a month on one battery.

1. Explain why the trigger temperature drifts as the battery voltage falls. Refer to the potential divider and the comparator reference.

Read the worked answer

The thermistor divider output is ratiometric with the 9 V supply: as the battery falls, the voltage at the inverting input falls. The 4.7 V Zener reference, however, stays approximately constant until the battery drops near the Zener knee. The comparator therefore switches when the divider voltage equals 4.7 V, not at a fixed thermistor resistance. For an NTC, resistance increases as temperature falls. In the divider, as temperature falls the thermistor resistance rises, so the divider output falls. If the supply also falls, the divider output is lower at any given temperature, so the comparator crosses the fixed 4.7 V at a higher temperature. That is why the trigger moves from 4 °C to about 7 °C. The Zener also needs a minimum operating current; as the battery falls, its regulation may degrade, adding to the drift. The drift is a reference-topology problem, not a faulty thermistor.

2. Recommend changes to stop the relay-switching chirp and to make the trigger temperature stable. Explain the purpose of each change.

Read the worked answer

Chirping: The relay coil is inductive. When the comparator output switches the relay off, the coil's collapsing field produces a voltage spike that couples into the high-impedance comparator input tracks 20 mm away. The lack of hysteresis means the comparator re-triggers as the output moves, causing rapid chatter. Fixes:

  • Fit a flyback diode (e.g. 1N4148 or 1N4001) across the relay coil, cathode to the positive supply.
  • Add hysteresis with a 1 MΩ resistor from the comparator output to the non-inverting input (positive feedback). This creates a small dead band so the output does not chatter at the threshold.
  • Add a 100 nF ceramic decoupling capacitor across the comparator supply pins, close to the IC.
  • Move the relay coil and its tracks away from the comparator inputs; use twisted pair for the thermistor cable and a screened cable if necessary.
  • Keep the thermistor divider wiring short and away from the relay.

Drift: Replace the Zener reference with a ratiometric reference derived from the same supply as the thermistor divider, or use a stable reference IC (e.g. TL431) with a regulated supply. If the design must run from a falling battery, a ratiometric divider keeps the switching ratio constant. Also check the Zener's minimum operating current.

3. The student considers replacing the LM393 circuit with a microcontroller and buzzer. Evaluate this for a one-month battery life, including one advantage and one disadvantage.

Read the worked answer

A microcontroller can work, but it is not automatically better for battery life. The LM393 draws a few milliamps; a relay coil can draw tens of milliamps, which dominates. A microcontroller with a sleep mode can wake periodically (e.g. every 10 s), read the thermistor, and only energise the buzzer when needed. That can reduce average current, but only if the regulator and relay are also managed. A cheap 7805-style linear regulator has quiescent current and wastes (9 V − 5 V) × I as heat. A low-dropout regulator or direct battery operation with a microcontroller rated for 9 V (or a buck converter) is better. The relay should be replaced by a latching relay or a low-current piezo buzzer if the 12 V buzzer is not essential. The student should calculate average current: e.g. 20 mA for 1 s every 60 s is 0.33 mA average, plus sleeping 0.01 mA, plus regulator quiescent. A 9 V alkaline battery of about 500 mAh could last months at that rate. The microcontroller also allows software hysteresis and averaging to reject noise. But it adds programming complexity and a failure mode; for a simple frost alarm, a well-designed comparator with hysteresis and a stable reference may be more reliable. The decision should be based on measured current, not assumption.