With the help of data that I got from the water level monitor, I was able to justify why my water usage was more than expected and found
a leaking near the toilet flush which was used to discharge the water slowly to the sink and fill the flush tank. Now it has been fixed and thanks to sensors and LoRa.
Even made a calculator in excel to divide bills among other tenants. Saved some water and some money.
My water usage calculator.
Now moving on to my second experiment i.e the Air quality monitor.
Air quality monitor.
Living close to a national highway I always wondered what would be the CO2 level and temperature changes throughout the day,
now that I have relevant sensors and a LoRa module to get the data out with very low sleep current too. So why not build an air quality sensor
and log the data.
Getting started:
Get the required things:
Here I will be repurposing the same PCB I made for the Water level Sensor. Because I will be only using the I2C connections for this. I had this breakout of CCS811 and BME280 sensor from Sparkfun. I will be using that to
get the following data. I would recommend buying both BME280 and CCS811 separately as the CCS811 may have some influence on temperature values measured by the BME280 because of proximity and heating of CCS811.
Something like this module:https://www.sparkfun.com/products/14193
1. eCO2 in ppm
2. TVOC
3. Temperature from BEM280
4. Pressure from BME280
5. Altitude from BME280
6. Relative Humidity from BME280
Connections will be like this:
Arduino MKR 1300 CCS811+BME280 Environmental combo module
SCL SCL
SDA SDA
VCC 3.3V
GND GND
The code for the project will be Airquality_LoRa and it is available in the same repository: https://github.com/vishwasnavada/LoRa_Exp
Working:
CCS811 is a MEMS (Micro-Electro-Mechanical Systems) based sensor that is compact and uses less power compared to the MQ135 gas sensor which uses a heating element and
a bit slow too. This CCS811 has a burn-in temperature of 20 mins which means the sensor values are accurate after the 20 minutes of the initial turn on. If you have a good budget and want more accurate results, I would recommend you to go for the Honeywell air quality sensor with a fan that can even measure PM2.5 optically with better accuracy.
In future, the pollution level might increase so high that one will have to plan the road accordingly before heading out somewhere. Where the air quality sensors play a major role.
The code is self-explanatory and I have added comments wherever necessary. Look out for libraries that need to be installed in case if you want to build one.
The receiver code is simple it shows the data payload received over LoRa in the serial monitor.
Since I want to log these data I just added ArduinoJson library which will help me to unpack the data on the receiver end.
// Converting results to JSON for easy access at the end StaticJsonDocument<200> doc; doc["CO2"] = myCCS811.getCO2(); doc["TVOC"] = myCCS811.getTVOC(); doc["Temp"] = myBME280.readTempC(); doc["Pressure"] = myBME280.readFloatPressure(); doc["Altitude"] = myBME280.readFloatAltitudeMeters(); doc["RH"] = myBME280.readFloatHumidity(); serializeJson(doc, LoRa); LoRa.print(counter); LoRa.endPacket();
With everything put back together I wanted to test whether the solar panel is charging the battery
TP4056 charging module has a red light turned on which means it's charging.
Here's the video just before the deployment:
After the deployment we will be getting t data over LoRa here I will be showing the data received on the COM port connected to one more module.
Here the data is directly being received and displayed on the com port i.e without the json implementation.
Data with json implementation
We will test the results and enclosure conditions in the final blog
#Blog1 Just Encase challenge: Getting started and deciding the architecture..
#Blog 2 Just Encase challenge : Building a LoRa based water level sensor and a demo.
#Blog 3 Just Encase Challenge : Setup of water level sensor and demo.
Blog 4 Getting started with the airquality monitor project.
#Blog 5 Just Encase Challenge : Final blog with the results and enclosure conditions.