Assembly and Software Setup Guide - WAQD/weather_air_quality_device GitHub Wiki
Assembly
Updated for version 3.X.
Example guide for recommended variant
Parts list
- Raspberry Pi 4
- Micro SD-Card - at least 4 GB
- Raspberry Pi original 7" Touchscreen
- BME280 - Temperature/Humidity/Pressure
- MH-Z19 - CO2
- PIR501 - Motion
- 8x ~10cm jumper cable
- USB-C power adapter (at least 15W)
- SmartiPi Touch 2 chassis
Optional components:
- You can use any Raspberry Pi 2+ or CM-Module 4 with a base plate
- Passive speaker for audio
- Case for sensors
- either 3D-print from own design - See .stl-s in https://github.com/goszpeti/WeatherAirQualityDevice/tree/master/src/assets
- techno-line TX Cover
- Instead of SmartiPi chassis: Raspberry Pi 3 or 4 dedicated case (Warning: these are not tiltable and can look bad!)
Pinout for Raspberry Pi 2+
Wiring tables for all supported sensors
- HC-SR501 PIR motion sensor
- Description: https://lastminuteengineers.com/pir-sensor-arduino-tutorial
- VCC - pin 2 (5V)
- OUT - pin (GPIO 23) - arbitrary
- GND - pin 6
- MH-Z19 CO2 sensor
- 4 Pin side
- VCC - pin 2 (5V)
- GND
- unused
- PWM (not recommended)
- 5 pin side
- Hd - unused
- unused
- UART RX - GPIO 14 (TX)
- UASRT TX - GPIO 15 (RX)
- Vo - unused
- 4 Pin side
- BMP-280 (temperature and pressure) and BME-280 (temperature, pressure and humidity)
- Description: https://lastminuteengineers.com/bme280-arduino-tutorial/
- VCC - pin 1 (3.3V)
- GND
- SCL - GPIO 3 (0x76)
- SDA - GPIO 2
- CSB - I2C or SPI mode selection - unconnected (I2C)
- SDC - Serial data out/ I2C address selection (Alt. address (0x77) when connected to 3.3V) - unconnected
- DHT22 (AM2302) temperature and humidity sensor
- Description: https://lastminuteengineers.com/dht11-dht22-arduino-tutorial/
- VCC - pin 1 (3.3V) or pin 2 (5V)
- DATA on pin 8 - arbitrary
- not connected
- GND
- CCS811 TVOC Sensor
- VCC - pin 1 (3.3V) or pin 2 (5V)
- 3v3 out - unused
- GND
- SDA - GPIO 2 (0x5a or 0x5b)
- SCL - GPIO 3
- Wake - GND
- RST - Reset - unused
- INT - Interrupt, when new reading is available - unused
-
BH1750 light sensor (WIP)
- Currently not fully supported!
- VCC - pin 1 (3.3V)
- GND
- SCL - GPIO 3 (0x23)
- SDA - GPIO 2
- ADDR - Alt. address (0x5c)
-
GP2Y1010AU0F dust density sensor (WIP)
- Currently not fully supported!
- via ADC (TODO)
Software setup
Flash Image to SD-Card
- Download and install Raspberry Pi Imager from https://www.raspberrypi.org/software/ for your PC.
- Start Raspberry Pi Imager and select the default Raspberry Pi OS (64bit)
- Press CTRL + SHIFT + X for advanced panel
- Set "Enable SSH" and change the default password
- If you want to connect via WiFi: Enable "Configure wifi" and enter your Wifi information.
- Select your SD-Card, then click "Write"
Manual setup of Raspberry Pi OS
Needed tools:
- USB keyboard
- (optional, but more convenient) a PC connected to the same network as the device
First Start Wizard
- Connect the USB keyboard
- Select your country and timezone - choose "Use English language", if you don't want the whole OS in your locale
- You can change the default password, if you did not in the Raspberry Imager.
- Continue, until you can connect to your WiFi. Please verify the password, the keyboard uses an english layout! (see config below). If you entered you WiFi information in the Raspberry Imager, this step is skipped.
- You can install the updates, otherwise it will be done later.
Change keyboard layout
- Taskbar Menu -> Preferences -> Raspberry Pi Configuration -> Localisation -> Set Keyboard -> Layout
Rotate touchscreen (if needed for case)
If Raspberry Pi 4 is used, the line dtoverlay=vc4-kms-v3d needs to be commented out, to disable the 3d acceleration, but be able to rotate even on boot.
https://www.instructables.com/id/Rotate-Raspberry-Pi-Display-and-Touchscreen/
Install WAQD
-
Start a terminal (ctrl + alt + t)
-
Enter the following commands:
git clone https://github.com/goszpeti/WeatherAirQualityDevice.git cd ./WeatherAirQualityDevice/script/installer chmod +x ./start_installer.sh ./start_installer.sh
From here everything should work automatically and the Raspberry will restart and load WAQD. This can take up to 5 minutes. You can track the progress by pressing ALT + TAB to get back to the terminal window.
Setup WAQD
There are few settings, which must be setup manually
First login in the webapp
- The webapp is always available in your local LAN from the IP address (works always) or with the hostname set up, when flashing the image (does not always work)
- If you want the site to be available from the internet, you either need:
- a static IP from your ISP + set up port forwarding on your router
- Pay or use a free service for Dynamic DNS (see https://www.noip.com/support/knowledgebase/getting-started-with-no-ip-com/)
- Use a webhook based service like Dataplicity, Resin.io or PiTunnel, which offer free plans and you can access your Pi via your browser
- COMING SOON: Access over waqd.de
- To get you local IP: click on Options -> About on the station and enter the IP address in the browser
- To get your first credentials, click on Options -> and select "Reset Server Password". Enter the credentials in the browsers.
- You can change your name and password in the Webapp under "Settings"