This project will show how to build a sensor monitor for lake turbidity monitoring and two other environmental variables such as temperature and humidity. It is usually the case that water quality of public lakes is rarely monitored in a transparent manner for the public to see. Turbidity referes to the clarity of the water or the amount of particles in it.
The problem is that turbidity sensors are relatively expensive and not very power efficient. The idea behind this project is to re purpose cheap ambient light sensor with LED in order to quantify turbidity. This will require calibartion of the unit which can be done via BLE. The gathered data can then be transferred to an on shore hub and analyzed via machine learning algorithms.
The project prototype is envisioned as a sensor puck that is mounted near the lake shore. The BLE capabilities allows the unit to advertise UV, IR and lake turbidity levels . Optionally, the GPS coordinates will serve to uniquely identify the sensor location.Since it would be expensive to change batteries for such sensor nodes a rechargeable battery with a solar panel will be used.
The complete solution would allow anybody to measure water turbidity , UV, temperature and humidity levels. Currently, the mechanical design of the project is not factored in.
HardwareThe project prototype is composed of the following hardware:
- Arduino 101 (BLE enabled)
- Si1133 ambient light and IR sensor
- Si7020 temperature and humdity sensor
- 1.7 inch TFT display
- 915 Mhz radio (not used currently)
- GPS (not used currently)
The TFT display was used only for visualizing the live sensor data. Arduino 101 was used as a BLE beacon that transmits the sensor data to nearby phones. A very sensitive IR/UV and ambient light sensor was used . The idea was to verify that the ambient light sensor in conjunction with an LED can be used to measure how clear is the water located beneath the sensor.
A long range radio was also used but due to time constraints it was not integrated in the final prototype.
How it worksThe Arduino software uses the following libraries:
- Curie BLE library
- TFT display
- Si1133
- Si7020
The Arduino 101 behaves as a BLE central device is created which advertises the sensor data.To monitor all the environmental variables including temperature and humidity, we need to first send a beacon advertisement transmission. To identify which sensor puck the BLE advertisement came from the node is given a unique name derived from the ID of the Arduino 101 memory chip.
The temperature ,humidity , IR and UV values are embedded in the advertisement. Every time the sensor data changes the data is updated and a notification is sent to any nearby smartphone.
One notable issue that was encountered with the humidity sensor. During times of prolonged high humidity levels, as when it rains for 3-4 consecutive rainy days, the polymer sensor film inside the sensor becomes supersaturated and produce high humidity values which can be above 100%. Humidity values appear to recover alone after a day of drier conditions. Alternatively one can use the internal heater of the Si7020 sensor.
To visualize the temperature and humidity values, I used an 1.7 inch TFT display. These displays are based on the ST7735 controller and many flavors exist. The display uses the SPI bus protocol for communication. Notice that this display operates at 3V3. The usual connections from the board to the Arduino use pins 8,9,10,11,12 for the SPI bus and control signals.
The image below shows the BLE temperature and humidity services as they show up on my smartphone. The sensor data is shown on the data field of the sensors. Each of the services has NOTIFY and READ capabilities allowing the sensor puck to notify the smartphone if the values change.
The BLE environmental service was used. This service has specific ID for humidity and temperature. For more info check the BLE specs.
DemoThe image shows the data showing up on my smartphone.
I used the Nordic Semiconductor nRFconnect app to read the temperature humidity data. IR and UV were not added in order not to crowd the services .
Adding a BLE battery service would be the next logical step for a mobile sensor node.
Future work will focus on the rechargeable power supply and adding battery capabilities.
Code and conceptual Fritzing schematic are shown below. Enjoy!
Comments