Gas Leak Detection Project with GrovePi and Hologram Nova
This project uses Grove Gas Sensor (MQ2) for detecting gas leakage and it can also send notifications using cellular network. It can be used for detecting the following:
- Smoke
- Propane
- Carbon Monoxide
- Liquified Petroleum Gas
- H2
- Methane
Things used in this project:
Hardware components:
Software Apps:
- GrovePi
- Python
- Hologram CLI
Gas sensor module from Grove system provides the ability to detect if there is any gas leakage of combustible gas or smoke. The measurements can be taken as soon as possible due to its sensitivity and fast response time.
GrovePi Zero is a HAT from Dexter Industries that allows Grove Gas Sensor (MQ2) to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming.
Grove sensor sensor works with analog I/O pins and it can be connected to A0 port Grove Pi Zero as shown below.
The installation instructions for Grove Pi zero and Hologram SIM are provided here .
First a cellular connection is established using the credentials that uses a devicekey obtained from Hologram dashboard.
import time
import grovepi
from Hologram.HologramCloud import HologramCloud
# Provide Hologram device key
credentials = {'devicekey': 'xxxxxxx'}
hologram = HologramCloud(credentials, network='cellular')
# Connect the Grove Gas Sensor to analog port A0
gas_sensor = 0
grovepi.pinMode(gas_sensor,"INPUT")
while True:
try:
# Get sensor value
sensor_value = grovepi.analogRead(gas_sensor)
# Calculate gas density - large value means more dense gas
density = (float)(sensor_value / 1024)
if(sensor_value > 825):
response_code = hologram.sendMessage("High Gas Sensor Value" +str(sensor_value))
time.sleep(10)
except IOError:
$ sudo python gas_sensor_led.py
Coin Casino - CasinoWow
ReplyDeleteAt coin casino, the only thing you will ever be surprised about หารายได้เสริม is how it's 바카라 designed. Players can play a variety of game types 인카지노 such as video poker,
Really excellent information regarding Gas Leak Detector with sensor. Thanks for sharing.
ReplyDelete