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.
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.

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 / pin | Connects to | Notes |
|---|---|---|
| LM358 pin 8 (VCC) | +9V | 100 nF capacitor from pin 8 to pin 4, close to the IC |
| LM358 pin 4 (GND) | GND | |
| NTC thermistor | +9V and LM358 pin 3 | Either way round |
| 10k resistor | LM358 pin 3 and GND | Lower half of the sensor divider |
| 10k preset ends | +9V and GND | |
| 10k preset wiper | LM358 pin 2 | Sets the trip temperature |
| 1 MΩ resistor | LM358 pin 1 and pin 3 | Hysteresis (clean switching) |
| 1k resistor | LM358 pin 1 and BC547 base | Base current limit |
| BC547 emitter | GND | Flat face toward you: collector, base, emitter (left to right) |
| Active buzzer (+) | +9V | Longer leg or + mark |
| Active buzzer (-) | BC547 collector | |
| Red LED anode via 1k | +9V | Cathode to BC547 collector |
| Green LED anode via 1k | +9V | Cathode to GND (power indicator) |
| LM358 pin 5 / pins 6 and 7 | GND / tied together | Unused 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.
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
| Problem | Fix |
|---|---|
| Buzzer is always on | Turn 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 sounds | Check 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-point | Make 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 randomly | Keep the thermistor leads short or use twisted wire, and fit the 100 nF capacitor right at the IC. |
| Battery drains quickly | The 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”