BAI ROBOTICS / PROJECT 01

Automatic fire detector

Sense the flame.
Trigger response.

A BAI hardware build that reads a flame sensor, then drives a pump, warning light, and recorded voice alert through an ESP8266 controller.

D5flame input
D1pump relay
D2voice trigger
D6LED output
BAI automatic fire detector prototype
01BAI FIRE RESPONSE
Prototype build
ESP8266 CONTROL SYSTEMFIELD NOTES 01—05

01 / PROJECT OVERVIEW

From signal
to response.

This prototype connects flame sensing to a physical response: an ESP8266 switches the pump relay, plays a recorded warning, flashes an LED, and can log a Blynk event.

01 / INPUT

Detect

The published sketch reads one digital flame-sensor input on D5. Two sensor modules are shown in the project materials.

02 / CONTROL

Decide

The ESP8266 sketch maps D1 to the relay, D2 to the voice module, and D6 to the LED indicator.

02 / SIGNAL FLOW

A small system
with a clear job.

The drawing below follows the pin assignments in the published sketch. It describes the signal path; use the supplied circuit diagram and module datasheets to confirm physical wiring.

Read the firmware pin map

03 / PARTS DOCUMENTED IN THIS PROJECT

Component catalog

Quantities and details below come from the project page, wiring diagram, firmware sketch, and prototype photos. Where those sources are incomplete or disagree, the row says so.

Back to project overview

Marketplace links: These open component-specific search results, not verified seller listings. Check the latest INR price, stock, shipping, and product specifications on the marketplace. BAI does not sell, stock, ship, or fulfil these parts.

Required build parts

Electrical components and power

  1. ESP8266 NodeMCU development board

    Runs the published fire-detection, relay, voice-alert, LED, and Blynk sketch.

    Project quantity
    1 board
    Documented detail
    ESP8266; sketch uses D1, D2, D5, and D6.
    Verify before purchase
    Board revision, input-voltage limits, and exact USB-UART variant are not recorded.
  2. Single-channel relay module

    Switches the water-pump motor from the controller output.

    Project quantity
    1 module
    Documented detail
    One channel; the sketch assigns its control signal to D1.
    Verify before purchase
    Logic/coil voltage, DC contact rating, and motor startup-current rating are not specified. Confirm 3.3V GPIO compatibility for the exact module.
  3. Flame sensor modules

    The project page and diagram show a pair of modules for flame detection.

    Project quantity
    2 modules shown
    Documented detail
    The sketch reads one digital input on D5.
    Verify before purchase
    Sensor model, output type, operating voltage, and second-sensor firmware mapping are not confirmed. The diagram's second sensor on D6 conflicts with the sketch's LED assignment on D6.
  4. ISD1820 voice-recording module

    Provides the recorded voice warning triggered by the project sketch.

    Project quantity
    1 module
    Documented detail
    ISD1820; sketch assigns the play control to D2. The diagram labels a 3.7V supply.
    Verify before purchase
    Board revision and permitted supply range are not documented; confirm the module datasheet before connecting the shown supply.
  5. 12V DC mini water pump

    The project page describes a mini pump; the diagram labels a 12V DC motor.

    Project quantity
    1 pump/motor assembly
    Documented detail
    12V DC is the only recorded motor supply specification.
    Verify before purchase
    Current draw, startup current, flow/head, and tube connection size are not recorded. Match the pump and relay to the actual power supply.
  6. LED indicator

    Visual warning indicator listed in the project and shown in the wiring diagram.

    Project quantity
    1 LED
    Documented detail
    The sketch assigns the indicator output to D6.
    Verify before purchase
    Colour, package size, forward voltage, and current are not specified.
  7. 220Ω resistor

    Series resistor labelled beside the LED in the wiring diagram.

    Project quantity
    1 resistor shown
    Documented detail
    220Ω nominal resistance.
    Verify before purchase
    Tolerance, power rating, and resistor package are not specified.
  8. 8Ω speaker

    Audio output transducer connected to the ISD1820 module in the diagram.

    Project quantity
    1 speaker
    Documented detail
    8Ω impedance is labelled in the diagram.
    Verify before purchase
    Power rating, dimensions, and connector style are not specified.
  9. 3.7V power source

    Separate source labelled for the voice module in the wiring diagram.

    Project quantity
    1 source shown
    Documented detail
    3.7V label only.
    Verify before purchase
    Chemistry, capacity, discharge rating, connector, and protection/charging requirements are not documented.
  10. 12V DC power source

    Supplies the 12V motor/pump path shown in the project diagram.

    Project quantity
    1 source shown
    Documented detail
    12V label only.
    Verify before purchase
    Output current, connector, polarity, and isolation are not specified. Confirm the pump load and relay contact ratings.

