Skip to content

yoginiaishwaryaa/Image-Processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This folder contains two Arduino (.ino) files used to work with an MQ-4 methane gas sensor and an Arduino Uno.

The sensor readings collected using these programs are part of this dataset:
https://doi.org/10.6084/m9.figshare.30783827


File 1: gas_sensor_warming.ino

  • Warms up the MQ-4 sensor
  • Finds the clean-air baseline value (R0)

Use

  • Run once when setting up the sensor
  • Run again only if the sensor or wiring changes

Output

  • Raw sensor values
  • Sensor resistance
  • Final stable R0 value (shown in Serial Monitor)

Note down the R0 value — required for further measurements.


File 2: gas_sensor_ppm.ino

  • Uses the saved R0 value
  • Converts sensor readings into methane concentration (ppm)

Use

  • During actual measurements

Output

  • Raw ADC value
  • Sensor resistance
  • Methane concentration in ppm

(All shown in the Serial Monitor)


How data is saved

  • Data appears in the Serial Monitor
  • You can:
    • Copy it manually, or
    • Use a serial logging tool
  • Save it as .txt files outside Arduino

Quick summary

  • gas_sensor_warming.ino → prepares the sensor
  • gas_sensor_ppm.ino → measures methane
  • Output = Serial monitor only
  • File saving = manual

About

Arduino sketches for MQ-4 methane sensor calibration and ppm measurement using Arduino Uno. Output is via Serial Monitor only; data is logged externally.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages