Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jensostertag/silvester-ambience-sensor
Arduino sensor that measures light and noise pollution during New Year's Eve
https://github.com/jensostertag/silvester-ambience-sensor
environment lora lorawan sensor silvester ttn
Last synced: about 2 months ago
JSON representation
Arduino sensor that measures light and noise pollution during New Year's Eve
- Host: GitHub
- URL: https://github.com/jensostertag/silvester-ambience-sensor
- Owner: JensOstertag
- License: mit
- Created: 2023-12-14T08:08:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-04T11:33:10.000Z (almost 1 year ago)
- Last Synced: 2024-10-12T21:43:29.806Z (3 months ago)
- Topics: environment, lora, lorawan, sensor, silvester, ttn
- Language: C++
- Homepage:
- Size: 5.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
![Header](img/header.jpg)
# Silvester ambience sensor
### LoRaWAN sensor measuring light and sound levels
Attempt to measure impact of pyrotechnics on light and sound levels during New Year's Eve
[Introduction](#introduction) • [Functionality](#functionality) • [Data](#data) • [Dependencies](#dependencies) • [License](#license)
Title image generated by [deepai.org](https://deepai.org/machine-learning-model/text2img)
## Introduction
During New Year's Eve, the air is polluted by - undoubtedly beautiful - fireworks, and other forms of pyrotechnics, and measurements show that it takes several hours or even days until the air quality reaches the same level as before.
Another problem is the light and sound pollution, which is stressful specially for animals, but also for elderly people, children, or other people with special needs.
This project is an attempt to measure the impact of pyrotechnics on light and sound levels during New Year's Eve, and aims to raise awareness about the problem.## Functionality
The sensor measures light and sound levels periodically, with an interval of roughly 30 seconds. The data is then sent to TTN (The Things Network) via LoRa with the LoRaWAN protocol. From there, it is sent to ThingSpeak, where it is stored and visualized.### Hardware
The sensors main component is an ESP8266 microcontroller, specifically a WeMos D1 mini. It is connected to a SX1276 LoRa module, which is used to send data to TTN.
For the sensors, a BH1750 light sensor, connected via I2C, and a KY-037 microphone module, connected to an analog input of the ESP8266, are used. A better alternative to the KY-037 would be a MAX4466 microphone module, as it comes with an adjustable gain.### Power
The device is powered by the WeMos' Micro-USB port, which is connected to a 5V power supply. It was desired to power it from a battery, for which the ESP8266 has a quite efficient power saving mode. For that, the D0 pin has to be connected to the RST pin. However, D0 was already used to connect the LoRa module, thus the power saving mode could not be used.
Theoretically, the device uses low enough power that it can also be powered by a modern-sized powerbank for up to a few days without the powerbank needing to be recharged.Specific power values are measured, they reach approximately 80mA when the device is starting, 20mA when sending and 10mA when idling.
## Data
The measured data is saved in the [`/data` directory](./data). The CSV files are formatted as follows:
| date | light [lux] | sound [dB] |
| ---- | ----------- | ---------- |Each file contains the data of one night, starting at sunset and ending at sunrise of the following day.
### 2023 / 2024
The data measured during New Year's Eve 2023/2024 is not very reliable or useful.#### Light
The measured light level was always at 0 lux, with the exception of the first and last few data points, where there still was some natural sunlight. The sensor readings didn't change at all due to fireworks.
Possible explanations for this are:
- The sensor was located in a big garden, far away from a street to prevent the data from being affected by other light and sound sources. However, this also means that the sensor was far away from where the fireworks were launched, thus the sensor's direct exposure to the fireworks was limited.
- Foggy weather and air pollution due to pyrotechnics reduced the light levels the sensor was exposed to.
- In the area where the sensor was located, only a few fireworks were launched, thus the light levels were not high enough to be measured by the sensor.
- The sensor measured the light levels only in a very short interval, thus possible peaks in the light levels were not detected.Enhancements for these problems could be:
- Using a light collector to increase the sensor's exposure to light.
- Setting up multiple sensors in different locations to get measurements of a larger area.
- Setting up the sensor in more densely populated areas, where more fireworks are launched.
- Measuring the light levels more often, or even continuously and then using the median or a quantile.#### Sound
The sound measurements are more useful, but not very reliable either. Different from the light measurements, the sound levels show a clear, long lasting peak at midnight of New Year's Eve. However, by looking at other measurements, we can see that there are other, shorter peaks at other times too, which are not caused by fireworks but have a similar sound level.
Problems with the sound measurements are:
- The sensor was not calibrated well enough to get accurate measurements, which is very hard with this kind of microphone.
- The sensor was located in a big garden, far away from a street to prevent the data from being affected by other light and sound sources. However, this also means that the sensor was far away from where the fireworks were launched, thus the measured sound level does not represent the actual sound level of the fireworks.
- The sensor recorded not only the sound of the fireworks, but also of wind, rain, and other sources. Especially the wind caused a lot of noise in the measurements.Enhancements for these problems could be:
- Using a better microphone which can be calibrated more accurately.
- Setting up multiple sensors in different locations to get measurements of a larger area, reducing the factor of only measuring fireworks from far away.
- Using a wind shield to reduce the noise caused by wind.## Dependencies
The following tools and libraries are used:
- **Arduino IDE** - Download: [arduino.cc/en/software](https://www.arduino.cc/en/software), GitHub: [arduino/arduino-ide](https://github.com/arduino/arduino-ide)
- **ESP8266** - GitHub: [esp8266/Arduino](https://github.com/esp8266/Arduino), licensed under [LGPL-2.1 license](https://github.com/esp8266/Arduino/blob/master/LICENSE)
- **arduino-lmic** v0.10.0 - GitHub: [mcci-catena/arduino-lmic](https://github.com/mcci-catena/arduino-lmic), licensed under [MIT license](https://github.com/mcci-catena/arduino-lmic/blob/master/LICENSE)
- **BH1750** v1.3.0 - GitHub: [claws/BH1750](https://github.com/claws/BH1750), licensed under [MIT license](https://github.com/claws/BH1750/blob/master/LICENSE)
- **The Things Network** - Website: [thethingsnetwork.org](https://www.thethingsnetwork.org/), GitHub: [TheThingsNetwork/lorawan-stack](https://github.com/TheThingsNetwork/lorawan-stack)
- **ThingSpeak** - Website: [thingspeak.com](https://thingspeak.com/), GitHub: [iobridge/thingspeak](https://github.com/iobridge/thingspeak)## License
The software of this project (located within the [`/src` directory](./src)) is licensed under the [MIT license](./LICENSE-MIT).
The data that was collected with this project and located within the [`/data` directory](./data) is licensed under the [CC0 1.0 Universal license](./LICENSE-CC0).