
Monitoring temperature is essential across many applications, from protecting sensitive electronic equipment to maintaining comfortable room conditions. Conventional temperature alarms typically use buzzers or LEDs, providing only visual, monophonic alerts. Here we present a musical temperature alarm that generates a pleasant melody, rather than a simple beep, when a preset temperature threshold is exceeded.
The circuit employs an LM335 temperature sensor for analogue sensing, a TL071 operational amplifier for signal comparison, and a UM66 melody IC for tone generation. When the ambient temperature crosses the set limit, the circuit activates a small loudspeaker to produce a musical alert. The design remains simple, compact, and cost-effective, making it suitable for DIY enthusiasts and electronics learners.
The system is suitable for use in rooms, incubators, and electronic enclosures where temperature monitoring is critical. Powered by a 9V battery, it consumes low current, ensuring portable and reliable continuous operation. Fig. 1 shows the author’s prototype.

Circuit and working
The LM335 is a precision temperature sensor that behaves like a temperature-dependent Zener diode. It generates an output voltage directly proportional to the absolute temperature (in Kelvin), with a scale factor of 10mV per Kelvin. As the ambient temperature increases, the output voltage increases linearly; it decreases as the temperature falls. For example, the LM335 produces approximately 2.98V at 25°C (298K) and about 3.03V at 30°C (303K). This linear voltage-temperature relationship makes the LM335 suitable for use with simple analogue processing circuits.

In the circuit, the LM335 output represents the ambient temperature. It is applied to the inverting input (pin 2) of the TL071 operational amplifier, while a fixed or adjustable reference voltage is applied to the non-inverting input (pin 3). The TL071 is configured as a comparator and it continuously compares the temperature-dependent voltage with the preset reference level.
When the temperature is below the set limit, the LM335 output voltage at pin 2 is lower than the reference voltage at pin 3, causing the op-amp output to go high. When the temperature exceeds the preset limit, the LM335 voltage at pin 2 exceeds the reference voltage at pin 3, and the op-amp output goes low. This change in output state indicates that the preset temperature threshold has been crossed.
By adjusting the reference voltage at pin 3 using a preset resistor, the desired temperature trip point can be accurately set. The resulting change in the comparator output triggers the alarm circuitry.
Circuit operation depends directly on the TL071 comparator’s output state, which is governed by the ambient temperature sensed by the LM335.
At low temperature (below the set threshold)






