Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: wokwi-mq2-gas-sensor Reference
sidebar_label: wokwi-mq2-gas-sensor
title: wokwi-gas-sensor Reference
sidebar_label: wokwi-gas-sensor
---

MQ2 Gas Sensor module
Expand All @@ -18,16 +18,16 @@ MQ2 Gas Sensor module

## Attributes

| Name | Description | Default value |
| --------- | ------------------------------------- | ------------- |
| ppm | part per million | "400" |
| threshold | Digital output threshold voltage | "4.4" |
| Name | Description | Default value |
| --------- | ------------------------------------------------ | ------------- |
| ppm | Initial gas concentration (in parts per million) | "400" |
| threshold | Digital output threshold voltage | "4.4" |

## Operation

The MQ2 Gas Sensor is a semiconductor sensor that can detect the presence of various combustible gases including LPG, Propane, Hydrogen, Methane, and Carbon Monoxide. The sensor has both analog and digital outputs:

- The analog output (AO) provides a continuous voltage reading that corresponds to the gas concentration(ppm). Higher gas concentration results in higher voltage output.
- The analog output (AO) provides a continuous voltage reading that corresponds to the gas concentration (ppm). Higher gas concentration results in higher voltage output.
- The digital output (DO) acts as a threshold detector - it goes LOW when gas concentration exceeds the threshold set by the potentiometer.

To use the MQ2 sensor:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ module.exports = {
'parts/wokwi-dip-switch-8',
'parts/wokwi-ds1307',
'parts/wokwi-franzininho',
'parts/wokwi-gas-sensor',
'parts/wokwi-hc-sr04',
'parts/wokwi-hx711',
'parts/wokwi-ili9341',
'parts/wokwi-ir-receiver',
'parts/wokwi-ir-remote',
'parts/wokwi-relay-module',
'parts/wokwi-ks2e-m-dc5',
'parts/wokwi-ky-040',
'parts/wokwi-lcd1602',
Expand All @@ -53,7 +53,6 @@ module.exports = {
'parts/wokwi-membrane-keypad',
'parts/wokwi-microsd-card',
'parts/wokwi-mpu6050',
'parts/wokwi-mq2-gas-sensor',
'parts/wokwi-nlsf595',
'parts/wokwi-nokia-5110-screen',
'parts/wokwi-ntc-temperature-sensor',
Expand All @@ -63,8 +62,9 @@ module.exports = {
'parts/wokwi-potentiometer',
'parts/wokwi-pushbutton',
'parts/wokwi-pushbutton-6mm',
'parts/wokwi-rgb-led',
'parts/wokwi-relay-module',
'parts/wokwi-resistor',
'parts/wokwi-rgb-led',
'parts/wokwi-servo',
'parts/wokwi-slide-potentiometer',
'parts/wokwi-slide-switch',
Expand Down