Weather forecasting umbrella with geolocation.
This project uses the on-board wi-fi capability of the little Spark Core device and ws2812 RGB LED to make an "IoT wearable". It's a project that crosses over between my interests of fashion/costuming, unobtrusive computing and electronics/microcontrollers.
The project uses geolocation (so it knows where in the world the umbrella is) and Open Weather Map data (what's the weather at that location).
This is a proof-of-concept piece; The idea being if you see the umbrella indicating inclement weather whilst it's in the umbrella stand by the door, you're more likely to take it out with you!
All the code you need to replicate this project is available on Github:
Please read the README, there's info in there w.r.t applying for your *own* API KEYS and the config file changes you need to make to get the script running on your *own* web host.
* WeerLicht means Weather Lights
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Breadboarded Prototype
Get your prototype working before even thinking about scaling-up to a full rig of lights.
That means successfully accessing the geolocation service and passing those lat/long coords so you may retrieve the weather data etc.
Step 2: Project Enclosure
All microcontroller projects need housing in something, because this is a weather-based IoT project, the umbrella was a natural choice.
Also, communication with the user is visual/light-based, and ws2812 (or "Neopixels") look amazing when housed in clear PVC umbrellas!
This one was purchased from B&M (or Buyology, or whatever they're calling themselves today) for around 2.99 GBP
Step 3: Power Requirements
Calculate the power consumption requirements for the quantity & length(s) of LED strip(s) you're going to be driving.
Purchase a rechargeable power pack with a mAh rating that will drive that comfortably for a few hours between recharging.
Portable power packs like this one are cheap and ubiquitous, this one was a bargain from DiscountUK costing 5.99 GBP. It charges over 5V USB (i.e a laptop port).
Step 4: Lights
These are the ws2812 RGB LED - so each LED on the strip is individually addressable if your animation calls for it!
I imported this 5m reel via aliexpress, took 2 weeks to deliver to the UK and cost around 18.00 GBP.
These are the type that are enclosed in a clear pvc sheathing.
Measure the umbrella spokes to determine the length your LED strip(s) need to be and cut accordingly.
Step 5: Soldering
Observe the directional arrows printed on the strips when soldering your 5V, Data & GND lines.
It's good housekeeping to standardise on your wire colour, plus you're going to need to group all your +ves, -ves, and data lines of all your strips later!
Step 6: End Stops of Cut Light Strips
I tried to use Sugru to create end-bungs for the cut ends of the light strips.
I'm going to be honest here, this didn't work out too well, the Sugru didn't want to stay stuck to the clear pvc sheathing, I ended up replacing this with clear tape.
Step 7: Full Rig - Breadboarded
Before installation, when you have all your strips cut to length and pads wired/soldered, breadboard the whole rig to ensure you're happy with the way the code's running, or to make tweaks to your animation.
Step 8: Weather Display Mode
My animation alternates between weather-mode and rainbow-mode.
The 3-digit weather code retrieved from Open Weather Map is assigned a colour in the web script, this blue (pictured) indicates rain.
The display is a one-pixel-per-second advancing colour drip effect that starts at the tip of the umbrella and moves down to the rim, overwriting the pixel's existing colour, in the picture, the blue is advancing on the rainbow.
The umbrella has 8 strips of LEDs (one-per-spoke), so rainbow-mode assigns one of each RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET, PINK to the spokes, in order around the umbrella.