Attaching the sensors needed to make the Bel Prince of Fresh-Air was fairly easy. The project consisted of two Air sensors connected to the Intel Edison as well as one sensor connected to an ESP8266. The necessity of using the ESP8266 was due to the fact that the needed GPS library for the Ublox centric GPS device utilized the TinyGPS++ library which didn’t work with Edison. Like many library’s the lower levels of abstractions need to work with the appropriate pin-out of the Arduino and in many instances the pins don’t exactly translate to those designated in the Edison. The ESSP8266 was able to work with this library despite being originally intended for the Arduino.
The first Air Sensor we employed was the MQ135. This is a general Air quality sensor is for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke and CO2. Ideal for use in office or factory, simple drive and monitoring circuit. We could have used a Sensor set to break down different gasses but for the proof of concept for this project, the ubiquitous general noxious gas sensor was sufficient. We also employed the MQ135.h
library found at:
https://github.com/GeorgK/MQ135/blob/master/MQ135.h
This library is handy for the mathematical conversions, and being a pure math function library it is usable with any development board as it doesn’t have functions tied to any board specific pin. The hookup to Edison was trivial with just three connections in any of Edisons five Analog input pins:
- 5V
- Ground
- Analog in on any of Edisons five Analog input pins
The other Air sensor we used was the Sharp’s GP2Y1010AU0F, it is an optical air quality sensor, designed to sense dust particles. The Dust sensor is especially effective in detecting very fine particles like cigarette smoke, and is commonly used in air purifier systems. It works with an interfered beam detecting dust particles going through the hole over a designated period of time. Although it has six wired to connect it is fairly trivial as two of the wires go to 5V power, two go to ground and the remain two are connected to Edison’s Analog and Digital input.
Edison Hookup for Sharp Dust Sensor- Sensor Pin
- Arduino Pin
- Vled
- 5V (150ohm resistor)
- LED-GND
- GND
- LED
- Digital pin 2
- S-GND
- GND
- Vo
- Analog pin 0
- Vcc
- 5V
The Arduino Code for the Intel Edison is included below to interface the two air quality sensors. It should be noted we haven’t integrated the MQTT protocol with AWS for this section as we found it to be better integrated with JavaScript and Node.js which was more suitable for IoT applications.
Comments