Fire Detection Using Seeeduino Xiao And Flame Sensor

About the project

In this Tutorial we will learn how to use Seeeduino XIAO Expansion board by making a Simple Fire Detection project using a Flame Sensor.

Project info

Difficulty: Easy

Platforms: AdafruitArduinoDFRobotSeeed StudioVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Jumper wires (generic) Jumper wires (generic) x 1
DFRobot Gravity: Analog Flame Sensor For Arduino DFRobot Gravity: Analog Flame Sensor For Arduino x 1
Seeed Studio Seeeduino XIAO Expansion board Seeed Studio Seeeduino XIAO Expansion board x 1
Seeed Studio Seeeduino XIAO Seeed Studio Seeeduino XIAO x 1

Software apps and online services

Visuino Visuino
Arduino IDE Arduino IDE

Story

Warning playing with fire can be dangerous.

Step 1: What You Will Need

1 / 5

  • Arduino Flame Sensor
  • Seeeduino XIAO Expansion board
  • Seeeduino XIAO
  • Jumper wires
  • Visuino program: Download Visuino

Step 2: About Seeeduino XIAO

  • Powerful CPU: ARM® Cortex®-M0+ 32bit 48MHz microcontroller(SAMD21G18) with 256KB Flash, 32KB SRAM
  • Flexible compatibility: Compatible with Visuino & Arduino IDE
  • Easy project operation: Breadboard-friendly
  • Small size: As small as a thumb(20x17.5mm) for wearable devices and small projects.
  • Multiple development interfaces: 11 digital/analog pins, 10 PWM Pins, 1 DAC output, 1 SWD Bonding pad interface, 1 I2C interface, 1 UART interface, 1 SPI interface.

Typical Application

  • Wearable devices
  • Rapid prototyping (directly attached to the expanded PCB as a minimal system)Perfect for all the projects need mini Arduino
  • DIY keyboard
  • USB development (USB to multi-channel TTL/USB host mode, etc.)
  • A scenario where you need to read multiple mock values The DAC output

Step 3: The Circuit

1 / 2

  • Place the Seeeduino XIAO on the Expansion board
  • Connect Flame sensor pin [VCC] to Expansion board pin [5V]
  • Connect Flame sensor pin [GND] to Expansion board pin [GND]
  • Connect Flame sensor pin [D0] to Expansion board digital pin [1]

Step 4: Start Visuino, and Select the Seeeduino XIAO Board Type

1 / 2

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Seeeduino XIAO" as shown on Picture 2

Step 5: In Visuino Add, Set & Connect Components

1 / 13

  • Add "OLED I2C" component
  • Add "Play Frequency Tone" component
  • Add "Pulse Generator" component
  • Add "Delay" component

Double click on the "DisplayOLED1" and in the "Elements" window:

  • Drag "Fill Screen" to the left
  • Drag "Draw Text" to the left & in the properties window set "Size" to 3 and "Text" to FIRE
  • Close the "Elements" window
  • Select "PulseGenerator1" & in the properties window set "Enabled" to False and click on the Pin Icon and select Boolean SinkPin
  • Select "PlayFrequency1" & in the properties window set "Initial Frequency (Hz)" to 10 and select "Enabled" and click on the Pin Icon and select Boolean SinkPin
  • Select "Delay1" & in the properties window set "Interval (uS)" to 500000
  • Connect "Seeeduino XIAO" Digital pin [1] to "PulseGenerator1" pin [Enabled]
  • Connect "PulseGenerator1" Pin [Out] to "Delay1" Pin [Start]
  • Connect "PulseGenerator1" Pin [Out] to "PlayFrequency1" Pin [Enabled]
  • Connect "PulseGenerator1" Pin [Out] to "DisplayOLED1" > "Draw Text1" Pin [Clock]
  • Connect "Delay1" Pin [Out] to "DisplayOLED1" > "Fill Screen1" Pin [Clock]
  • Connect "DisplayOLED1" I2C Pin [Out] to "Seeeduino XIAO" I2C Pin [In]"
  • Connect "PlayFrequency1" pin [Out" to "Seeeduino XIAO" Digital pin [3]

Step 6: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 7: Play

If you power the Seeeduino XIAO module, the Display will start to show "FIRE" If the flame sensor detects the fire, also a piezo will start to beep.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Tutorial, you can download it and open it in Visuino: https://www.visuino.eu

Schematics, diagrams and documents

Visuino File

Code

Visuino File

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...