Close
0%
0%

Solar Powered Air Quality Monitoring Station (IoT)

This tiny box can measure air temperature, humidity and pressure but also much more like CO, eCO2, NO2, NH3 and dust concentrations!

Public Chat
Similar projects worth following
With the high increase in the number of combution engine cars and industries in the past decade, air quality has been drastically deteriorating.

If you live in one of the busy capitals of the world you may have had to close your windows because you could smell the polution in the air.

In this tiny 3D printed box we can find a fully custom PCB and a bunch of air quality sensors.
This can be attached right underneath your bedroom window. Through the integration with Home Assistant it will let you know when the rush hour pollution has reached your appartment and it is time to turn on the air purifier.

The sensors measure temp, humidity, pressure, CO, eCO2, NH3, NO2 concentrations, dust density, battery voltage, solar panel voltage, battery temp.


It is fully autonomous and it can run on a full 18650 battery for about 5 days if there is no sun, otherwise it can run indefinitely thanks to the 1W solar panel. 

The KA75330 voltage detector will cut power to everything if the battery voltage is below 3.3V. This allows it to recover even after being completely discharged and when the sun is slowly rising (thus avoiding ESP brownouts)

During sleep it uses less tham 1mA, however the sensors use 100mA during the heating period so some values are updated less often.

Sensors and modules: 

MICS-6814 - for measuring gas concentrations 
CCS-811 - for measuring CO2 
ADS-1115 - for precisely measuring the (analog) output of the MICS sensor
TP4056 - Battery charging module
ESP32 C3 Mini (Lolin)

Thermistor - for measuring the battery temp. V3 of this project will stop charging when temps are not safe but for this one I am just gathering data

Case: slightly modified version of https://www.thingiverse.com/thing:2282869

PCB: Custom design by me using EasyEDA

All data is sent to home assistant through the internet through HTTP POST so the weather station need to be in range of WIFI.

weather_station_2_arduino_IDE_code.txt

Please note that my weather station sends data to a home assistant instance on the same network. You may have different requirements so please modify the code to suit your needs. I've included some comments to help you guys understand it, however i am sharing this code as is with no warranty. I have not teste any other variant of the ESP32, only the Lolin ESP32 C3-Mini. It will definitely not work with any ESP8266 boards since some pins need to be held high during sleep

plain - 23.30 kB - 08/04/2022 at 10:47

Download

Main_Body_small v1.stl

3D print file for main body

Standard Tesselated Geometry - 1.62 MB - 08/01/2022 at 11:45

Download

Cover_Lid_small v1.stl

3D print file for the lid

Standard Tesselated Geometry - 63.75 kB - 08/01/2022 at 11:45

Download

x-zip-compressed - 28.62 kB - 07/28/2022 at 18:38

Download

JavaScript Object Notation (JSON) - 307.71 kB - 05/14/2022 at 19:54

Download

View all 6 files

  • 1 × ESP32 C3 Mini
  • 1 × MICS-6814
  • 1 × CCS-811
  • 1 × ADS-1115
  • 1 × TP4056

View all 12 components

  • Added Arduino code

    Ovidiu08/04/2022 at 10:52 0 comments

    Please see the files section where you can find the complete Arduino IDE code. You will have to replace some URLs and passwords for it to work

  • Added STL files

    Ovidiu08/01/2022 at 11:44 0 comments

    Please check the project and you will find the 2 necessary STL files to 3D print your own case.

View all 2 project logs

  • 1
    Download and install EasyEDA software

    This step is only required if you'd like to edit the PCB files provided here.

  • 2
    Go to your favorite PCB manufacturer and upload the Gerber file

    The Gerber file provided here is ready to upload

  • 3
    Solder the female headers, resistors and capacitors

    While this project encourages modularity, some components like resistors and capacitors are soldered directly to the PCB

View all 6 instructions

Enjoy this project?

Share

Discussions

Cristo wrote 08/10/2022 at 11:00 point

I like your project, it's very interesting, specially the use of KA75330.

Taking a look on it helped me to solve some issues I've had on battery powered projects (currently I'm working on a battery powered moisture sensors project) and how to get the batteries to last some days.

So, it would be nice if you could upload a schematic image in order to see how are components arranged on layout.

I'd like to know how do you check battery voltage: do you use a voltage divider?

C3 mini max input voltage is 3.6V, so you're using a voltage divider too, am I right?

Have you sensed the C3 mini power consumption on deep sleep? I've not found information internet about it.

Thanks in advance for your help.

  Are you sure? yes | no

Ovidiu wrote 08/10/2022 at 16:03 point

To check the battery voltage it is quite easy with a simple voltage divider. I used 2x100k Ohm resistors.

The entire board (ESP, resistors, mosfet) uses around 1mA during sleep. The Wemos C3 mini is really power efficient during sleep.

I will try to upload a picture of the schematic but in the meantime you could have a look at the easyEDA files.

  Are you sure? yes | no

jeffreyfick wrote 08/05/2022 at 15:16 point

This is the first I have heard of the KA75330 voltage detector. I have had troubles with my solar powered ESP8266 weather station, located in a not too sunny location, not rebooting during a spell of cloudy days. Looking forward to trying it out. 

  Are you sure? yes | no

Ovidiu wrote 08/05/2022 at 18:30 point

It is really good. Just don't hook it to the reset pin of the ESP8266. Use the enable pin instead. If you hold reset down on a wemos board for example it draws 100mA...

  Are you sure? yes | no

Ovidiu wrote 08/04/2022 at 10:57 point

Hi guys, i've added the Arduino Code as well. You can find in the files section.

Please don't hate me if it is not very well optimised :)

  Are you sure? yes | no

Jacob David C Cunningham wrote 08/01/2022 at 21:32 point

You say 5 days. Is the solar cell not able to keep it topped off? Which cell is it btw, looks like a nice one/small.

  Are you sure? yes | no

Ovidiu wrote 08/02/2022 at 06:40 point

Yeah, if there's no sun like during the winter it will only last a few days. The sensors use 100ma during heating so that's why.

During sunny days, the 1W solar panel keeps it fully charged indefinitely

  Are you sure? yes | no

Jacob David C Cunningham wrote 08/02/2022 at 13:51 point

Oh that makes sense, no sun no power ha.

That's cool though, I was playing around with panels and yeah I have yet to make an actual setup like this that charges itself/actually works.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates