11Gas and Smoke Alarm

In this project, you’ll build a gas and smoke alarm using an MQ-2 gas and smoke sensor and a piezo buzzer. Every time the sensor detects gas or smoke in the atmosphere above a certain threshold, the buzzer will sound.

image

PARTS REQUIRED

Raspberry Pi

Breadboard

MQ-2 gas and smoke sensor

MCP 3008 chip

Piezo buzzer

5 mm LED

330 Ω resistor

Pushbut ton

Lighter

Jumper wires

INTRODUCING THE MQ-2 GAS AND SMOKE SENSOR

The MQ-2 gas and smoke sensor is sensitive to smoke and the following flammable gases: propane, butane, methane, alcohol, and hydrogen. Figure 11-1 shows the sensor’s front and back views.

FIGURE 11-1: The MQ-2 gas and ...

Get 20 Easy Raspberry Pi Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.