Wemos D1 mini with MQ135
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 5
- Joined: 29 Dec 2017, 20:15
Wemos D1 mini with MQ135
Hi there, I'm new to ESPEasy and so I've tried to use MQ135 to detect CO2 levels around the house
I've connected the sensor to the 3v3 output from the D1 mini, although I see that the spec define 5v as the recommended voltage
I managed to get a reading but it's not so stable so I have a few questions :
1. How do I get the rzero value of the sensor ? is there some kind of way in ESPEasy to upload sketches and run them without re-flashing ?
2. If I would be able to get the rzero, where do I put it in the Analog Plugin input configuration ?
3. Should I connect the sensor's input to the Wemos' 5V output pin ? Is there a risk the sensor would give an output of above 3.3v back to the board ? why is it dangerous to have such voltage back to the Wemos ?
Thanks in adavnce !
I've connected the sensor to the 3v3 output from the D1 mini, although I see that the spec define 5v as the recommended voltage
I managed to get a reading but it's not so stable so I have a few questions :
1. How do I get the rzero value of the sensor ? is there some kind of way in ESPEasy to upload sketches and run them without re-flashing ?
2. If I would be able to get the rzero, where do I put it in the Analog Plugin input configuration ?
3. Should I connect the sensor's input to the Wemos' 5V output pin ? Is there a risk the sensor would give an output of above 3.3v back to the board ? why is it dangerous to have such voltage back to the Wemos ?
Thanks in adavnce !
Re: Wemos D1 mini with MQ135
The analog input of the ESP8266 only allows between 0 and 1 V, so if you want to measure higher voltages, you should use 2 resistors to make the measuring part fit in that range.
For example 1kOhm + 4k7 Ohm in series with the voltage to be measured, with the 1K over the analog input. (voltage range is then 5.7 V)
For example 1kOhm + 4k7 Ohm in series with the voltage to be measured, with the 1K over the analog input. (voltage range is then 5.7 V)
-
- New user
- Posts: 5
- Joined: 29 Dec 2017, 20:15
Re: Wemos D1 mini with MQ135
Thanks for your reply 
I was wondering about your comment, given that you suggested in your example to use 4.7K & 1K Ohm resistors :
This would be for a source which voltage range is 5.7V ? do you have any knowledge of the MQ-135 Analog output voltage range ?
Thanks

I was wondering about your comment, given that you suggested in your example to use 4.7K & 1K Ohm resistors :
This would be for a source which voltage range is 5.7V ? do you have any knowledge of the MQ-135 Analog output voltage range ?
Thanks
Re: Wemos D1 mini with MQ135
No, have no idea of that sensor. But when you feed it with 5V, it is likely the sensor will not output more than that.
You still have to do a correction in software, so it doesn't have to match exactly as long as you know the factor of the voltage divider you create and you make sure the voltage on the analog input does not exceed 1V.
So using very standard E12 range resistors creates a very simple voltage divider.
With 1k2 and 4k7 you get a range close to, but a little less of 0..5V So when you supply it via some kind of USB plug, it may get up to 5.1V, which will result in possible higher input than 1V.
So then 1k and 4k7 it is
You still have to do a correction in software, so it doesn't have to match exactly as long as you know the factor of the voltage divider you create and you make sure the voltage on the analog input does not exceed 1V.
So using very standard E12 range resistors creates a very simple voltage divider.
With 1k2 and 4k7 you get a range close to, but a little less of 0..5V So when you supply it via some kind of USB plug, it may get up to 5.1V, which will result in possible higher input than 1V.
So then 1k and 4k7 it is

Re: Wemos D1 mini with MQ135
D1 mini has already a voltage divider on ADC pin (100k + 240k)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 5
- Joined: 29 Dec 2017, 20:15
Re: Wemos D1 mini with MQ135
Thanks for that,
Would be glad if anyone else familiar with the sensor could help with getting the rzero and where should I put it in the ESPEasy formula
Would be glad if anyone else familiar with the sensor could help with getting the rzero and where should I put it in the ESPEasy formula
Re: Wemos D1 mini with MQ135
As far as I can see from a quick google search this sensor is not straghtforward usage.
I think would be better to have a proper plugins for all MQ-xx variances to have correct calibration and readings
I think would be better to have a proper plugins for all MQ-xx variances to have correct calibration and readings
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 5
- Joined: 29 Dec 2017, 20:15
Re: Wemos D1 mini with MQ135
I saw there is an unofficial for the MQ135 but I'm not sure how to add it in order to test it
https://diyprojects.io/esp-easy-develop ... kjDrN-WY2w
https://diyprojects.io/esp-easy-develop ... kjDrN-WY2w
-
- New user
- Posts: 5
- Joined: 29 Dec 2017, 20:15
Re: Wemos D1 mini with MQ135
I tried to play a bit with this library but the readings I got from it made no sense...
I'll use it as a general "air quality" sensor...
One more question I'd like to know the answer to - say I'd like to connect a DHT22 temp\humidity sensor on the same D1 mini
The MQ135 connects to A0, 3v3 and GND
Is there a way to connect the DHT22 to the same board ?
I'll use it as a general "air quality" sensor...
One more question I'd like to know the answer to - say I'd like to connect a DHT22 temp\humidity sensor on the same D1 mini
The MQ135 connects to A0, 3v3 and GND
Is there a way to connect the DHT22 to the same board ?
Who is online
Users browsing this forum: No registered users and 14 guests