Page 1 of 1

Natural Gas/ Co detector and code for arduino

Posted: Thu Nov 29, 2018 2:21 pm
by deleted-658838
I need help to find or create a natural gas/CO detctor compatible with arduino.
I need sensor that is accurate and precise with long term use in a science fair system that I am building. This will be a part of the prototype II system. The first prototype system and project won first in a new york state science fair for 7-10th grade students.

I have a youtube video of my presentation.

https://youtu.be/Qj53YPQaaoU

I already have a simple mq sensor with simple code that works. The problem is that the sensor can not be implemented in the real system. I need a very reliable natural gas and CO detector that i can add to my project and set it up in the arduino code (c++ if i’m not mistaken). I do not know if such a detector exists for sale, but I could not find any natural gas detectors online that would be compatible with the arduino, and can be connected and then left in a room for an extended period of time like a real detector would be connected. If you watched the video, you can see that the sensor is set to activate the system and this detector will do the same thing.

To simplify, I need a sensor or instructions on how to create a detector that detects natural gas and co level concentration (the ppm will be displayed on a screen in the finished system), can be installed in homes (as if it were the finished product) with the same functions as a real detector in a part of my arduino home defense system.

Re: Natural Gas/ Co detector and code for arduino

Posted: Thu Nov 29, 2018 8:30 pm
by LeungWilley
Hi,
Congrats on your successful projects!

Starting with the CO detector, please take a look at the following and see if it will work for your experiment:
https://www.digikey.com/en/maker/projec ... 28c5ca2850

If this sounds promising, please review and confirm the reliability / performance data of this line of sensor and see if they meet your requirements:
https://www.digikey.com/en/datasheets/s ... onoverview

Good Luck!
Willey

Re: Natural Gas/ Co detector and code for arduino

Posted: Thu Nov 29, 2018 11:21 pm
by deleted-658838
Thank you so much for help with the co sensor Willey, that one will be perfect.

Now a proper natural gas (methane) detector setup for arduino is my biggest challenge because this is the main focus of the system. I couldn’t find anything online about someone making a detector for arduino that can read the natural gas ppm, only simple sensors that would not be ideal for a real system.

Ethan B

Re: Natural Gas/ Co detector and code for arduino

Posted: Fri Nov 30, 2018 7:48 pm
by LeungWilley
Hi Ethan,
Glad to hear that the CO sensor will work.
Here's an option for the CH4 that should work with your arduino setup:

https://www.gasdetectorsusa.com/GDUSA/p ... e)_methane

From the datasheet, it looks like the unit can send out 4-20 milli-amp signal that you can then use the ADC on your arduino and convert into a signal that you can program with.

Good Luck with your experiment!
Willey

Re: Natural Gas/ Co detector and code for arduino

Posted: Fri Nov 30, 2018 8:51 pm
by deleted-658838
Thanks for finding me that Willy. My only problem is that the product costs 200$, which would be more than everything else in my project from this year and last year combined. Do you think there is a similar detector for a better price, or is this the best deal I can get for what I’m looking for. If there is no suitable substitutes, I will have to talk to my teacher about a budget expansion.

Also, I would like to credit you somewhere on my research board (probably in bibliography and research sections) for helping me find a sensor to use. What should I write your name as (ex: Prof. Willey __, Mr. Willey __)?

Regards,
Ethan B

Re: Natural Gas/ Co detector and code for arduino

Posted: Sat Dec 01, 2018 4:00 pm
by LeungWilley
Hi Ethan,
I am sorry to say that I have struggled to find a better priced unit, at least not one that uses infrared technology and give you the range of detection that you are looking for.

If you want a unit that's slightly more capable / robust than the MQ-4, please take a look at this unit from Figaro (TGS-6810): https://www.thomasnet.com/catalogs/item ... g-element/

This uses a similar "wheatstone" bridge that you had setup for the MQ4, see circuit diagram here:
http://www.figarosensor.com/products/6810pdf.pdf

(You may want to email these folks and see if they can send you a sample. http://www.figarosensor.com/contact/)

Please let us know if there's anything else we can do to help.
Best of luck with your experiment!
Willey

P.S. Thank you very much for the offer to credit me on your research board. I appreciate it very much but it's not necessary. If you really want to credit someone, please credit the "Science Buddies" site. Thanks!

Re: Natural Gas/ Co detector and code for arduino

Posted: Sat Dec 01, 2018 8:29 pm
by deleted-658838
Thanks for the help,
Ethan B

Re: Natural Gas/ Co detector and code for arduino

Posted: Tue Dec 11, 2018 11:26 am
by deleted-658838
Is there any sample codes that I can find to connect the gas sensor (https://www.gasdetectorsusa.com/GDUSA/p ... e)_methane) to an arduino?

I am planning on ordering this but do not know how to connect it and do the coding on the arduino to get the arduino to read and display the ppm of the sensor. My coding level is basic, and I can not afford messing up on the coding for it. Is there any way I could find an arduino code that already exists for this sensor so I could work off of it in my project?

Ethan Basaleli

Re: Natural Gas/ Co detector and code for arduino

Posted: Tue Dec 11, 2018 8:19 pm
by LeungWilley
Hi Ethan,
Once you configured the meter to output 0-5V, you should be able to read the value at the Arduino using the standard Analog read code. https://www.arduino.cc/reference/en/lan ... nalogread/

If you want to practice with other components to make sure you feel comfortable and get a better understanding of what the program is doing, you might want to take a look at tutorial such as this:
https://programmingelectronics.com/tuto ... a-voltage/

Good Luck!
Willey

Re: Natural Gas/ Co detector and code for arduino

Posted: Wed Dec 19, 2018 2:51 pm
by deleted-658838
thanks!