Shameless plug: I wanted to measure PM10 and PM2.5 pollution level in my neighbourhood, so I built the ESP8266-based sensor using instructions from Luftdaten [1] and since the original interface is pretty ugly, I created my own UI:
I built a pretty similar rig around an RPi Zero W, same SDS011 AQ sensor and BME280 temp/pressure/humidity sensors as Luftdaten, just polled by a couple of python scripts on cronjobs.
Then just setup a nice Graphana+Prometheus as a service, graphana.com is nice and can expose a Prometheus end point over basic http auth - easy to post to. Then you can setup alerts, graphs, dashboards, etc.
In fact you could have a whole suite of IoT reports flowing in from various Arduinos really easily. Or at least a couple CO2 sensors spread around the house.
Total investment of coding would be about 30-50 lines of Arduino code for the Esp8266 and you may even get away with the free plan on Graphana.com.
I obviously like to outsource as much as possible these days. Less learning, but more efficient.
Would you be able to share where you might get such a cheap CO2 sensor/the name of it? I've had trouble finding them for less than £60 in the UK and would like to set one up.
https://www.co2meter.com/collections/sensors has a bunch of different ones, I usually look on Mouser also. I don't have a name of one currently. I've been using the particle.io platform with a particle device/LTE for sending out data and programming them.
This doesn't measure CO2 levels. It measures volatile organic compounds and calculates the amount of CO2 that would cause the same greenhouse effect.
>The SGP30 does have built in calibration capabilities, note that eCO2 is calculated based on H2 concentration, it is not a 'true' CO2 sensor for laboratory use.
Not even that. It is designed for hvac applications and measures VOCs on the assumption that they are from human breath and have a corresponding increase in CO2 levels due to breath.
Slight aside, anyone know why all the supposedly iot-oriented small arduino devices are IPv4-only? Is everyone deploying them in some kind of NATs + port forwards / upnp system or tunneled overlay IPv4 network using external gateway devices?
Awesome. The Arduino port "IPv6 support" issue was closed 9 days ago too. No other IPv6 related issues reported yet. Off to look for reports from elsewhere of people using it...
I only found one example for the Espressif-provided RTOS, at https://github.com/IPv6-ESP8266/IPv6-ESP8266 . The example says it only works in a IPv6-only network and it's using link-local addresses, which kind of defeats the point of IPv6. No idea if these reflect limitations of the stack. It's a start at least :)
Genuine question: are Arduino's really for IOT or for prototyping? Not an expert, just read a lot about startups starting with a RaspPI or Arduino prototype for the Kickstarter or something and then getting "real" dedicated hardware for production.
It is common to start with these before the Kickstarter, just to get a proof of concept, but those boards (and the ESP8266) absolutely aren't for production. Raspberry Pis are terrible since the only way to interface with them is over a single USB 2.0 port - and that's shared with the 100M ethernet and the SD slot.
You might see an ATMega328p chip isolated, and that's "good enough" for hobbyist projects where you just want to make HID easier on yourself. But I think most shops that need one of these three would be much better off with a STM32-series chip - they cost pennies compared to consumer boards, run on microamps, and have much better documentation.
It'd be a huge red flag for me if I was interviewing with a hardware startup and they said they wanted to put Arduinos into mass production.
Installed a CO2 monitor in my home two days ago. Already changed my life. It warns me when I need additional ventilation and even beeps if CO2 levels raise too high.
It sounds silly but it's scary how quickly levels rise when the windows are closed.
>It sounds silly but it's scary how quickly levels rise when the windows are closed.
It might be scary, but is it actually dangerous? It could just be that the levels shown, even if raised, are inconsequential.
Basically wondering about the "Already changed my life" line.
Are we all without one risk certain CO2 death every day, or is the parent overly worried over nothing (and opens windows without really a need for it).
My wife is a respiratory therapist. When asked, she said higher-than-average CO2 is seen in COPD patients, and is compensated through an increase in metabolic bicarbonate production, countering the acidic properties of CO2. We are still entering unknown territories with such large populations getting exposed to higher CO2 levels, but she thinks we'll be fine.
Assuming the results of that study hold up, it seems like a legitimate concern, although at those CO2 levels I dare say there would be bigger problems.
It was causing a narcolepsy-like condition which caused me to experience extreme drowsiness and lethargy and fall asleep at inappropriate hours in my apartment.
My doctors couldn't figure out what it was because every time I'd go get bloodwork done, I'd be out of the house and the symptoms would clear up. I thought it was due to age and that I was simply getting tired when I got home. It took me nearly two years to realize the fatigue didn't happen when I was spending the night somewhere else. I read an article on CO2 levels affecting quality of sleep a few days ago here on HN and it dawned on me that the symptoms weren't happening when I was out of my own apartment and I'd sealed and weather-stripped the apartment shortly before the symptoms began.
The "changed my life" is probably "I have one more thing to focus on for a while". As humans emit CO2 and your lungs are full of it, the danger exists if you run out of oxygen and get too much CO2, the kind of situation where you can get indoors only if you tape all your doors and windows creating an airproof seal.
Fun fact: humans do not have oxygen levels detection, but do have CO2 levels detection. Your body would ring all kinds of the alarm bells if CO2 levels rise above the norm, even if there is enough oxygen.
Its not that I'm afraid to die here :) Its more about improving the quality of the air. And the body is pretty bad at recognizing higher than norm CO2 level unless it gets to life threatening levels. ( https://youtu.be/1Nh_vxpycEA?t=45 )
I've had a CO2Meter monitor for about a year now, and I have mine connected to a Raspberry Pi. I use a node script to push readings to a database on my NAS, and to fire an IFTTT webhook to my Nest to turn on the fan when CO2 levels hit a certain threshold.
I saw some study that suggests that higher CO2 levels decrease cognitive abilities. You wont die, but I do tend to get headaches when the air gets worse.
They have a calibration feature, of course most of the reviews fail to mention if the person understood how it worked and used it. (I personally find the mechanism a bit odd, but I guess it makes some sense if you assume some things about the environment)
It definitely shows that this is one of the cheapest meters on the market. But the values seem to be realistic, when having all windows open it shows 450-460 ppm which is at least close to the global 400ppm ( and I live next to a road in a bigger city ).
I'm looking around for an affordable household CO2 measurement tool but they're all wildly expensive. Is this technology complicated and cannot be obtained for $30? They're all like $120+
Edit: I realised that this is a perfect item for public libraries to loan out. Expensive, only needed occasionally, easy to use, potential for significant positive public impact on becoming more informed and healthier.
If you're looking for a cause that's affordable, practical, and local, consider buying and donating one to your local library.
What's particular about these sensors? I've been researching technologies to monitor plant growth and haven't yet looked into CO2 sensors, hence my asking. Do they come in an IC package?
You can only put link + title on here. And the story is rather boring :) I wanted to measure it, I got a device from amazon, found a python script to read the data, the dependencies (pyhidapi) always sigfaulted, so I wrote my own :)
Sounds like you have a ventilation problem, buildings are required by code to get a certain amount of fresh air from outside so that CO2, VOCs, chloroform, etc don't get too high.
Incidentally, NHTSA projects in 2100 CO2 will be at 789ppm [0] in the atmosphere, up from 410 today and 350 pre-industrial. And there are higher projections. One would assume that this would make ventilation more urgent, I guess building codes will have to be updated and existing buildings retrofitted.
That looks good as well! I actually didn't know about that project. It wouldn't have worked on my specific case though since I wanted it connected to my Mac, that tool only works on Linux.
In most places ventilation standards are set by building code. Point this out to your landlord, if they are not responsive notify the relevant local authority.
You literally can't have enough plants in the house to compensate for the CO2 production of its inhabitants.
You would have to place water immersed algae farms on every open space in the house and keep them illuminated with artificial light 24/7, because plants will produce CO2 at night otherwise.
Like you said, good ventilation is far more effective than any plant.
I am new to this one. I always wonder about accuracy. I think it depends on where you place your sensor in the room matters. If it is in place where lot of window air is hitting, it might alter the values. Or am I completely wrong?
Or are you using multiple devices to get the average of those devices?
Architecturally speaking this should be a super simple script that pulls the sensor data into a database for any use instead of a custom written http server that manages the sensor.
Depends, this was a question I tried to answer for myself with this project.
I did not easily find a good library for Python that would work on my Mac for reading the HID messages, so writing the device part in C++ was easier for me ( and an interesting excercise in c++17'ifying C code ). I thought about just having the c++ app be called from python, but wanted to try and see how hard it would be in c++ and found it extremely easy with the cpprestsdk.
Did you search for... "co2 meter python"? The pypi package called "CO2meter" (https://github.com/vfilimonov/co2meter) not only works well as a library on Mac OS, but also comes with a web-based dashboard:
Though with your steps it at least starts, but the webserver fails, and CTRL+C doesn't work ^^
* Serving Flask app "co2meter.server" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
INFO:werkzeug: * Running on http://127.0.0.1:1201/ (Press CTRL+C to quit)
ERROR:flask.app:Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 64, in home
data = read_logs()
File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 236, in read_logs
with open(os.path.join('logs', name + '.csv'), 'r') as f:
IOError: [Errno 2] No such file or directory: 'logs/co2.csv'
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET / HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET /favicon.ico HTTP/1.1" 404 -
^C^C^C^C
^C^C
co2meter_server writes measurements to "logs/co2.csv" in the current working directory every 30 seconds or so. As long as there is no measurement, you'll get this error from the web app trying to access the file. Just wait a minute and refresh the page.
@dhh highly recommends Awair for air quality monitoring. He gave some talk on it after be bought one for his whole staff (can't find the talk for some reason)
I got one and it's pretty cool. A bit of a game to get a high score.
http://smog.rekawek.eu/ https://github.com/trekawek/air-quality-info
(I know, it's PHP, but can be hosted virtually anywhere!)
[1] https://luftdaten.info/feinstaubsensor-bauen/