Advise - Building air quality sensors/network
Sebex last edited by
Hi all, I am very much a MySensor noob and hope some of you could help me out! Recently I have become really enthusiastic about home automation and the possibility of creating sensors to measure air quality in different indoor rooms. Since the holidays are around the corner it's a good time for to gather a list of the materials I need to start the project I have in mind and I hope some of you can provide me advise.
On the short term I want to use Home Automation to measure the air quality in different rooms and report on it, in the future the scope will expand to actual automation but for now I want to measure the air and report on it. Currently my scope would be to create wireless sensors that measure temperature, CO2 and humidity.
I came across the /iot link to create the wireless sensors but still have some unclarity as creating the sensors is a bit more complicated than setting up the Raspberry Pi. Below some Qs I have.
- Uno vs Nano. Is the Arduino Uno best for testing but the nano best for eventual deployment?
DS18b20 Dallas Temperature Sensors Module or DS18B20 Dallas Temperature Sensors. What's the benefit of just the sensor, since it's more expensive per piece in the end.
Si7021 Sensor Module 3.3V vs 5V. What's the benefit of choosing different voltage?
Any idea's? Could not find a sensor on the build part of the website.
Quite some choice here as well it seems. Before browsing I personally was thinking to try and create zigbee sensor, in order to create a meshnetwork. Is this a possibility or a very stupid idea?
To my understanding so far, the Arduino board powers the attached sensors and wireless module. How long would an arduino with 3 sensors + wireless module last realistically. I know it will depend on polling etc, but just to get an idea.
rejoe2 last edited by
@sebex At least some answers to your questions:
- As Nano and Uno use the same processor, there's no big difference between the two, besides the fact Nano's just USB powered...
- when talking about environmental data, you'd perhaps also like to have a look at BME680; it doesn't deliver CO2 directly, but the delivered restults ale partly calculated on this.
- Most newer (I2C-) sensors seem to work at 3.3V internally, so when powered directly at 3.3V, you might be able to avoid losses due to a voltage regulation
- DS18B20 Modules sometimes come with a resistor, so you'll have to desolder that in case you want to use more than one on the 1-wire bus; "naked" sensors might be more suitable, e.g. if you want them to be mounted closed to a metal tube to measure water temps => depends on your needs.
- ZigBee and MySensors are completely different worlds. (Apart from RS485) MySensors itself is capable of building a mesh network.
- In general, MySensors can be used with any meassuring equipment as soon as there exists an arduino library for the hardware - the rest ist just "packing" the measured values in a MySensors-compatible format for data exchange with te controller. Searching the web for CO2+arduino+sensor gives at least some results. Better ask for experience with a specific sensor and avoid starting "multiple" questions threads like you did here.
HJ_SK last edited by
I'm using MQ2 for Co2, LPG and Smoke. On MySensors is with radio good example.
More complex (including calibrating is to find here : sandboxelectronics.com)
I always start with testing new items without radio to better understand it's working.
The I switch (with more knowledge) to MySensors including Radio.
If your new (as I am) I should suggest to first try only 1 gateway. There is enough to learn by doing so.
About battery : I use 1 or 2 x 18650 in housing with USB connection to Nano or Uno or whatever else Arduino. That powers a 'set of 3' weeks to months of enough power. You can also use or choose for example LiPo. Much smaller, less in capacity but in my opinion better then AA or AAA.
And they're all rechargeable of course, what's far better for the environment!
Sebex last edited by Sebex
@rejoe2 thanks for the answers, really helpful! I'll give a go on the CO2 search, I will prevent making this a new thread regarding that question.
@HJ_SK yea makes sense to test it individually first and reduce variables. Regarding the 1 gateway, you mean stay away from home automation at first?
zboblamont last edited by
@hj_sk Rechargeable is not better for the environment simply because it can be recharged. My "Not better for the environment" pro-minis are still going after 2 years on the same 2AA alkalines, and 6 months so far on the ultrasonics, all with a booster that will suck every joule of energy down to death of the batteries at <0.75v/cell. Better for the environment is a tad more complicated, so please do not generalise, it is WAY more complicated, no offence intended.
@Sebex, if you first figure out viability of comms via radio v cable, physical size of nodes, power supplies, and what you must measure and would like to, there will be plenty on the forum able to refine your project to a more successful outcome.
As @rejoe2 alluded to, the DS18B20s in chip form are pretty cheap, but, that rather depends on physicalities (read up on 1-wire). I currently use 12 of them crimped on telephone plugs to on a Cat5e to a single Node for a 2 storey house, one of the guys on here used the same techninique via spare lines on his ethernet, another had to use RF as he was in a 100% concrete hell.
Think it through, toss it to the forum, there are many who have gone through the same as you or I, think "baby steps" Nobody bites....
rejoe2 last edited by
Regarding the 1 gateway, you mean stay away from home automation at first?
Imo, MySensors without HA Controller doesn't make sense or even will not work (without additional tricks). But to get familiar with a specific piece of hardware (e.g. a sensor type like the DS18B20), it's much easier to use the standard arduino sketch examples included in virtually every "library" without additional MySensors stuff first and add that as a second step (or first try if it's working on the PIN you plan, (e.g. PINs able for direct interrupt use are limited and so on).
So you also know, the hardware is working - that unfortunately can also happen...
HJ_SK last edited by
@sebex No not stay away from HA. First only 1 gateway with HA. When you got that 'in your fingers' it's time to look at more kinds of gateways. Just my opinion
Hello, if you use si7021 or similar (hdc1080, ...), then don't bother with DS18B20, the si7021 has a better temperature sensor, especially when DS18B20 you will buy on AliExpress etc are often fake. DS18B20 has a more complex protocol that uses more memory (can be a problem on atmega if you have many sensors and some basic user interface) and is only (IMHO) a valid option if you need a cheap option for having temperature, or if you need to have temperature sensor(s) away from your board.
Regarding CO2 sensors the main options are :
- some gaz sensors generating an "eCO2" value, which is sometimes pretty far from real CO2 value. It's good to tell you when you need to ventilate your room, but not real CO2 concentration. Advantage is a tiny size and (sometimes) a much lower power consumption.
- NDIR sensors, which are more bulky and are using much more energy (they basically can't work on battery) but give a relatively precise value of the CO2 concentration. They need regular baseline correction at outside CO2 concentration which is then set to 400ppm and used as a base to calculate indoor concentration.
There are a bunch of NDIR sensors available :
- MH-Z19B (improvement over the non-B version, so buy only that one). It's the cheapest option with precise enough value, but the automatic baseline calibration (ABC) is not great. In automatic mode (default on the sensor) it will take the lowest value in the last 24 hours and use it as 400ppm, meaning if you left it inside in a closed room with higher CO2 concentration it will return funky values. So it's better to trigger ABC "manually"/from code which is constraining, that's why I don't advise you to use this sensor unless you are really looking for the cheapest option (at 15-20$ it's unbeatable)
- SenseAir S8, it exists in different versions (be careful, the cheap versions are just alarms for industrial use, they don't report any CO2 value). There's a "residential" version (-0013 without pins, -0056 with pins) and a "LP" version (-0053) using less power and with a better precision. They have a good reputation and are used in a bunch of commercial sensors (AirVisual pro is/was using them) and the ABC is way more effective and reliable (spanned over several days). I think it's the best option now that you can get them for 25-30$ for the LP version on AliExpress.
- DS-CO2-20 from Plantower, a bit more expensive than the S8 (30$+). I don't know too much about this one, nor how it's ABC works, I see no interest compared to S8 LP.
- Sensirion SCD30 with similar power consumption and accuracy than the S8 LP, but expensive around 60$ if bought by the unit. It also includes a good temperature and humidity sensor and I2C interface so it would be enough to fill your needs if you can afford the price.
- Telaire 6703 (search T6703 on AliExpress). Available at low price (25$) on AliExpress, it has a functional ABC (spanned over a week), decent accuracy (similar to MH-Z19B) and power consumption nearly as low as the S8 LP. Its big advantage is the I2C interface, you don't need a serial port like the S8 or MH-Z19B. There is also a much more precise T6713 version but it's 60$.
Hope it helps
Sebex last edited by
@nca78 appreciate the elaborate answer, thanks!
Regarding NDIR sensors, how frequent do they need to be recalibrated to maintain accuracy?
@sebex this is purpose or the "ABC". They neeed to be exposed to outside air at regular interval (usually at least once a week) to recalibrate themselves and stay accurate for years.