How to Build an Optical Smoke Detector Step-by-Step Circuit Guide

For accurate early warnings, use an infrared scattering sensor like the Sharp GP2Y1010AU0F. This unit detects particulate matter by reflecting light off airborne particles, triggering at concentrations as low as 0.3 mg/m³. Pair it with a 3.3V microcontroller (ESP8266 or ATmega328P) to process signals efficiently. The sensor requires a pulsed current (typically 10–20 mA) for the emitter LED–avoid continuous operation to prevent overheating.
Wire the emitter LED through a 220Ω resistor to limit current, connecting it to a GPIO pin configured for short pulses (10–20 ms). The photodiode output should feed into an operational amplifier (LM358) set to high gain (100k feedback resistor) to amplify weak signals. Add a 10 μF capacitor across the sensor’s output to smooth fluctuations.
For power, use a 5V regulated supply with decoupling capacitors (0.1 μF and 10 μF) near the microcontroller to eliminate noise. Test the sensitivity by adjusting the trigger threshold in firmware–start with a baseline value (e.g., 500 mV) and fine-tune using a controlled aerosol source like incense smoke. Calibrate the delay between pulses to avoid false alarms from ambient light.
Include a piezo buzzer driven by a transistor (2N2222) or a relay for external alarms. Connect a pull-down resistor (10kΩ) on the sensor’s output to ensure stable readings. For battery-operated setups, optimize power consumption by reducing pulse frequency (e.g., every 2 seconds) and using deep sleep modes between checks.
Building a Light-Scattering Fire Sensor Schematic
Select an infrared LED with a peak emission at 880–940 nm for optimal particulate interaction–cheaper visible-spectrum components degrade signal-to-noise ratio by 40% under typical airborne residue loads. Pair it with a photodiode featuring a daylight-blocking lens; units lacking spectral filtering introduce false positives at 3.2× baseline rate during ambient light shifts. Position emitters and receivers at 70–110° angles–acute alignment magnifies cross-talk, while obtuse angles miss sub-0.3 µm particles entirely.
Wire a transimpedance amplifier immediately after the photodiode; PCB traces exceeding 12 mm between sensor and op-amp pick up 50 Hz mains interference. Use a low-noise op-amp (input bias
Implement hysteresis via Schmitt-trigger comparator after amplification; fixed-voltage thresholds toggle erroneously on humidity swings (20–90% RH), whereas adaptive hysteresis (20 mV above baseline) slashes nuisance activations by 87%. Route comparator output to a microcontroller with watchdog reset–AVRs without brown-out detection latch false states during 120 ms brownouts, common in aging wiring.
Test the assembled board in a calibrated aerosol chamber emitting 2% obscuration; adjust comparator threshold until the alarm triggers within 60 s ±3 s. Document sensitivity across particle sizes–0.5 µm droplets require 2.1× higher LED current than 2 µm units, yet excessive brightness burns out emitters within 1,800 hours under continuous duty.
Critical Parts for Building a Photoelectric Alarm Assembly
Select an infrared LED with a wavelength between 850nm and 950nm–these emitters balance efficiency and ambient light rejection. For consistent detection, pair it with a photodiode matched to the same spectral range; a silicon PIN type (e.g., BPW34) offers swift response times below 100ns. Power the emitter with a precise current-limiting resistor: calculate using R = (Vcc - Vf) / If, where Vf is typically 1.2V to 1.5V at 20mA. Avoid generic LEDs; opt for T-1 or T-1¾ packages with focused lenses to minimize scatter.
An operational amplifier (op-amp) with low input bias current (under 100pA) is non-negotiable. Choose a rail-to-rail input/output model (e.g., MCP6002 or TLV271) to maximize dynamic range on a single 5V supply. Configure it as a transimpedance amplifier converting the photodiode’s picoampere currents into measurable voltages. Use a feedback resistor between 1MΩ and 10MΩ–higher values increase sensitivity but may introduce noise. Add a 10pF to 100pF feedback capacitor to stabilize the stage and filter high-frequency interference.
Signal processing demands a microcontroller with an onboard ADC resolution of at least 10 bits. An 8-bit MCU like the ATtiny85 may suffice for basic setups, but a 12-bit ADC (e.g., STM32G0 series) enables finer particle discrimination. Include firmware hysteresis: compare readings to a moving average window (20-50 samples) to ignore transient fluctuations while still detecting gradual buildup. Use interrupts for the photodiode input to reduce CPU load; configure edge triggers for rising or falling signals.
- Voltage regulator: A low-dropout (LDO) linear type (e.g., AMS1117) ensures stable 3.3V or 5V supply. Quiescent current should stay below 100μA to prolong battery life in standalone units. For 9V battery sources, add a 10μF tantalum input capacitor to prevent oscillations.
- Buzzer: A piezoelectric transducer rated for 3kHz-4kHz output maximizes audibility; drive it with a 50% duty cycle square wave from the MCU’s PWM output. For louder alerts, boost voltage with a simple flyback circuit using a 2N2222 transistor and 100Ω resistor.
- Test button: Connect a momentary SPST switch between the photodiode output and a GPIO pin. Debounce in firmware with a 50ms delay or use a hardware RC filter (10kΩ/100nF).
Assembly layout dictates performance. Position the emitter and receiver at a 90° to 120° angle with a 5mm to 10mm separation gap–this geometry optimizes scatter detection from airborne particulates while rejecting direct light. Shield the chamber with matte black paint to absorb stray reflections and use an IR-pass optical filter (e.g., Roscolux #27) to cut visible spectrum noise. Ground planes should isolate analog signals from MCU digital switching; route traces in a star topology. For SMD components, a 4-layer PCB with dedicated power/gnd layers reduces EMI.
Debugging and Calibration Steps
- Verify emitter current with a multimeter in diode test mode. Expected forward voltage drops: 1.1V–1.4V. If readings deviate, recheck resistor values and solder joints.
- Measure photodiode dark current by covering the chamber; ideal values should be under 1nA. Higher leakage suggests contamination or damaged component.
- Expose the chamber to controlled aerosol (candle wax fumes or standardized test cartridges). Adjust the op-amp’s gain trimpot to set the alarm threshold just above baseline readings–typical targets: 150mV–300mV above ambient.
- Validate MCU interrupt response by injecting a 1Hz signal (matching the expected scatter frequency) into the photodiode line. Confirm firmware triggers within 200ms of threshold crossing.
- Test power consumption in idle/alarm states: battery-powered designs should draw under 30μA idle and below 50mA during alerts to meet UL 268 standards.
Step-by-Step Wiring Guide for IR LED and Photodiode in Fire Alarm Systems
Select an IR emitter with a wavelength between 850–940 nm for optimal obscuration sensitivity. Pair it with a photodiode matching the emitter’s peak response; most standard components operate at 900 nm. Verify datasheets for forward voltage (typically 1.2–1.5 V) and current (20–50 mA) to avoid thermal damage.
Mount the emitter and receiver at a fixed distance–10–15 cm apart–inside a light-tight chamber to minimize ambient interference. Align their optical axes precisely; misalignment beyond ±5° reduces signal strength by over 40%. Secure components with non-reflective adhesive (e.g., matte black silicone) to prevent stray reflections.
Power and Signal Conditioning
Wire the IR emitter in series with a 220 Ω resistor (for 5 V supply) to limit current. Connect the photodiode in reverse bias (cathode to VCC, anode to ground) to maximize sensitivity. Add a 0.1 µF decoupling capacitor across the emitter’s power leads to filter high-frequency noise.
Amplify the photodiode’s output using an op-amp (e.g., LM358) with a gain of 100–500. Configure the feedback resistor (Rf=10 kΩ) and input resistor (Rin=100 Ω) for a cutoff frequency of ~10 Hz to reject 50/60 Hz flicker. Feed the output to a comparator (LM393) with a reference voltage set at 70% of the quiescent signal level–this threshold triggers when obscuration exceeds 30%.
Calibration and Testing
Apply compressed air to clear residual particles before calibration. Measure the quiescent voltage at the comparator input; adjust the reference pot until the output toggles. Introduce a controlled obscurant (e.g., aerosol spray at 5 mg/m³) and verify the alarm activates within 3 seconds. If response is sluggish, shorten the emitter-photodiode distance or increase op-amp gain. For false-tripping issues, add a 1-second delay (RC network: 1 MΩ + 1 µF) to ignore transient interference.
Calculating Resistor Values for Reliable Fire Alarm Sensor Performance
Start with the datasheet of the photointerrupter or LED-phototransistor pair. The emitter’s forward voltage (Vf) typically ranges between 1.2 V and 1.8 V at 20 mA, while the collector-emitter saturation voltage (Vce(sat)) for the detector sits around 0.2 V to 0.4 V. Use Ohm’s law to derive the series resistance for the emitter: R = (Vcc - Vf) / If. For a 5 V supply, an emitter drawing 15 mA needs (5 - 1.5) / 0.015 ≈ 220 Ω. Round to the nearest standard E24 value–220 Ω or 240 Ω–to maintain consistent light output.
Key Factors Affecting Resistance Selection

- Ambient light suppression: Dark current in the detector increases with temperature; select a load resistor that limits collector current to 5–10 µA under worst-case conditions (e.g., 0.5 MΩ for a 5 V rail).
- Hysteresis: Add a feedback resistor between the detector’s collector and emitter LED to prevent false triggering. A 10 kΩ–47 kΩ resistor introduces 5–15 mV of hysteresis, adjusting for noise margins.
- Power dissipation: Verify resistor wattage:
P = I²R. A 220 Ω resistor at 15 mA dissipates0.015² × 220 ≈ 50 mW–use 1/8 W or 1/4 W resistors for safety.
For the detector’s load resistor, calculate using RL = (Vcc - Vce(sat)) / Ic. With a 3.3 V supply, collector current of 100 µA, and Vce(sat) at 0.3 V: (3.3 - 0.3) / 0.0001 = 30 kΩ. Use 33 kΩ to ensure headroom; lower values increase sensitivity but risk false alarms from stray IR reflections. Test across temperature extremes (-10°C to 50°C) and adjust in 5 kΩ increments if the signal drifts beyond ±10% of the nominal threshold.
- Measure actual Vf and Vce(sat) with a multimeter; datasheet values are typical, not guaranteed.
- Simulate with LTspice or Falstad, using the exact resistor values before soldering.
- Replace fixed resistors with trimpots (e.g., 20 kΩ) during prototyping to dial in optimal operating points.
- After finalizing values, substitute trimpots with fixed resistors to eliminate drift from vibration or thermal cycling.