hackAIR home sensor v2
This sensor connects to your home or office WiFi, and automatically uploads a measurement every ten minutes. You will need to plug it into a power socket. The node is based on the Wemos microcontroller and costs around euro 30.
What you need
Make sure you have the following materials and tools available. We here provide links to online retailers, including Aliexpress. Alternatively, visit your local electronics supplier.
- Soldering iron + soldering tin (from ca. 20 EUR)
- Poster putty
For general soldering instructions, check out this tutorial: Introduction to soldering.
ASSEMBLE the sensor
Install the software
- Arduino software from https://www.arduino.cc/en/Main/Software
- hackAIR library from https://github.com/hackair-project/hackAIR-Arduino/releases
- Install the Arduino IDE.
- Acquire an access key for your sensor from the hackAIR platform at platform.hackair.eu > Profile > Sensors. The access key is generated after you provide some information about your sensor. If you haven’t done so yet, you need to create a user account on the hackAIR platform first.
- Connect your sensor to your computer using a USB cable.
- In the Arduino preferences window, enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field.
- Open Tools > Board > Board Manager and search for esp8266. Install ESP8266 platform.
- Select Wemos D1 R2 Mini board from Tools > Board.
- In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP library and select the hackAIR library just downloaded.
- Navigate to Sketch > Include Library > Manage Libraries and install the following four additional libraries:
- WiFiManager by tzapu
- DHT sensor library by Adafruit
- Unified sensor library by Adafruit
- ESP8266WiFi by I.Grokhotkov
- Now open the Wemos example by selecting Files > Examples > hackAIR > Wemos-Advanced
- Add your access key in line 27:
- #define AUTHORIZATION “AUTHORIZATION TOKEN”
- Upload the programme to your sensor node using Sketch > Upload.
- After uploading the sketch, the Arduino board will boot up and start broadcasting its own Access Point. To set the WiFi point credentials use your phone/tablet to connect to the Wemos’s AP (named ESP-Wemos) and navigate to http://192.168.4.1. After insertion of connection details the Wemos will connect to your WiFi network.
- Disconnect the sensor from the computer, and power it up using a USB charger.
Measure air quality
Once your sensor is up and running, you can read its measurements on the platform:
- Browse to the https://platform.hackair.eu and login with your account
- Visit your profile and select your sensor area
- By selecting each sensor you will be able to see your measurements.