Skip to content

dezeroku/smoke-detector

Repository files navigation

Smoke detector

Simple smoke detector that will beep in a pattern until a button is pressed (which will snooze it for 5 minutes) or timeout occurs.

The main usage idea is to detect cigarette smoke and alert the user to close the window manually when it happens.

It uses Arduino Uno R3 as the logic board.

Circuit

Electronics schematic can be viewed using Autodesk Eagle (open the schematic.sch file).

The rendered png file is available as schematic.png and visible below.

MQ2 smoke/gas detector with digital output adaptation is used as a sensor. Schematic

Logic

flowchart TD
    A[Start] --> B{Is smoke detected?}
    B -->|Yes| C[Buzz + blink]
    B -->|No| B
    C --> D{Was button pressed?}
    D -->|Yes| E[Quiet down]
    D -->|No| F[Have 5 seconds passed since detection?]
    F -->|Yes| E
    F -->|No| C
    E --> G[Sleep 5 minutes]
    G --> B
Loading

Building

It uses the Arduino flavoured C++ under the hood and needs arduino-cli to work.

Rust caused problems during compilation and I don't have time to fix these :/

Run make to build and make install to flash the binary to a device. This requires the Arduino to be present as /dev/ttyACM0

End notes

This project makes use of:

About

Simple arduino based smoke detector

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published