top of page
  • Writer's pictureQuan Sheng

Smoke Detector with RPi

Next up, we will be making use of the MQ-2 Smoke Sensor to create smoke detector.

Smoke Sensor

The MQ-2 sensor used is SnO2 material, which is lower conductivity in clear air, the conductivity of sensor would go up with the increase of the smoke concentration. The sensor convert the different conductivity to the correspondent output signal of the smoke concentration. The MQ-2 sensor has high sensitivity to liquefied petroleum gas, propane and hydrogen.


MQ-2 pinout are AO, DO, VCC and GND.

VCC - This pin powers the module, typically the operating voltage is +5V

DO (Digital Output) - Digital output from this pin

AO (Analog Output) - Outputs 0-5V analog voltage based on the intensity of the gas 



First to understand the function of the smoke sensor:

- The smoke sensor return analog signals and raspberry pi only accept digital signal therefore there will be a need to convert the analog to digital signal.

A way to convert the signals is using the MCP3002 Converter.

Analog to digital convertor (ADC)

This is the layout of the ADC.


Each pinout function of a ADC

Based on the diagram, i will need to connect each individual pin to the Pi Cobbler


CS -> CS0

CH0 -> AO (Analog signal from smoke sensor Not From Pi Cobbler)

CH1 -> VSS

VSS -> GND

DIN - > MOSI

DOUT -> MISO

CLK -> SCLK

VDD -> 3V3


This is how it looks like when connecting everything

Connected smoke sensor to RPi

At the start, i had issue with the smoke sensor. It doesn't output any values, so i suspect the smoke sensor is malfunctioning.


A working product. Smoke Sensor + RPi!

This is so cool and be make to sense if there is a fire nearby!


Stay Tune For More Cool Project Like This!!!

6 views

Comments


bottom of page