As the political debate over Heathrow Airport’s expansion escalates, many people in the local community surrounding the airport are keen to understand the current and potential future impacts of an expanding Heathrow may have upon their lives.
To help residents better understand the level and impact of air pollution and noise from planes, OpenSensors’ Breathe Heathrow project deployed a number of air quality and noise sensors in residential gardens around Heathrow airport.
To obtain information about air quality, Breathe Heathrow opted for Air Quality Egg sensors (AQE). This board uses SPEC Sensors, 3SP-CO-1000 sensors that consume CO gas and 3SP-NO2-20 model NO2 sensor. Furthermore, AQE provides information about humidity and temperature.
However, the Heathrow area is known to be very noisy. The current version (2) of Air Quality Egg doesn't contain a noise sensor, so it was decided to add it manually. Since the project required the computation of noise level but not just the determination of its presence, the Grove microphone was taken as a noise sensor. The current sensor has a voltage range of 4-12 V. Thus, it gave us an opportunity to detect sound levels of the area simply by adjusting the value of output by potentiometer. Output from the noise sensor can be simply read from the Analog port to which it will be soldered.
Hacking together the AQE and Grove sound sensor
The Air Quality Egg is based on the Wicked Device bespoke Wildfire microprocessor from which the sensors are attached. However, the board has additional unused female pins that were used to solder and connect the noise sensor.
The Grove sensor has a white connector with following pin definitions:
Analog Output
No-Connection
Vcc
GND
For a proper working connection, 5V, GND and A7 (Analog input) pin the WickedDevice board were soldered with white connector’s pins of noise sensors according to following relations:
Updating the firmware
We used Arduino IDE to modify the AQE firmware. For the purposes of the Breathe Heathrow project, the default AQE Arduino sketch was changed to accommodate publishing to a different external topic and processing signals from the Grove Noise sensor.
To change the Topic we are publishing the data to, it was necessary to modify MQTT_TOPIC_PREFIX so as to be published in the Breathe Heathrow organisation.
To enable the processing of information from the Grove noise sensor, the AQE sketch was extended with an additional publishing function where it was reading signal from Analog Pin 7:
boolean publishNoise(){
val = analogRead(A7);
noise_value_to_p = val;
safe_dtostrf(val, -6, 2, converted_value_string, 16);
trim_string(converted_value_string);
snprintf(scratch, 511,
"{"
"\"serial-number\":\"%s\","
"\"converted-value\":%s,"
"\"sensor-part-number\":\"SHT25\""
"}", mqtt_client_id, converted_value_string);
return mqttPublish(MQTT_TOPIC_PREFIX "noise", scratch);
}
After formatting the signals received, our function generates a JSON structure of a message and sending it to the specific topic in BreatheHeathrow through MQTT connection.
The code of the extended AQE sketch can be found here:
https://github.com/CurlyN/AQE_updated-with-noise
As a result, all published messages can be seen on OpenSensors.io topic, Breathe Heathrow:
https://opensensors.io/orgs/breatheheathrow
Comments