Closed whhsn closed 6 years ago
For all of this MQ sensors, you do not need any code. There is a pure analog signal from 0..5V that cames out and must execute through an A/D chip. The ESP has one the A0. You can use this with a voltage divider before. Please take a look here in the Wiki. If you need more to connect use the ADS1115 board. This is natively supported by TASMOTO.
Finally: There is nothing to add :-)
Just saw the log and pow functions used in the calculations. We already had some discussions in the energy metering. To use this the math() library needs to be included and this will jeopardize the RAM. Sorry. This is too much for the ESP
I am already using now it & the WeMos handles this beautifully :) Getting LPG, CO & Smoke readings not just a number!
Ok, I have added the whole sensor suite. Just now need to add some documentation how to define the sensors and do the calibration. the wiki need some update. Sensors are 5v and need a 165kOhm resistor before A0, if using the WEMOS D1 mini.
Hi,
There is similar code in my ino
https://github.com/stefanbode/Sonoff-Tasmota/blob/master/sonoff/xsns_94_MQ_SENSOR.ino
i did not observed any issues hangs during work because of pow() and log() functions. I have one issue in Sonoff 4ch pro. hangs when wifi disapeared, but I do not know if there is a MQ code problem, I have to test it , but I asked Stefan for some bin compilation because my platformIO is not updated yet to latest version.
but in config file there is some additional declaration needed
and for voltage measure
but both of them could not work simultaneously.
The bin is updated
How much flash has this device. If 512k, then we have the issue. The image is larger than it can be.
Sent from remote phone
Am 31.03.2018 um 08:39 schrieb roblad notifications@github.com<mailto:notifications@github.com>:
Hi,
I tryied but:
Sonoff 4CH Pro Module Sonoff Upload Failed
Magic byte is not 0xE9
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstefanbode%2FSonoff-Tasmota%2Fissues%2F30%23issuecomment-377673915&data=02%7C01%7Cstbode%40ptc.com%7C40168e743af34bd5ac5308d596da80db%7Cb9921086ff774d0d828acb3381f678e2%7C0%7C0%7C636580787580597138&sdata=X5mv7n3G1mTfC3%2Fuu%2BmfiMUtBqM4yuSnKaQb5k7UcGY%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPeUCsPBkEwn9FWdDwROCDRgVsVYVuw-ks5tjzKbgaJpZM4TATzK&data=02%7C01%7Cstbode%40ptc.com%7C40168e743af34bd5ac5308d596da80db%7Cb9921086ff774d0d828acb3381f678e2%7C0%7C0%7C636580787580597138&sdata=cvkyUou%2F58PxvymFdCLT1i6O5c0DP3zPfyQkkmH0KdQ%3D&reserved=0.
@stefanbode - I am using the sensor without any resistor with the WeMos! I have no way to check if the collected ppm data is right or not - but it seems ok - increasing with smoke & lighter gas - this is good for my usage.
Hi,
I upgraded and work perfectly with my mq5 sensor no any hangs as in previous releases sonoff 4ch pro with gas sensor mq5 and DHT 23kb free memory
@whhsn
Hi,
You have to use resistor the voltage value you get when ppm is small is approx. below 3.3 V maximum voltage from sensor for CH4 concentration could be 4.5 V
Good code for MQ-2 sensor: http://www.mybotic.com.my/products/MQ-2-General-Combustable-Gas-Sensor-Module/308