Mid-ocean oil spills are some of the worst disasters to affect natural habitats and human lives alike. With billions of metric tons of oil being moved over the open seas every year, the room for spill accidents is very high. Even the techniques used today such as the use of booms and skimmers require large manpower for its successful execution, causing errors and delays in the process along with the exposure of the people involved to potential health risks.
It is also seen that remediation of an oil spill isn’t a one-step process but requires continuous monitoring of the area where the accident occured. This requires a more detailed stream of data from the spill site which needs to be processed to implement the required long-term action plans.
As a step towards mitigating these issues, the prototype I have described here includes a system that uses machine learning to automatically detect oil spills and then release a chemical dispersant to counter the spill while collecting data from the enviornment.
OBJECTIVEThe prototype presented here aims to do the following:
· Deploy dispersants to remedy mid-ocean oil spills with reduced human activity.
· Integrate the system with the ability to autonomously detect oil spill via a computer vision-based machine learning model ( Using LOBE platform).
· Use various sensors and a live video stream to record the condition of the environment at the accident site.
· Present all the collected data on a single IoT platform for visualization and analysis.
BASIC FUNCTIONINGThe prototype I have proposed here functions basically through the communication link established between the Raspberry Pi and the IoT platform. The sensors, the camera, and the relay (that acts as the switch for the pump/ dispersion mechanism) are all connected to the central unit which is the Raspberry Pi. The link between the IoT platform and the central microcontroller constantly exists as long as the system is switched on at both sides.
The camera will send a live web stream to the application via which the environment can be monitored in real-time. Based on the images captured by the camera, the system is fitted with an ML model trained to determine the presence of oil on thewater surface and release the dispersants. When the image captured by the camera is categorized as oil by the trained model, the dispersion system will kick into action by the switching on of the relay and hence the pump.
Alternatively, the user also can manually control the dispersion system via the widgets available on the IoT platform as well. If the need is, the dispersants maybe be released by the user by clicking on the “Start Dispersion” button to release the dispersants to the water surface. As the button is activated, the liquid will be pumped by the submerged pump in the tank through the tube and sprinkled over the desired area.
To provide the environmental status in the surrounding of the system, theDS1820 temperature sensor is incorporated into the system. The temperature in the ambient environment will be displayed on the IoT platform and it will be able to provide the logged data over a duration of time as well.
Raspberry Pi fitted with the NoIR v2 camera is used to stream the live video of the environment and via the IoT platform, the user can view the footage in real-time. The user is only required to click on the live stream button available on the platform to view this feed of the accident.
An ultrasonic sensor is placed on the top of the tank in order to measure the volume of dispersants present within the tank as well for a quick read of the value over the IoT platform.
The platform also has an LED light to brighten up dim environments to increase visibility and proper categorization of the camera inputs by the ML model.
Other environmental factors too are linked to the IoT platform to read the environmental conditions using the plugin OpenWeatherMap.
HARDWARECONNECTIONS
The circuit diagram below shows all the connections for the hardware used in this prototype.
Ubidots is a very easy to use platform that helps control and visualize IoT devices.
Using the Ubidots IoT platform, a dashboard is created which allows the user to control and get data from the prototype proposed. The UI consists of a simple design that showcases system controls and readings through easy-to-read widgets and infographics. Broadly, the widgets can be classified as follows:
- Device Status
- Device Control
- Live Stream
- Sensor Readings
How to add Widgets:
Simply create an account on Ubidots and go to dashboards and start adding widgets by clicking on the add new widgets (plus sign) on the right corner. You can then link the data from your device with the widget through the unique tokens provided for each device.
Simply add the token with your code to link it to the dashboard to control different devices over the internet.
Check the links below on how to use Ubidots and get data on the dashboard.
Documentation: http://help.ubidots.com/en/articles/854333-ubidots-basics-devices-variables-dashboards-and-alerts
I have added widgets for the following:
Date and location: Date is automatically configured while location can be set by dragging the pin.
Switch for pump and LED: Link to the pump code using the authentication key to control the pump.
HTML Canvas: I have added a custom HTML code with the URL to view the live view from my Pi camera. Add the following code with your camera's URL.
<a href="URL here" target="_blank" style="font-size:550%;" style="text-align:center;">Show Live
View</a>
Indicator Widget: Link to the ultrasonic sensor attached in the tank that measures water height to give volume. The tank level will be indicated with live drops when the tank content is being used.
Line Chart for Dispersant Usage: Link the widget again with the ultrasonic sensor to get a graph view of how much liquid is being dispersed over time.
Variables table: Different environmental variables can be shown here that can be used to determine if the conditions are safe for the vessel to travel in. I have linked the data from OpenWeather API to get live data.
OpenWeather under plugins. simply go to plugins, click add, search OpenWeather, select, choose a location and add it. Then go back to the dashboard, choose variable chart, and add the required weather data to the table.
Temperature: Add the temperature widget and link to the onboard temperature sensor to get live data.
For training the machine learning model, LOBE is used to train the categories required. For this prototype, the model should detect between oil and clean water. LOBE is a very easy-to-use platform and any machine learning model can be trained in minutes.
Check out this link for a detailed description of how to train any model:
Here, I have collected images of water with oil and without oil for training two models to detect oil and clean water. It's uploaded to the RaspberryPi and linked with the camera such that the camera takes an image and runs it through the model to detect if it's clean water or oil. If oil is detected then the relay kicks in to release the chemical to counter the oil spill.
I have designed and made an acrylic casing to house the components.
I have used a laser cutter machine to cut the design and glued it together with acrylic glue. Keep it overnight to dry before placing all the components.
Fit the camera facing downwards at the square at the bottom and insert the LED at the bottom whole next to the camera. Partition for the bottom is used to separate the camera and the section with the tank containing the dispersant. The tank can basically be a liquid proof container. For prototyping I have used a food container and filled it with water. Place the motor inside and take the tube out of the hole made on the side of the acrylic box so that when the pump is on the liquid can come out and be sprinkled over the oil surface.
Slide the support for the center through the slides in the side panels for support.
Place all the remaining components on the middle level and place top-level as a cover. Place the solar panel on top of the top-level and pass the wires to the battery through the slot on the lower-left corner.
HULL DESIGNThe design here is preliminary and only focuses on the basic functionalities focusing on the machine learning model for oil detection and dispersant dispersion. To elevate the design, a hull can be added. The center acrylic box can be placed on a catamaran-style hull and connected to motors and propellers that can be used in actual water bodies.
The hull design I have created is shown below:
APPLICATIONS
The design focuses on mainly being used in the event of a mid-ocean oil spill. Additionally, it may be used in the treatment of industrial oily wastes in water as well or the treatment of any other water body with reduced human activity.
THE END
Thanks for checking my project out! I have added a video of the working of my model as well in the attachments section. I hope this inspires you guys to come up with cooler ideas and be able to take it to the next level!
Comments