Oil Pollution Sculpture (Lane Tech PCL)
by taburgeson in Circuits > Art
64 Views, 0 Favorites, 0 Comments
Oil Pollution Sculpture (Lane Tech PCL)
This sculpture is part of a class assignment, with 30-ish other sculptures made that represent the theme of poison. Me and my partner interpreted the theme mostly literally, and created an arrangement to show the harmful effects of oil pollution on the world's oceans.
Downloads
Supplies
- Particle Argon or other compatible microcontroller
- Breadboard and jumper wires + more 22 awg wire
- SG-90 Servo Motor x2
- 50 or more WS281B addressable LEDs (neopixels)
- 5v 2A power adapter
Fetching Data
This is my API link that I use to request data. However, this link will not work because of the date placeholders in the link that are not activated. It only works when passed through the program I wrote for it. However, if you want to see what the link looks like with example dates, here is an example which should return 2 items:
My API is the SkyTruth Cerulean API, which uses satellite data to detect oil slicks in the ocean. I also added some filters in the URL to further specify the data I want.
datetime={{{minDate}}}/{{{maxDate}}}
This part gets date information published by the Particle Argon microcontroller when the API is called. The setting I specified in my code gets the spill info from 10 days ago to 3 days ago, because it takes around 3 days for the API to determine the connections spills have to other infrascructure.
machine_confidence GTE 0.8
This only returns results that have a machine confidence rate of 80 percent or higher.
area GT 20000000
This limits the results to spills larger than 20 square kilometers
cls != 1
This excludes "Class 1" results, which are potential detections in areas that aren't ocean
(NOT source_type_1_ids IS NULL OR NOT source_type_2_ids IS NULL)
This excludes results that the API has not tied to specific pieces of infrastructure, like tankers or oil rigs
Electronics/Wiring
This was the most time-consuming step in the process for me.
First, I cut 10 strips of 5 Neopixels each for the starfish. I soldered the strips together with each wire in parallel, so it operated from the Argon as it was only one strip.
I also used 2 servos, and operated them off of one Argon digital pin.
The circuit, including the Argon, is powered from the 5v 2a power adapter and the barrel jack on the breadboard.
IMPORTANT - DO NOT CONNECT TO THE ARGON OVER USB WHILE POWERING IT FROM AN EXTERNAL POWER SOURCE
This will damage your Argon or your computer! I know it looks like I did this in some of the pictures, but the breadboard was set up differently in the pictures and the two power sources didn't come into conflict. This is still a really bad idea.
I've attached the Fritzing diagram of my circuit, which has some simplifications and abstractions but is mostly correct. The pictures of the breadboard are not the final versions and are not as accurate.
The Code
I'm not going to go through my code in-depth, but you can find it at this link.
The code runs every 10 minutes, and will check how many oil spills there have been in a 7 day period starting from 10 days ago. The code calls a webhook I set up in the Particle Cloud, using the API link I went over earlier.
There is an initial light sequence, and then it lights up lights on the starfish depending on how many oil spills have been detected.
Then the servos spin the fish to create the illusion of swimming, and the swimming speed changes based on how many oil spills there were.
Done!
After finishing all the components, I installed them into the sculpture made by my partner.