Build a gas leak system - Internet of Things - ثاني ثانوي

Lesson 3: Build a gas leak system

Build a Gas Leak Alarm System

Lesson 3: Build a gas leak system

We will start by adding the components that you will need for this project to the workplane.

Lesson 3: Build a gas leak system

Now, find the Gas Sensor and the Piezo buzzer, and connect them to the Breadboard.

Lesson 3: Build a gas leak system

Continue by adding two LEDs to the Breadboard and changing their colors.

Lesson 3: Build a gas leak system

Proceed with wiring the circuit. First, you will connect the Arduino to the Breadboard.

Lesson 3: Build a gas leak system

Continue by wiring the Piezo buzzer.

Lesson 3: Build a gas leak system

Next, you will connect the LEDs.

Lesson 3: Build a gas leak system

Finally, you will wire the Gas Sensor.

Lesson 3: Build a gas leak system

How the Gas Sensor Works:

The Piezo Buzzer

Table 3.3: Sound frequencies

Lesson 3: Build a gas leak system

Gas Leak Alarm System Code

Lesson 3: Build a gas leak system

Run the program to test it.

Lesson 3: Build a gas leak system

Search the Internet for different types of gas hazardsthat could be detected with a gas sensor and analyze them. Present your findings below.

Consider how different tones from the Piezo buzzer could signal different alarms for different types of hazards. Present your ideas below.

Lesson 3: Build a gas leak system

Describe uses for the Piezo buzzer other than for an alarm system.

The gassensor hasmore pinsfor connecting to amicrocontrollerthanmost othersensors. Review the information that the gas sensor sends and explain why it differs from other sensors.

Lesson 3: Build a gas leak system

Change the flashing pa�ern of the LEDs so that, instead of each LED turning on and off twice for 500ms, only the green LED turns on and off, 3 times, for 1 second each time.

Change the beeping pa�ern of the Piezo so that, instead of beeping with a tone of 110Hz for 1 second, it beeps with a tone of 220Hz for 700ms.

Extend the circuit so it also outputs an additional warning when gas values are over 100.