No question or problem this time, but a post to share how installing a Senseair S8 CO2 sensor has worked out for me.
Technically this is easy as pie. Connect Vcc (5V!) and ground, and the two data lines to two GPIO's (D7 and D8 in my setup).
In Domoticz create an "Air quality" device, and in ESP Easy a device for the hardware (using the idx from Domoticz).

Schermafdruk 2017-08-21 23.44.04.png (97.33 KiB) Viewed 5310 times

Looking at the ESP Easy interface I could see the Co2 value, in Domoticz it stayed zero.
Then tried a "custom sensor" in Domoticz, and the value came in very nicely. But not in the correct format where a value gets a textual property: excellent, fair, etcetera.
So I created a small script that copies the value into the "air quality" device. That works. Not a real solution, but more of a workaround. OK for now.
Here's the script:

Later (thanks to a suggestion from grovkillen ) I changed this setup into a simple rule in ESP: this eliminates the need for a dummy device in Domoticz, and a running script.
Here's the rule (including a line for my BMP085):

On System#Boot do
timerSet,1,30
endon
On Rules#Timer=1 do
SendToHTTP,10.0.0.199,8080,/json.htm?type=command&param=udevice&idx=1808&nvalue=0&svalue=[BMP085#Temperature];[BMP085#Pressure];0
SendToHTTP,10.0.0.199,8080,/json.htm?type=command&param=udevice&idx=1806&nvalue=[S8#PPM]
timerSet,1,30
endon

When this worked (setup on a breadboard) I added a few more sensors just for the fun of it: DHT22, DHT1750 and BMP085. I know, not the most up-to-date, but this is what I had lying around.
I put the whole setup in my living room and let it measure for a while.

What strikes me is how easy it is to draw conclusions. Also, how "different" this sensor is. I don't know for sure, but I suspect many of us are "techies": we love to play around with things and make it work, and then sort-of loose interest. The fun is in the building of the unit.
But this is different.
I can draw conclusions from the measurements, and can see new applications on the horizon.
Look at the graph below, specifically the last two days (the graph before that is contaminated by measurements during setup).
I can see the CO2 value being low, until the evening starts (this is when we are in the living room, two adults). Then around midnight we turn in and the value slowly drops. In the morning, I get up and open up the large doors to the garden to let the summer in: the CO2 value immediately sharply drops.

How can we use this: rising CO2 value indicates people present, and could influence the switching of lights (OK, I admit: there are better ways to do this). But more importantly, I could link the value of the CO2 level to a ventilation system: turn it on when the value rises above a set value, turn it off when it is under another set level.

The only downside of this sensor: it is not cheap. I found prices in China of $54 and up. A steep price, but when you think of what this little device does...

(As soon as I have some time, I will update the Wiki page for this setup)

This sensor has a great wow-factor. With most other sensors, you are excited immediately after installation, and then get used to it.
The S8 still surprises me.

Check out the screenshot below. Before, I've already recognized the daily peaks, every evening the doors and windows close and we are staying in the livingroom. Hence the CO2 level goes up: 2 adults breathing is enough for this sensor to measure in a room of about 70 square meters.

But now check out the enormous peak on September 10th!
It was quickly explained: an evening at home, watching a movie, with 10 or 12 candles lit. Check out the CO2 output of those!

I also noticed the CO2 level to rise dramatically fast when cooking (on gas).
Our kitchen has no door to the living room, so concentration becomes equal in those rooms. (12 + 25 + 10 m^2 in total)
Let's say, it is good my CO2 sensor has a range from 400-5000 ppm, since it can spike over 2000 ppm in no-time.

I also noticed the CO2 level to rise dramatically fast when cooking (on gas).
Our kitchen has no door to the living room, so concentration becomes equal in those rooms. (12 + 25 + 10 m^2 in total)
Let's say, it is good my CO2 sensor has a range from 400-5000 ppm, since it can spike over 2000 ppm in no-time.

Amazing, this sensor can detect the change even though the oxygen consumption is in the kitchen...

I also noticed the CO2 level to rise dramatically fast when cooking (on gas).
Our kitchen has no door to the living room, so concentration becomes equal in those rooms. (12 + 25 + 10 m^2 in total)
Let's say, it is good my CO2 sensor has a range from 400-5000 ppm, since it can spike over 2000 ppm in no-time.

Amazing, this sensor can detect the change even though the oxygen consumption is in the kitchen...

Well the rooms are connected, so the concentration will become equal in all adjacent rooms.
But it was an eye-opener for me to see this dramatic increase happening so quickly.

I also noticed the CO2 level to rise dramatically fast when cooking (on gas).
Our kitchen has no door to the living room, so concentration becomes equal in those rooms. (12 + 25 + 10 m^2 in total)
Let's say, it is good my CO2 sensor has a range from 400-5000 ppm, since it can spike over 2000 ppm in no-time.

Amazing, this sensor can detect the change even though the oxygen consumption is in the kitchen...

Well the rooms are connected, so the concentration will become equal in all adjacent rooms.
But it was an eye-opener for me to see this dramatic increase happening so quickly.

Yes you can even measure the CO2 level in water since equilibrium will happen after a while. The smaller air volume the faster this equilibrium take form.

I think you could, as long as the sensor is not submerged in the water. But measuring the CO2 level just above the water, just under light hood covering the tank. It should give a fair indication of CO2 level in the water, I think.
This could be a nice experiment! Measure the CO2 level with and without the air pump switched on!
But I don't have a fish tank...

I have a big aquarium, with a CO2 system, I do not have the senseair sensor, yet. I will look at the datasheet and see how sensitive it is to moisture.

If it will work, I think putting it in a plastic container upside down would be ideal, if it can handle the moisture. Will be 100% humidity all the time, but I think I can protect it from splashes and immersion. Just in the hood is not enough it needs to be in the water, or in an air bubble in the water.

You can protect it somewhat using rice or moisture capturing bags (found in some shoes and purces and stuff).

You would have to replace that every once in a while. I use a moisture-eating powder sold in DIY stores, it is sold to keep moisture out of campers and caravans. But that stuff takes up moisture and turns into liquid. Can't use it for the fishtank, I don't think the fish would appreciate it very much

The specs say 85% humidity (NON-Condensing) max. No easy way to do that for an aquarium application.

Using chemical dehumidifiers would be very bad. Ph would go through the roof as would the hardness. I think they are generally calcium based. Calcium chloride if I remember correctly.

On a similar note, I was using a bme280 (pressure, temperature and humidity) sensor in the garden for a few months. It was in a sensor housing which keeps the rain out but allows air flow.
It stopped working so I took a look today. Lots of corrosion on the sensor board. I cleaned it up, put a conformational coating on it and put it back out. Hopefully it will be okay for a while.
Condensation is not good for circiut boards.

For using thks sensor as a co2 sensor it needs a closed chamber to isolate an air "bubble" from the environment around.
If you want to give it a try i'd suggest to use a plastic case, one side open.
Mount the sensor deep inside the case, use silicon or similiar to make the cabling air tight.
Place the box with the open side down over the water surface.
Lower it until the lower rim is below the water surface.

This creates an isolated air chamber, avoiding the influence of the air around..

Anyways, this sensor might be not suitable for this purpose.
The humidity is extremely high and might condense water inside the sensor.
I'd prefer a pH electrode as it is made for working in the water and
calibration is much easier.

I've been running an S8 in a multi-sensor box for a while now. The box contains a dustsensor, a BME280, and of course the S8 sensor.
On the outside I mounted an OLED display onwhich I can show all measured values. Additionally there is an RGB LED that I can give a color to match air quality.
To ensure good readouts, I mounted a small fan.

All very nice, but my wife did not appreciate this humming box displaying text and colors, so I decided it was time for a second sensor.
This time I decided to keep it small: a D1 mini, with the S8 piggy-backed on it.
WIring is very simple, connect to gnd and 5V. On the other side use two 47 Ohm resistors with some crimp around the leads, to connect the signal from the S8 to D7 and D8.
I used a small piece of double sided tape to connect the two, but just to make sure I put a small tiewrap around it.
The whole thing is USB powered, and very small.

IMG_20180912_164008.jpg (134.3 KiB) Viewed 3830 times

Makes me wonder if there is a possibility to run this off a battery? I know the ESP can, bring it to sleep and wake up every 15 minutes or so.
But what about the S8? If I use three AA batteries, is the voltage too low? What if I connect to a 9V battery?

Those CO2 sensors need quite a lot of current to work.
So maybe a battery alone will not work for long because of the relative high internal resistance of the battery.
I guess adding a big capacitor, with a resistor between capacitor and battery, may help here.

Those super caps (0.47F, 5.5V) may be suitable. Just make sure the voltage over the capacitor never exceeds the rated voltage and better stay a bit below it.
If the S8 works fine on 4.5V, then that would be a nice max. voltage.
Just use something like 10 Ohm resistor to charge the capacitor and connect the S8 directly to the cap.

Those CO2 sensors need quite a lot of current to work.
So maybe a battery alone will not work for long because of the relative high internal resistance of the battery.
I guess adding a big capacitor, with a resistor between capacitor and battery, may help here.

Those super caps (0.47F, 5.5V) may be suitable. Just make sure the voltage over the capacitor never exceeds the rated voltage and better stay a bit below it.
If the S8 works fine on 4.5V, then that would be a nice max. voltage.
Just use something like 10 Ohm resistor to charge the capacitor and connect the S8 directly to the cap.

Yep, given that Grovkillen can confirm the sensor works fine @4.5V.
And you really have to make sure you do not overcharge those caps to a higher voltage.
They contain a lot of energy in a very small package and higher voltage will destroy them. The only question is, how explosive will the destruction be.

And if you do not supply a charging resistor, these caps will just short circuit the power supply feeding them.
The time to charge them is depending on R*C. (about 4*RC for 80% charge?)
Charging a capacitor means the voltage will increase, so 80% charge means 80% of the charging voltage.
And if you wait long enough, the voltage over the capacitor is the charging voltage, so do not charge with more than about 4.5V
You could go up-to 5.5V, but those caps are actually 2 caps of 2.7V each and if they are not matched very well, the voltage over one may be higher than the other and thus get over 2.7V when you use > 5V charging voltage.

You could also use a switching voltage regulator powered by the cap, but that will introduce unneeded noise on the power lines and inefficiency.
Or just use one of those buck converters directly powered by the battery, just to make sure you can still get enough power when the battery gets discharged.
But that will also discharge the battery to almost 0 and some chargeable batteries don't like that.

I would get the deepsleep and settings configured and working perfect on mains before trying battery power. Less variables to troubleshoot makes life easier.

One thing I saw on the date sheet was "Response time - 2 minutes by 90%"
Grovkillen, could you explain what this means and do you know how long it is from power on to stable readings? Not all devices give a good reading for a short period but as I do not have a S8 I have no idea. I run a few solar / 18650 battery operated units (temperature and battery Voltage mostly), but they are on for a few seconds every 10 minutes and can pretty much run indefinitely with a small solar cell charging the battery.

Regarding the "2 minutes to 90%" is in fact the response time for first "good" measure. The detector temperature need a certain time to reach a good level and after 2 minutes it has reached 90% of that level, at that point the readings are very much reasonable. You can of course turn the S8 off in between and have the detector reaching this level faster upon next start but this is not recommended since the S8 is only dumping it's values to its EEPROM once every 4 hours. If turned off before this period no records are saved and the ABC will never kick in. The LP8 is better suited for battery powered applications since it's designed to save it's values in between measure and power off.

Regarding the "2 minutes to 90%" is in fact the response time for first "good" measure. The detector temperature need a certain time to reach a good level and after 2 minutes it has reached 90% of that level, at that point the readings are very much reasonable. You can of course turn the S8 off in between and have the detector reaching this level faster upon next start but this is not recommended since the S8 is only dumping it's values to its EEPROM once every 4 hours. If turned off before this period no records are saved and the ABC will never kick in. The LP8 is better suited for battery powered applications since it's designed to save it's values in between measure and power off.

Effectively this means the S8 should be powered on constantly, and this kinda rules out battery operation. Switching the ESP off and keeping the S8 on will save some power, but I don't think it will suffice to run on AA batteries for a longer period of time.
Will be looking at the LP8.

"Regarding the "2 minutes to 90%" is in fact the response time for first "good" measure"

Shouldn't this be read as : the usual std for instruments being that it would take 2 minutes before reaching a response step of 90% on the output/measurement ?
This is usually expressed as T90 = 2 minutes, e.g.: if CO2 value in the atmosphere goes from 1000ppm to 2000ppm after 2 minutes it would have a measured valued at the output of the S8 of +/- 1800 ppm ?

"Regarding the "2 minutes to 90%" is in fact the response time for first "good" measure"

Shouldn't this be read as : the usual std for instruments being that it would take 2 minutes before reaching a response step of 90% on the output/measurement ?
This is usually expressed as T90 = 2 minutes, e.g.: if CO2 value in the atmosphere goes from 1000ppm to 2000ppm after 2 minutes it would have a measured valued at the output of the S8 of +/- 1800 ppm ?

Chinese prices are dropping yes but how these end up on Ali I don't know. I buy mine from Senseair directly (as I work there) but even I can't buy them (and shipping them) for these prices. DHL, which I always use for international shipping, is more than the cost of that sensor.

Hello all,
the more expensive such items are, the more likely it is you will find faked copies or rejects on platforms like AliExpress, ebay etc.

I've got a lot of sensors from Ali.
More or less all of them were out of specifications, starting from DS18B20 up to SHT11 and SHT15.
SHT15 should have a tolerance of +/- 2% rH. Checked with a calibrated hygrometer, found differences up to 15% and more.

So at least with the SHT1x and some others I tested I'd say most of cheap chinese stuff works but gives unreliable values.
Bad thing is that many sellers in Europe sell exactly this chinese stuff far more expensive, but not more reliable.

I don't have a chinese S8 at hand for comparison the originals I have so I can't say much about these.

Anyways, this does not say cheap sensors are completely useless.
If they work at all it should be possible to calibrate them via settings or rules in most cases.

But remember that calibrating needs a reliable (and usually unaffordable) measuring instrument for comparison.If you want to exactly calibrate a thermo sensor to +/- 0.1°C you need a thermometer with +/- 0.01°C tolerance.
Math can't be fooled.

For rough checking:
For checking a thermo sensor use a calibrated glass thermometer used in chem labs.. starting from around 20 EUR...
For checking a humidity sensor you may use instruments like a Peaktech 5160 starting from 30 EUR and up.

You may notice: Cheap sensor + checking tools is more expensive then a good sensor.

If you try to do a reliable check for a carbon monoxide, carbon dioxide or dust sensor
you'll quickly learn some limits. Even a simple check of the values costs a fortune.

Last but not least checking and calibrating needs some knowledge, it is not as easy as it shows.

Forgive me a bit of sarcasm:
Why is it necessary to read a room temperature with three decimals?
Oh, because you can and it looks so nice.........

Well, if you have a good calibrated sensor you'll reach about +/- 0.1°C tolerance.
Reading more then one decimal is just lottery game then.
The widespread DS18B20 has a tolerance of +/- 0.5 °C. If you compare two of these
sensors you may get a difference up to 1°C in worst case - without leaving the datasheets tolerance limits!
Even one decimal is disputable with that tolerance. Don't play bingo with your sensors. You won't win.

My conclusions:
- China sensors are nice for testing and tinkering, to see if a circuit design works. For productive use I'd prefer something more reliable.
- Readings should be done as exact as really needed and as exact as your sensor's tolerance allows.

that last sentence is spot-on. Most of us should be OK with readings that may not be accurate down to the decimals.
Personally I use S8 sensors as an indication for ventilation. So I go by the Domoticz classification of good, fair bad, etcetera.
Same for temperature and relative humidity.
I treat the measurements as "relative". Not scientific, but good enough for my purposes.
The one quality aspect that I keep: sensors should work, and keep on working...
The (original) S8's that I use meet that requirement, and they are accurate as well. Bonus !

Not only should the calibration and the sensor be right, but also the way it is being used.
For example when you have no ventilation near the sensor, the readings will be off.
Or in a tight enclosure the sensor may heat up by the heat produced by the ESP for example.
Or a CO2 sensor may be exposed to direct sunlight (it measures IR absorption).

There are lots of reasons a sensor may report values not reflecting the true intended environmental values.

Not only should the calibration and the sensor be right, but also the way it is being used.
For example when you have no ventilation near the sensor, the readings will be off.
Or in a tight enclosure the sensor may heat up by the heat produced by the ESP for example.
Or a CO2 sensor may be exposed to direct sunlight (it measures IR absorption).

There are lots of reasons a sensor may report values not reflecting the true intended environmental values.

And of course it is also possible there are forgeries around.

Definitely... didn't want to make my posting even longer then it grew already but you're right.

Simple experiment shows what might happen.
- Take three thermometers.
- First, put them near together, wait some minutes and then note the values to find differences between them.
- Second, put one on the floor, one on about 1,50 m height, one near ceiling, on a high shelf for example.
- wait again some minutes, then compare....

You will get differences... at wintertime maybe unbelieveable differences.

Same with humidity...
For testing good placement I've used up to three humidity sensors, roughly calibrated with the Peaktech 5160
and placed them around in one room on same high (Temperature influences rH value!) .... Differences are astonishing.

With some sensors placement is obviously a factor, PIR sensors and sunrays for example.
It is not that obviously that placement is a factor with literally every sensor.

Forgeries: I've sent one of these terribly deviant SHT15 I got to Sensirion, the company that produces the genuine SHT15.
Still looking forward for the answer, might be interesting.

that last sentence is spot-on. Most of us should be OK with readings that may not be accurate down to the decimals.
Personally I use S8 sensors as an indication for ventilation. So I go by the Domoticz classification of good, fair bad, etcetera.
Same for temperature and relative humidity.
I treat the measurements as "relative". Not scientific, but good enough for my purposes.
The one quality aspect that I keep: sensors should work, and keep on working...
The (original) S8's that I use meet that requirement, and they are accurate as well. Bonus !

I agree to some point. Let me give some clarification.

For many purposes even a temperature difference of 2, 3 or 4 °C doesn't say much.
Flow temperature of central heating. Is it 65°C or 68°C? Who cares.
For some purposes temperature reading should be more exact. Simple example: A fish tank.
For a tropical freshwater tank temperature should be around 25°C. A difference of 3..4 °C
is not acceptable there. Getting near 30° says the oygen dissolved in the water tends to zero - deadly zone!
So at least an accuracy of +/- 1°C is necessary. A good DS18B20 from a well known source does the trick.

It's a genuine unit as far as I can tell. But it could be a QA approved Senseair unit that has been mistreated at customer site. And a employee may have taken it and sold it on AliExpress? This is just guessing by me.