Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
/ Smeller Public archive

Code that turns an Arduino UNO Rev3 into a gas sensor, + wiring pics.

Notifications You must be signed in to change notification settings

creatorpanda/Smeller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smeller

*About the Upgrade: The new "multithreading" code controls the sensor, the buzzer and the LEDs "simultaneously". I withdrew all delay() functions, making the device as fast as possible. The 6-pin picture shows an MQ-7 sensor, but it works the exact same way on the MQ-5 *

This code was made for the audiovisual warning of the sensor owner that something is going wrong with the air he/she is surrounded by. An indicator led blinks meaning that the sensor is armed, waiting to "smell" something bad. When that happens, the indicator led turns off, the buzzer starts beeping and the danger led turns on and stays on until a new, non-dangerous value is input by the sensor. Then it goes back to blinking the indicator led and the buzzer goes silent. "Smelling" something bad will trigger again the buzzer and the danger led and so on. No reset required. (MQ-5 Gas Sensor and other equipment required, duh :P)

Le wild notes for the MQ5 Sensor (taken from HERE. Click for even more info!):

The Grove - Gas Sensor(MQ5) module is useful for gas leakage detection (in home and industry). It is suitable for detecting H2, LPG, CH4, CO and Alcohol. Due to its high sensitivity and fast response time, measurements can be taken as soon as possible.

So now you know, let's continue! :D

Le wild notes for the setup part:

  1. Values I entered myself were chosen by studying the values printed while leaking gas from a lighter on the sensor. They can be easily modified.

  2. Except for the MQ-5 Gas Sensor and the jumper wires, a 5V buzzer, 2 LEDs- one green/blue and one red- and one 110 Ohms 1% resistor (for the sensor's ground) are required to make the code work at its 100%. The green/blue is the blinking standby led and the red is the one that goes off when the alarm is triggered.

WARNING: using a resistor -which from my experience is an obligation or else the sensor keeps sending max value no matter what- will affect the sensor's reading. Using a resistor with different power than i recommended, will affect again the values the sensor sends to the device and as a result, it won't work right, cause then you're gonna have to reevaluate the if statements of the code. Be cautious!!

In case you don't know what to do: Click on the green "Clone or Download" button, click "Download Zip". Unzip it and you got the source code file, ready to be uploaded to your device!

About

Code that turns an Arduino UNO Rev3 into a gas sensor, + wiring pics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages