.
Overview.
This is my initial attempt of the Connected Mangroves project. Errisson co-organize the second Hackathon “Technology for Good Challenge 2.0” together with UTM and UPM. The theme of the Hackathon is “Connected Mangroves Challenge 2.0” for the purpose of monitoring Mangroves and environmental conditions that could affect the ecosystem in the area using the next generation of IoT sensors.
Why must we protect the mangroves habitats? Find out more from this article. There are a lot of other similar articles on the internet.
I decided to post and send those sensors' data to IOTA network.
.
Sabak Bernam Site Visit.
Here are some photos during the site visit to the mangroves habitat. This is the location where sensors and equipments will be installed. Sensors data will be sent via NB (Narrow Band) network.
At the current phase for this project, sensors data will be sent via WiFi.
.
Setup Raspberry Pi.
Follow the instruction here to setup the Raspberry Pi and then install node.js. Get additional setup help from this link.
To install node.js, follow this link's Install Node.js on Raspberry Pi.
.
Setup Sensors with Raspberry Pi.
Wire up the DHT11 to the Raspberry Pi (refer to the picture below). For further detail about wiring layout, refer to the following picture.
.
IOTA Data Marketplace.
I am exploring the IOTA Data Marketplace. I follow a series of tutorials published at IOTA blog:
.
Here are some screen captures after the last step:
.
.
.
After completing the last step (Checkout and Deploy), I create a mangroves-pi-station device with details as shown below:
Download the publish script, make some change to the scripts and run some test as follows:
and you can see the data shown on the dashboard:
.
Connecting DHT11 to IOTA Data Marketplace.
Follow this guide to install node-dht-sensor module.
.
This code read temperature and humidity sensor data and send them to IOTA marketplace:
read: async function() {
for (var a in this.sensors) {
var b = sensorLib.read(this.sensors[a].type, this.sensors[a].pin);
var t = b.temperature.toFixed(2);
var h = b.humidity.toFixed(2);
console.log(this.sensors[a].name + ": " + t + "°C, " + h + "%");
var payload = { "temp": t, "hum": h };
if (debug) {
console.log(payload);
} else {
// Publish sensor data to marketplace
await publish(payload); // your sensor data goes here. Payload is any content in JSON format
}
}
setTimeout(function() {
sensor.read();
}, 15000);
}
More pictures here:
.
.
.
Future Phases.
This is only the starting phase. Future phases will add more features like:
- Add more sensors such as water level, moisture, soil and other useful sensors
- Add camera to collect images and do image processing
- Compute various quality indexes based on this published article
- Add data analytics
.
Summary.
This is a simple project which sole purpose is data collection. Future phases will involve more types of sensors and provide data ananlytics based on the data collected. Various quality indexes will be computed to enhance the monitoring capability of the system and formulate what constitude a better conditions to protect the mangroves habitats.
Comments