LM358 Fire Alarm Circuit with Thermistor & Buzzer

Build a simple LM358 fire alarm circuit with a 10k NTC thermistor, preset, BC547 and buzzer. No microcontroller or code needed. Components list, wiring table, diagram and setup steps.

  • DifficultyEasy
  • Build time1–2 hours
  • Board / MCUNo MCU: LM358 op-amp
  • Parts10 items
  • CodeNot needed

Need it ready-made? Buy Ready Project

This LM358 fire alarm circuit sounds a loud buzzer and lights a red LED when the temperature near a small NTC thermistor rises above a level you set with a preset. It needs no microcontroller and no code: one LM358 op-amp works as a comparator, and a BC547 transistor drives the alarm. The whole circuit fits on a small breadboard and runs from a 9V battery.

It is a good small analog project for learning how a comparator, a voltage divider and a transistor switch work together. Place the thermistor near a stove, a battery charger, an electrical panel or inside a small cabinet to get an early warning of overheating. It is a learning project, not a replacement for a certified smoke detector.

LM358 fire alarm circuit on a breadboard with NTC thermistor, 10k preset, BC547 transistor, buzzer, LEDs and 9V battery

How It Works

  • Heat sensor: the 10k NTC thermistor and a fixed 10k resistor form a voltage divider. An NTC’s resistance falls as it gets hotter, so the voltage at the LM358’s non-inverting input (pin 3) rises with temperature. At 25 °C it sits at about half the supply, around 4.5 V.
  • Set-point: the 10k preset gives an adjustable reference voltage to the inverting input (pin 2). Turning it sets the temperature at which the alarm trips.
  • Comparator: while pin 3 is below pin 2, the LM358 output (pin 1) stays low and everything is quiet. When heat pushes pin 3 above pin 2, the output swings high, to about 7.5 V on a 9V supply.
  • Hysteresis: a 1 MΩ resistor from the output back to pin 3 adds a little positive feedback, so the alarm switches cleanly instead of chattering when the temperature hovers right at the set-point.
  • Alarm driver: the high output turns on the BC547 through a 1k base resistor. The transistor connects the buzzer and the red LED to ground, so both turn on. The green LED simply shows that power is on.
  • Unused half: the LM358 has two op-amps. The second one (pins 5, 6 and 7) is not used; tie pin 5 to GND and pin 6 to pin 7 to keep it quiet.

Components Required

  • LM358 dual op-amp IC (DIP-8) with an 8-pin socket – 1
  • 10k NTC thermistor (bead type) – 1
  • 10k preset (trimmer potentiometer) – 1
  • BC547 NPN transistor – 1
  • Active buzzer, 3–24 V type – 1
  • 5 mm red LED and 5 mm green LED – 1 each
  • Resistors: 10k – 1, 1k – 3, 1 MΩ – 1
  • 100 nF ceramic capacitor – 1
  • 9V battery with snap connector (or a 9–12 V DC adapter)
  • Breadboard and jumper wires

Wiring Table

Part / pinConnects toNotes
LM358 pin 8 (VCC)+9V100 nF capacitor from pin 8 to pin 4, close to the IC
LM358 pin 4 (GND)GND
NTC thermistor+9V and LM358 pin 3Either way round
10k resistorLM358 pin 3 and GNDLower half of the sensor divider
10k preset ends+9V and GND
10k preset wiperLM358 pin 2Sets the trip temperature
1 MΩ resistorLM358 pin 1 and pin 3Hysteresis (clean switching)
1k resistorLM358 pin 1 and BC547 baseBase current limit
BC547 emitterGNDFlat face toward you: collector, base, emitter (left to right)
Active buzzer (+)+9VLonger leg or + mark
Active buzzer (-)BC547 collector
Red LED anode via 1k+9VCathode to BC547 collector
Green LED anode via 1k+9VCathode to GND (power indicator)
LM358 pin 5 / pins 6 and 7GND / tied togetherUnused second op-amp

Connection Diagram

The illustration above shows a typical breadboard layout; its pin labels are only for orientation. The pin-accurate drawing below matches the wiring table exactly, so follow it while building.

LM358 Fire Alarm – Pin-Accurate Wiring 9V supply +9V: LM358 pin 8, NTC top, preset top, buzzer (+), LED resistors GND: LM358 pin 4, 10k resistor, preset bottom, BC547 emitter 100 nF capacitor across pin 8 and pin 4 Sensor divider NTC 10k: +9V to LM358 pin 3 (non-inverting input) 10k resistor: pin 3 to GND (pin 3 voltage rises with heat) Set-point 10k preset: ends to +9V and GND Wiper to LM358 pin 2 (inverting input) Hysteresis 1 MΩ resistor from LM358 pin 1 (output) to pin 3 Driver LM358 pin 1 through 1k to BC547 base BC547 emitter to GND, collector to alarm (-) side Alarm Active buzzer: (+) to +9V, (-) to BC547 collector Red LED + 1k: +9V to BC547 collector (in parallel) Green power LED + 1k: +9V to GND
Pin-accurate connection diagram for the LM358 fire alarm circuit.

Code

No code is needed. This is a purely analog circuit built around the LM358 comparator, so it works as soon as it is powered.

Setting the Trip Temperature

  • Power the circuit at room temperature. If the buzzer is on, turn the preset slowly until it just goes off.
  • Warm the thermistor with your fingers or a hair dryer on low. The buzzer should sound after a few seconds.
  • For a higher trip point, turn the preset a little further past the switching point so pin 2 sits higher than pin 3 at room temperature. A multimeter helps: pin 3 is about 4.5 V at 25 °C and about 7 V near 60 °C with a typical 10k NTC (B = 3950).
  • Let the thermistor cool. The alarm stops on its own once the temperature drops a few degrees below the trip point.

Troubleshooting

ProblemFix
Buzzer is always onTurn the preset the other way, and check that the NTC goes to pin 3 and the preset wiper to pin 2, not the other way round.
Buzzer never soundsCheck the BC547 pin order and that the buzzer is an active type (it beeps on DC). A passive buzzer stays silent.
Alarm chatters near the set-pointMake sure the 1 MΩ hysteresis resistor is fitted between pin 1 and pin 3. A lower value such as 470k gives a wider gap.
Works on the bench but triggers randomlyKeep the thermistor leads short or use twisted wire, and fit the 100 nF capacitor right at the IC.
Battery drains quicklyThe circuit draws a few milliamps at idle. Remove the green LED or use a 9–12 V adapter for permanent use.

Ideas to Extend

  • Replace the buzzer with a 5V or 12V relay module (with a 1N4007 diode across the coil) to switch off a heater or start an exhaust fan.
  • Add an LDR divider on the unused second op-amp to also detect the bright light of a flame.
  • Use a 7805 regulator and a small solar panel with a rechargeable battery for an off-grid shed alarm.

1 thought on “LM358 Fire Alarm Circuit with Thermistor & Buzzer”

Leave a Comment