Protected areas as national parks, wilderness areas, community conserved areas, nature reserves and so on, are a mainstay of biodiversity conservation. Protected areas are at the core of efforts towards conserving nature and the services it provides us: food, clean water supply, medicines and protection from the impacts of natural disasters. Their role in helping mitigate and adapt to climate change is also increasingly recognized. In the video below I show you an example of a protected area in my community where I live, and where it's very common to find migratory birds such as herons and ducks of different species.
The main goals of this project are the following:
- Connecting RSL10-SENSE to the IBM Cloud (section 2).
- Interface to get the altitude (section 3).
- BSEC Environmental Cluster with BME680 Sensor (section 4).
- RSL10-SENSE-DB-GEVK SENSOR + DJI TELLO RYZE DRONE (section 5)
Please follow the links below to find all the technical information of the device: RSL10-SENSE-DB-GEVK.
(Timing: 4 hrs.)
Once you have installed the program "ON Semiconductor IDE" on your PC, and on your Smartphone the application "RSL10 Sense and Control", then we go to the next step.
Connecting this BLE device to the IBM cloud is very easy. To start you have to download the following instruction guide: https://www.onsemi.com/pub/Collateral/AND9839-D.PDF
The official IBM Cloud site is: https://cloud.ibm.com/login
In this exercise you can use any of the following two examples to be uploaded to your RSL10 SENSOR with the "ON Semiconductor IDE":
- sense_ics_firmware
- sense_ics_firmware_sleep
We have to follow all the steps in the guide to get the results that we can see in the video below:
3. INTERFACE TO GET THE ALTITUDE(Timing: 4 hrs.)
In this exercise we will create an interface with our RSL10-SENSE device to view and calculate the following data: maximum temperature, maximum humidity and altitude. In this case, the example that I will use as a model will be the following: "sense_production_tests". You can download all the codes in the download section. The maximum temperature and humidity are calculated using the following code.
if (bme680_status == 0)
{
printf("BME680 temperature: " COLORIZE("%.2f", YELLOW) " °C\r\n", ((float)bme680_output.temperature) / 100.0f);
printf("Maximum temperature: " COLORIZE("%.2f", YELLOW) " °C\r\n", tmax / 100.0f);
printf("BME680 humidity: " COLORIZE("%.2f", YELLOW) " %%\r\n", ((float)bme680_output.humidity) / 1000.0f);
printf("Maximum humidity: " COLORIZE("%.2f", YELLOW) " %%\r\n", hmax / 1000.0f);
printf("BME680 pressure: " COLORIZE("%.2f", YELLOW) " Pa\r\n", ((float)bme680_output.pressure));
bar = bme680_output.pressure * 1e-5;
altitude = -8005 * log(bar);
printf("Altitude: " COLORIZE("%.2f", YELLOW) " mts\r\n\n", altitude);
}
if (bme680_output.temperature > tmax) {
tmax = bme680_output.temperature;
//printf("t max: " COLORIZE("%.2f", YELLOW) " °C\r\n", tmax / 100.0f);
}
if (bme680_output.humidity > hmax) {
hmax = bme680_output.humidity;
//printf("h max: " COLORIZE("%.2f", YELLOW) " %%\r\n", hmax / 1000.0f);
}
Initially at the maximum temperature and maximum humidity we assign the following values:
float tmax = 0;
float hmax = 0;
In this way we ensure that in the first comparison, the highest value is the first one that measures our sensor.
In the previous code we can also see the approximate calculation of the altitude from the barometric pressure. You can find the biographical reference in the following blog written in Spanish: https://foro.tiempo.com/calculo-de-la-variacion-de-presion-con-la-altura-t132936.0.html
The formula used is:
- h= -(H)* In (bar) where:
- H = (Neperian logarithms) = 8005
- h = altitude above sea level, measured in m.
- So: h=-8005*ln(bar)
- And, 1 Pa = 1e-5 bar
Below I show you the video with my demonstration:
4. BSEC ENVIRONMENTAL CLUSTER WITH BME680 SENSOR(Timing: 4 hrs.)
In a very similar way to the previous section, I show you with the following example the calculation of the altitude: sense_bme680_bsec
Unlike the previous exercise, just calculate the altitude here. On the other hand I was also interested in seeing the equivalent CO2 calculations and the equivalent breath VOC. Below you can see the code that I modified and the video of the test performed.
#endif /* APP_USE_ANSI_COLORS */
printf(" raw_pressure = %f Pa\r\n", output->raw_pressure);
float bar = (output->raw_pressure) * 1e-5; // ALTITUDE
float altitude = -8005 * log(bar); // ALTITUDE
printf(" altitude = %f mts\r\n", altitude); // ALTITUDE
printf(" co2_equivalent = %.2f ppm (%d)\r\n", output->co2_equivalent,
output->co2_accuracy);
printf(" breath_voc_equivalent = %.2f ppm (%d)\r\n",
output->breath_voc_equivalent,
output->breath_voc_accuracy);
printf("\r\n\n");
5. RSL10-SENSE-DB-GEVK SENSOR + DJI TELLO RYZE DRONE(Timing: 5 hrs.)
In this exercise I want to demonstrate that if it's possible to mount the BLE RSL10-SENSE device on a Mini Drone and that it operates without signal interference, and also that the stability of the Drone is not affected. To start, we have to print the following two pieces with our 3D printer. At the end of this tutorial you can download the STL files.
With these pieces we will protect the RSL10-SENSE-DB-GEVK device. I have used the DJI TELLO RYZE DRONE (https://www.ryzerobotics.com/es/tello) because it has a good reputation for stability, is economical, doesn't weigh much and is ideal for the purposes of this project: Also this BLE device doesn't weigh much, it's not large, and in tests I achieved a range of up to 10 meters free of obstacles and with the Android Application. In other words, a medium or large Drone wouldn't be useful since they handle distances greater than one hundred meters and the communication will be broken easily. The example code used was: sense_ics_firmware, because this proved to be more stable and the communication didn't break.
We need two Smartphones: one to control the "Drone" and another to monitor the application of the RSL10-SENSE-DB-GEVK device.. In the video below I show you the assembly, and the tests that I done with my prototype:
This RSL10-SENSE-DB-GEVK device, I found it quite entertaining for our purposes of monitoring a protected area of my community. IBM cloud connectivity tools are very easy and simple. Also we were able to modify the codes of two examples to achieve the interface of our needs to want to monitor the temperature, humidity, barometric pressure, and the CO2 and Breath VOC equivalents. Even we made modifications to the codes to measure the altitude, and maximum temperature and humidity values. We demonstrate that it's possible to mount the RSL10-SENSE-DB-GEVK on a mini Drone... there was no communication interference, and the stability of the Drone was not affected either; now, we can monitor weather values on our drone and without problems ... Finally, I thank "ON Semiconductor" for having given me this device and the free software to do my tests.
Comments