The home Weather Station is a DIY weather Station that collects the following data and uploads the data to firebase:-
- Air Quality Index
- Compressed Natural Gas (CNG)
- Liquid Petroleum Gas (LPG)
- Smoke
- Rain
- Temperature
- Humidity
- Heat Index
- Collects AQI, CNG, LPG, smoke, temperature, humidty, rain presence and heat index. The values from gas sensors are converted to PPM. Thank you for Bharath Kinnera for this Gas sensor PPM conversion video.
- Stores the data in a log file and Firebase.
- Dispays the data in a LCD display.
- A telegram bot for fetching values.
- arduino_nano_code: Contains the embedded C code for flashing to the arduino nano board.
- arduino_uno_code: Contains the embedded C code for flashing to the arduino uno board.
- docs: Contains images of the product.
- heroku_code/telegram-bot: Telegram bot python code for Heroku server.
- telebot
- init.py: Library initialisation.
- app.py: Main program for telegram bot.
- Procfile: Procfile is for Heruku.
- requirements.txt: Library names required for running telegram bot program.
- telebot
- pi_code: Contains the code to be run on the Raspberry Pi Zero W.
- dataRetriver.py: Python program that gets values from sensor and stores the data in log file and firebase.
- lcdDisplay.py: Python program to display data on LCD screen.
- requirements.txt: Required libraries for the python programs in this folder.
- RPi_I2C_driver.py: LCD display driver.
- sampleENV: A sample env that lists all the env variables used by the programs.
- Arduino Nano - Tomson Electronics
- Arduino UNO and programming cable - Tomson Electronics
- MQ-2 gas sensor - Tomson Electronics
- MQ-4 - Amazon
- MQ-5 - Tomson Electronics
- MQ-135 - Tomson Electronics
- Rain sensor - Tomson Electronics
- DHT22 - Tomson Electronics
- Raspberry Pi Zero W - Tomson Electronics
- LCD module - Tomson Electronics
- LCD I2C module - Tomson Electronics
- SD card class 10 16 GB - Amazon
- 220V to 12V DC Adapter - Amazon
- Buck converter - Tomson Electronics
- Male headers - Tomson Electronics
- Female headers - Tomson Electronics
- Dotted PCB - Robo Elements
- Ribbon cable - Amazon
- USB extension cable - Amazon
- Powered USB hub - Amazon
- Pole, Umbrella, wires, tapes and zip ties
Discount code for Tomson Electronics : ZENOOFF2020
-
Connect the sensors as per circuit diagram.
-
Flash the nano and uno code respectively.
-
Clone the project in Raspberry Pi Zero W.
-
Rename sampleENV as .env.
-
Create Realtime database in firebase.
-
add the necessary edits to .env file
-
Run the python programs inside pi_code folder.
-
create a python inside heroku_code/telegram-bot with name credentials.py with following contents:-
bot_token = "Bot Token" bot_user_name = "Bot Username" URL = "Heroku app URL" firebase_token = "Firebase token" firebase_authDomain = "Firebase authDomain" firebase_databaseURL = "Firebase database URL" firebase_storageBucket = "Firebase Storage Bucket"
Sensor Name | Features |
---|---|
MQ-2 | Smoke |
MQ-4 | CNG |
MQ-5 | LPG |
MQ-135 | AQI |
Rain sensor | Rain |
DHT22 | Temperature, Humidity and Heat Index |
- Sashwat K (@sashuu6) sashwat0001@gmail.com