Beginning with the idea of light, this project stemmed from a combination of ideas involving a natural scene and live, adapting data. Beginning this project, my partner and I decided to create a scene from a mountain in Iceland where the northern lights are very prominent.
Thinking from a computer science perspective, this project would require pulling data from specific geographic coordinates about the visibility of the northern lights. This is essential in creating a scene that has lights that adapt to the current state of the northern lights over this mountain.
Thinking through how this project would include movement was difficult. Other than the brightness of the lights adapting to the live visibility, I wanted the lights to slowly move back and forth like the lights themselves do in real life.
Selecting Lights / BrainstormingLight selection
My first challenge in brainstorming the mechanics of this project was figuring out how to get lights to bend and move like the northern lights. For this I initially decided to purchase flexible Adafruit Neopixel LED strips. After ordering these lights, despite doing research, I realized that they did not bend in the direction that I had thought they would. This was a relatively easy solve however, as I decided to angle the lights at a 45 degree angle on the ceiling and rotate them so that the bright side was facing directly toward the front, instead of facing down so they could illuminate the scene.
Light movement
My next struggle with getting moving lights was figuring out a way to actually shift the lights from side to side. After considering using a linear rail and gear system, I decided that using a pulley system would work better.
The pulley systemTo get the light to shift back and forth required a system to convert the rotational motion of the stepper motor to linear motion. To do this I 3d printed two spools and attached one to the servo. Between them was a string, attached through the ceiling of the project to the middle light bar.
Finding an API to pull data for this project from was extremely straightforward, the NOAA has a database that stores the values of the visibility of the northern lights at each set of latitude and longitude coordinates. The data given from this API was formatted as follows: [longitude, latitude, Probability of Visibility (out of 100%)].
https://services.swpc.noaa.gov/json/ovation_aurora_latest.json
The dataTo extract the specific location of the mountain, Kirkjufell, I identified the latitude and longitude coordinates: 64.9417° N, 23.3069° W. Using these numbers, you can find the closest points to this specific location. Given that the database only provided statistics for whole-number coordinates, I took the average of the four points surrounding the location of the mountain (converting 23 to -23, indicating west when using a North, East format. I then added 360 to convert this number into WGS84 format).
- Point 1: 337, 64
- Point 2: 337, 65
- Point 3: 336, 64
- Point 4: 336, 65
Filtering the massive amount of data being retrieved from this API was done via query parameters using the particle integration webhook service. To find the exact lines to retrieve, the row number was manually calculated by multiplying the number of entrees per longitude coordinate by the longitude coordinate of the first point, then adding the number of latitude values away from -90, for example point 1 would be 90+64 in addition to 181*337 (zero is included in the data set, hence the value used is 181 and not 180). The specific lines pulled from the data set are indicated under the query parameters below:
{
"selected": [
"{{coordinates.60970}}",
"{{coordinates.61151}}",
"{{coordinates.60971}}",
"{{coordinates.61152}}"
]
}This filters through the "coordinates" array from the API and retrieves the corresponding arrays from the lines indicated, storing them under "selected". The output when testing this event looks like this:
This program changes the speed of the lights swaying back and forth based on how visible the northern lights are over Kirkjufell, in addition the brightness of the wave pattern of the LEDs is increased the more visible the lights are above the mountain.












_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments