This year the theme for our living Sculpture projects was 'cultivating light', in an effort to prevent the sculptures from being so depressing as in previous years. So of course the first thing my partner and I thought of was light pollution.
Here was the first draft of our plan:
- In the background there would be scattered stars (LED lights).
- In front of those would be buildings with addressable LED light strips attached. These would get brighter as the stars dimmed, to show how artificial light drowns out natural light.
- In the foreground would be a bus. Every five minutes the wheels would spin (solely to fulfill the project requirement to include a stepper motor) and the doors would open (with servos), revealing another light strip which would be proportionally brighter if light pollution was getting worse at any given time, and green if light pollution was decreasing.
- The light strips, to represent the annoyance of pollution, would all be blindingly bright.
GettingData
There are some great APIs for light pollution available from NASA, but they're formatted in strange NASA ways which require some code to get to that my Photon can't do. Luckily, there's some great tutorials on how to do this with Google Notebook and Google Earth Engine... Both of which are blocked for some reason by Chicago Public Schools.
So I found the next best thing: The Energy Information Administration publishes hourly data on how much energy each power grid in America uses. I figure this should be somewhat proportional to light pollution, but even when it isn't, energy use is close enough thematically that it makes sense to represent it with bright city lights.
Here's the URL I used...
https://api.eia.gov/v2/electricity/rto/region-sub-ba-data/data/?api_key={{{insert my API key here}}}&frequency=hourly&data[0]=value&start={{{mininum date determined in source code}}}&facets[subba][]=CE&sort[0][column]=period&sort[0][direction]=desc&offset=0&length=5000I decided to use the trend instead of the raw data simply because there isn't really a typical range for this data. I mean there is, but it depends on the season, and it's increasing year by year as Chicago grows. I used linear regression to find the trend.
PinsIt turns out that Photons get very mad when you try to attach two servos, a light strip, several LEDs and a stepper motor at the same time. It's something to do with the Photon using the same timer for certain pins, and the light strips are just picky about what pin you use generally, and then you have to factor in PWM... But eventually I found a winning combination through staring at the pin out diagram for a long time and through trial and error.
SolderingPurgatory
According to our timeline which we were given at the start of the project, soldering all of our components should've taken about two days. That timeline was unrealistic anyway, but to make a long story short it took me weeks.
It took about two days to attach the Photon, the LEDs, the motors, and the three wires to attach to the LED strips. Maybe a little longer, I don't remember, the fumes from all the soldering have given me early-onset Alzheimer's. Anyway...
After that I began work on the LED strips themselves. Each strip has three contacts: power, signal, and ground, at either end. I was going to connect the strips end to end with solid core wire. This ended up being harder than it sounded, mostly because my solders kept breaking, and because solid core wire is very stiff.
At first I was working with about five buildings, plus the strip that went in the bus doors. That's thirty solders. If only I remembered my times tables...
After a long time I realized that there was no way I was going to have that many buildings in time for the due date, so I decided to keep the buildings to a minimum. What was that minimum? I ended up getting two of the buildings to work in time, but then I remembered 9-11, and decided I didn't want to send the wrong message, so one working building is the new minimum. And after putting everything together, I realized the bus would have blocked the view of the other buildings anyway.
TheOtherThings
I spent so long soldering those LED strips I nearly forgot about all the other things. So one weekend I took all those other things on a grand, 6 mile journey over public transportation to my house.
I attached each servo to the doorframe, and I attached a door to each servo horn with copious amounts of tape, hot glue, and yak snot. This worked alright, thought they were rubbing against the side of the servos, so I mutilated my servos to make them fit using scissors, garden loppers, and sandpaper.
The stepper motor wasn't working! But then I realized I put the wires in the wrong order. After fixing that, it worked fine. I attached it to the bottom of the bus, near where the front wheel would go, then attached the wheel.
After weeks in soldering Purgatory, I was very much surprised that both of those things went so smoothly.
InstallationI decided to stick all the electronics into the bus itself. This worked out nicely, but literally by carrying the project from the computer science room to the Sculpture room about 5 solders broke. Then my partner and I tried to stuff the project into the 16"*16"*16" shelf that it would be displayed on, but the box was just too big. Unsurprisingly, when we were done forcing the square peg into the round hole nothing was working.
That was the Friday presentations started, but by the grace of God we were not chosen to present that day. So I dragged the whole thing, now in a terribly inconvenient cube shape, to the el.
Thus commenced a weekend of frantic attempts to repair solders, breaking solders in the process, and re-repairing. In the end, lacking some tools, I had to do some terrible things... But it (mostly) worked!
ConclusionIn the end, I had to scale back a lot of my goals. It became very clear that I was using too many components, and too many of each component. So I went from 6 light strips to 2, from a handful of LEDs to 2, and although I didn't uninstall the stepper motor, I realized I couldn't fix it without breaking everything else in the process.
But the preceding paragraph has the wrong tone, really, because I was pretty happy with the result. The light strips did indeed get brighter as the stars dimmed, and when the stars were extinguished the doors opened (by some miracle) and the data displayed. Pretty cool. Watch my timelapse. The end.
THEEND







_7ifyaYizHn.png)






Comments