This sensor connects to your home or office internet, and automatically uploads a measurement every ten minutes. You will need to plug it into a power socket. The node is based on Arduino and costs ca. 50 EUR.
The hackAIR home v2 is even cheaper and easier to build – check out the tutorial.
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.
- Air quality sensor: Nova PM SDS011 (20 EUR)
- Microcontroller: Arduino Uno R3 (12 EUR)
- WiFi shield: hackAIR WiFi Shield (EUR 23)
- Power supply: 9V adapter (EUR 2)
- Small screwdriver (Phillips)
- Computer to programme sensor (Win/Mac/Linux)
- Mobile phone with wifi connection
- USB printer cable (A-B cable)
ASSEMBLE the sensor
- Stack the WiFi or Ethernet shield on top of your Arduino and connect your sensor.
- The sensor comes with an USB to serial adapter. Cut the wire close to the serial side, and connect the wires to the Arduino as follows:
|Sensor||What does it do?||Arduino pin||Shield pin|
|RX||Receive data||7||STX (in pair)|
|TX||Transmit data||9||SRX (in pair)|
Install the software
- Arduino IDE 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 IDE, navigate to Sketch > Include Library > Add .ZIP library and select the hackAIR library just downloaded.
- Open the WiFiSensor sketch using File > Examples > hackAIR > WiFiSensor
- Make sure the correct sensor is specified in line 15: hackAIR sensor(SENSOR_SDS011);
- Add your access key in line 31: wifi_setToken(“PUT YOUR AUTHENTICATION TOKEN HERE”);
- Upload the programme to your sensor node using Sketch > Upload.
- Disconnect the sensor from your computer and connect it to the power adapter.
- Open the WiFi settings on your mobile phone, and scan for available wireless networks if they do not show up automatically
- Connect to the Gadget-XXXXXX Access Point where XXXXXX is the unique ID of your WiFi shield. The password is ‘null’.
- Use a browser and navigate to http://192.168.4.1
- Provide access to the wireless network: the network name (SSID) and password.
Measuring air quality
Once your sensor is up and running, you can read its measurements on the hackAIR platform:
- Browse to https://platform.hackair.eu and login with your account
- Visit your profile and select the area and location of your sensor
- By selecting each sensor you will be able to see your measurements