{ "info": { "author": "Filip \u0160", "author_email": "projects@filips.si", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Physics", "Topic :: System :: Hardware" ], "description": "Gas detection\n=============\n\n[![Latest Version][icon-version]][link-pypi]\n[![Total Downloads][icon-downloads]][link-pypi]\n[![License][icon-license]][link-license]\n[![Build Status][icon-travis]][link-travis]\n\nGas detection for Raspberry Pi using ADS1x15 and MQ-2 sensors.\n\n## Description\n\nThe MQ-2 sensor can detect multiple gases (CO, H2, CH4, LPG, propane, alcohol, smoke) and outputs analog voltage. This project can convert it to digital using ADS1015 or ADS1115 and filter out the target gases.\n\nThe sensor can be inaccurate so don't use those measurements if you need them for security purposes. Use some professional measurement device if you need to do this.\n\n## Usage\n\nThe detection class uses ADS1115 and it's I2C address `0x48` by default. It assumes the sensor is connected to `P0`. You can also pass them to arguments.\n\nThe `ro` value is about `1000`, but it needs to be calibrated. This is done automatically if it is not specified. The calibration must be done in good fresh air to make measurements more accurate. Alternativly, you can save the calibration value and later pass it as `ro` argument.\n\n```python\nfrom gas_detection import GasDetection\n\ndetection = GasDetection()\n```\n\nYou can then read percentage of gases in parts per million (ppm). The measurements are returned as dictionary and gas be accessed by `GAS_XX` constant.\n\n```python\nppm = detection.percentage()\n\nprint('CO: {} ppm'.format(ppm[detection.CO_GAS]))\nprint('H2: {} ppm'.format(ppm[detection.H2_GAS]))\nprint('CH4: {} ppm'.format(ppm[detection.CH4_GAS]))\nprint('LPG: {} ppm'.format(ppm[detection.LPG_GAS]))\nprint('PROPANE: {} ppm'.format(ppm[detection.PROPANE_GAS]))\nprint('ALCOHOL: {} ppm'.format(ppm[detection.ALCOHOL_GAS]))\nprint('SMOKE: {} ppm\\n'.format(ppm[detection.SMOKE_GAS]))\n```\n\nYou can also look to [example file][link-example] for more examples. For more details how the values are calculated you can read [tutorial on Raspberry Pi Tutorials][link-tutorial].\n\n## Versioning\n\nThis library uses [SemVer][link-semver] for versioning. For the versions available, see [the tags][link-tags] on this repository.\n\n## License\n\nThis library is licensed under the GPLv3+ license. See the [LICENSE][link-license-file] file for details.\n\nA lot of code has been taken from [Raspberry-Pi-Gas-Sensor-MQ][link-source]. Thank you @tutRPi and others who contributed to that repository.\n\n[icon-version]: https://img.shields.io/pypi/v/gas-detection.svg?style=flat-square&label=version\n[icon-downloads]: https://img.shields.io/pypi/dm/gas-detection.svg?style=flat-square&label=downloads\n[icon-license]: https://img.shields.io/pypi/l/gas-detection.svg?style=flat-square&label=license\n[icon-travis]: https://img.shields.io/travis/com/filips123/GasDetection.svg?style=flat-square&label=build+status\n\n[link-pypi]: https://pypi.org/project/gas-detection/\n[link-license]: https://choosealicense.com/licenses/gpl-3.0/\n[link-semver]: https://semver.org/\n[link-travis]: https://travis-ci.com/filips123/GasDetection/\n\n[link-example]: https://github.com/filips123/GasDetection/blob/master/example.py\n[link-tags]: https://github.com/filips123/GasDetection/tags/\n[link-license-file]: https://github.com/filips123/GasDetection/blob/master/LICENSE\n\n[link-tutorial]: https://tutorials-raspberrypi.com/configure-and-read-out-the-raspberry-pi-gas-sensor-mq-x/\n[link-source]: https://github.com/tutRPi/Raspberry-Pi-Gas-Sensor-MQ/\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/filips123/GasDetection/", "keywords": "smoke gas detection hardware ads1x115 mq2 RaspberryPi", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "gas-detection", "package_url": "https://pypi.org/project/gas-detection/", "platform": "Linux", "project_url": "https://pypi.org/project/gas-detection/", "project_urls": { "Homepage": "https://github.com/filips123/GasDetection/" }, "release_url": "https://pypi.org/project/gas-detection/1.0.1/", "requires_dist": [ "adafruit-circuitpython-ads1x15", "pylint ; extra == 'lint'" ], "requires_python": ">= 3.4", "summary": "Gas detection for Raspberry Pi using ADS1x15 and MQ-2 sensors", "version": "1.0.1" }, "last_serial": 4874015, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "68118f52a615c168319a261d933cfb91", "sha256": "eb2b966007cefda2f09921cf2ce604b04a05121273ff343052dca3dbbf272ddf" }, "downloads": -1, "filename": "gas_detection-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "68118f52a615c168319a261d933cfb91", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18632, "upload_time": "2019-02-27T12:04:51", "url": "https://files.pythonhosted.org/packages/fb/ad/9132d5947f41e745f4ac17ebc210d7ff8e9f71c195ce110901ffef56adfb/gas_detection-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "89c299e2466658d1f1aa0fbc20a7f088", "sha256": "bcc0f8eef3a2473b1fdfabec2233ea56ae85e700eebb155432dd52f17094d0fe" }, "downloads": -1, "filename": "gas-detection-1.0.0.tar.gz", "has_sig": false, "md5_digest": "89c299e2466658d1f1aa0fbc20a7f088", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 19419, "upload_time": "2018-12-19T20:49:11", "url": "https://files.pythonhosted.org/packages/52/d1/32326024f7f0db8c16ae86722e27e2e01bccf6efb31dc17d23cb4e745ece/gas-detection-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "afa76b299c651b8bb1840b139ad36b4f", "sha256": "a006743162fa06b0d3549dd62a7441a47e59fe47a0dd50f20e0f782d3376fadd" }, "downloads": -1, "filename": "gas_detection-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "afa76b299c651b8bb1840b139ad36b4f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18629, "upload_time": "2019-02-27T12:42:23", "url": "https://files.pythonhosted.org/packages/ef/8e/e1267e4ea2ed2048eb307e2510eaede70e547deac421a14a8c22423b1109/gas_detection-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5fe5600054597ade838c705972b690d1", "sha256": "58925d283c74fc1675e2514cfdecf319d050506fcb1205ad448dcf848a0ae642" }, "downloads": -1, "filename": "gas-detection-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5fe5600054597ade838c705972b690d1", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 19444, "upload_time": "2019-02-27T12:42:24", "url": "https://files.pythonhosted.org/packages/43/be/d2665e67b7305bcd07380f87f92c7f776d13f87bb799134afc7b6bbe110d/gas-detection-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "afa76b299c651b8bb1840b139ad36b4f", "sha256": "a006743162fa06b0d3549dd62a7441a47e59fe47a0dd50f20e0f782d3376fadd" }, "downloads": -1, "filename": "gas_detection-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "afa76b299c651b8bb1840b139ad36b4f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.4", "size": 18629, "upload_time": "2019-02-27T12:42:23", "url": "https://files.pythonhosted.org/packages/ef/8e/e1267e4ea2ed2048eb307e2510eaede70e547deac421a14a8c22423b1109/gas_detection-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5fe5600054597ade838c705972b690d1", "sha256": "58925d283c74fc1675e2514cfdecf319d050506fcb1205ad448dcf848a0ae642" }, "downloads": -1, "filename": "gas-detection-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5fe5600054597ade838c705972b690d1", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.4", "size": 19444, "upload_time": "2019-02-27T12:42:24", "url": "https://files.pythonhosted.org/packages/43/be/d2665e67b7305bcd07380f87f92c7f776d13f87bb799134afc7b6bbe110d/gas-detection-1.0.1.tar.gz" } ] }