Customer:
What do the values output by the MQ137 example code represent? Are they ppm values calculated from the R0 value for the sensor? I understand that without calibration against known ammonia concentrations these won’t be accurate readings, but I’m trying to understand if the ATTiny computes the value from the MQ137 known coefficients and the R0 value as a ppm value.
Also, at what level does the LED turn on?
Originally submitted via email support on 11 November 2024. Migrated to the forum for community visibility.
Soldered Support:
Regarding the LED: it appears it’s not active from the software side. I checked the schematic and it’s connected to the onboard ATTiny microcontroller but not to a hardware output. This looks like it was overlooked in the firmware. If you have access to an UPDI programmer, I can send you an upgraded firmware version that activates the LED when the analog reading reaches a certain value. The current firmware is here: Soldered-MQ-Gas-Sensor-Arduino-Library/extras/attiny_firmware/attiny_firmware.ino at dev · SolderedElectronics/Soldered-MQ-Gas-Sensor-Arduino-Library · GitHub
As for the ppm values: the readings from the sensor are a rough approximation of PPM. They correspond to reality (moving ammonia close/far from the sensor, removing it entirely, etc.), but as you mentioned, the sensors need to be calibrated to extract exact ppm values. We have limited equipment here so we cannot exactly determine the ppm per value for these sensors. The README of the library describes how it works: Soldered-MQ-Gas-Sensor-Arduino-Library/src/libs/MQUnifiedsensor at dev · SolderedElectronics/Soldered-MQ-Gas-Sensor-Arduino-Library · GitHub
In the example I provided I used values found online. If you want to attempt more detailed calibration, this repository has useful information: GitHub - tkaewplik/mq137-sensor: Odor sensor · GitHub
Customer:
I’m surprised the LED isn’t functioning, but it’s not a major concern for the units I’ll be using these sensors in because they won’t be visible—it was more curiosity since the website states it illuminates when gas is detected.
I’m in a similar position regarding calibration, but I’ll try to create a test chamber with the sensor inside where I can introduce known quantities of ammonia to plot an output response. Thank you for the details; I’ll read the data sheets and application notes to create a test method for the device.
Attachment omitted in migration: ~WRD2528.jpg
Soldered Support:
Indeed, the LED is set up on other variations of our sensor boards, but on this one it looks like it just wasn’t implemented.