Build accessories

Present in the project; details to confirm

  1. Hook-up wiring

    Wiring accessories are listed in the project and visible in the prototype photos.

    Project quantity
    As needed; count not recorded
    Documented detail
    Coloured connecting wires are visible in the assembly photos.
    Verify before purchase
    Wire gauge, insulation, length, connector type, and current rating are not documented.
  2. Pump tubing

    Tubing is described as part of the prototype and visible in its photos.

    Project quantity
    As needed; length not recorded
    Documented detail
    Water tubing is used with the pump.
    Verify before purchase
    Material, inner/outer diameter, pressure rating, and required length are not documented. Match the tube to the actual pump outlet.

No optional electronic parts or enclosure cut list are documented. The handmade enclosure visible in the photos is not itemized because its material and dimensions are unknown. The BOM is a guide to the recorded prototype; confirm the actual parts and datasheets before ordering or powering the circuit.

05 / CONTROLLER SKETCH

The logic, in code.

Use the template as a project reference. Add your own Blynk and Wi-Fi values before uploading.

ESP8266 code

Replace the template values with your Blynk credentials, then connect your Wi-Fi details before uploading the code.

#define BLYNK_TEMPLATE_ID "Enter Your Template ID"
#define BLYNK_TEMPLATE_NAME "Enter Your Template Name"
#define BLYNK_AUTH_TOKEN "Enter Your Blynk Auth Token"
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char ssid[] = "Your WiFi Name";
char pass[] = "Your WiFi Password";

#define FLAME_PIN D5
#define RELAY_PIN D1
#define ISD_PLAY  D2
#define LIGHT_PIN D6

bool fireNotified = false;
unsigned long lastBlinkTime = 0;
bool lightState = false;

void setup() {
  Serial.begin(9600);
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);

  pinMode(FLAME_PIN, INPUT);
  pinMode(RELAY_PIN, OUTPUT);
  pinMode(ISD_PLAY, OUTPUT);
  pinMode(LIGHT_PIN, OUTPUT);

  digitalWrite(RELAY_PIN, LOW);
  digitalWrite(ISD_PLAY, LOW);
  digitalWrite(LIGHT_PIN, LOW);
}

void loop() {
  Blynk.run();

  int flameState = digitalRead(FLAME_PIN);
  unsigned long currentTime = millis();

  if (flameState == LOW) {
    digitalWrite(RELAY_PIN, HIGH);
    digitalWrite(ISD_PLAY, HIGH);

    if (currentTime - lastBlinkTime >= 250) {
      lastBlinkTime = currentTime;
      lightState = !lightState;
      digitalWrite(LIGHT_PIN, lightState);
    }

    if (!fireNotified) {
      Blynk.logEvent("fire_alert", "Fire Alert! Fire Detected!");
      fireNotified = true;
    }
  } else {
    digitalWrite(RELAY_PIN, LOW);
    digitalWrite(ISD_PLAY, LOW);
    digitalWrite(LIGHT_PIN, LOW);
    fireNotified = false;
  }
}

Inside the prototype

The internal setup includes the controller board, relay, speaker, flame sensor modules, pump, and tubing arranged inside a hand-built enclosure. This makes the project both presentable and functional.

Founders

Debnarayan Dhara

Vaskar Das