Feather Weather Lamp
2018-09-07 | By Adafruit Industries
License: See Original Project Adafruit Feather
Courtesy of Adafruit
Guide by Ruiz Brothers
Weather Reactive Pixels
This project uses an Adafruit Feather HUZZAH with ESP8266 Wi-Fi and NeoPixels to make an IoT weather device.
The Arduino sketch pulls weather forecast data from the Yahoo Weather API and displays animations on NeoPixel LEDs.
Prerequisite Guides
Walk through the following guides to get familiar with the hardware used in this project.
Parts
Tools & Supplies
- 26AWG Silicone Coated Stranded Core Wire
- Wire Cutters / Strippers
- Soldering Iron & Solder
- Panavise Jr. / Helping Third Hands
- Mounting Tack
- 2x 4-40 3/8 machine screws
- microUSB Data Cable
- 3D Printer / Filament
Circuit Diagram
Reference Connections
Use the circuit diagram to reference for connecting the components together. The diagram does not depict exact wire lengths or size of components.
This circuit expects 5V power to the Adafruit Feather HUZZAH ESP8266 via microUSB
Wired Connections
- Pin 14 from HUZZAH to Data Input on NeoPixel
- GND from HUZZAH to GND on NeoPixel
- 3V from HUZZAH to PWR +5V on NeoPixel
- EN from HUZZAH to Slide Switch
- GND from NeoPixel to Slide Switch
Power On/Off
The slide switch opens/closes a connection to the EN (enable) pin on the Adafruit Feather HUZZAH ESP8266.
The EN pin is connected to the 3.3V regulator. It's pulled up, so when it's connect to ground, the 3.3V regulator is disabled.
Software
Adafruit HUZZAH 8266 Arduino Libraries
Be sure to follow the guide below to install the board and libraries. When you've successfully install the ESP8266 Arduino libraries, come back here and continue the tutorial.
Follow Adafruit HUZZAH EPS8266 Arduino Guide
Arduino Sketch
The Arduino sketch will connect your Wi-Fi network and query the current weather conditions using the Yahoo Weather API. The Feather HUZZAH ESP8266 will then animate some NeoPixels to display the weather condition. In the sketch, you'll need to add your Wi-Fi credentials, change the number of pixels you're using and your desired city.
Download the sketch from the GitHub repo linked below.
Enter Wi-Fi Creds & City
In the weatherPixels.ino file, you'll need to input your Wi-Fi credentials and your city. Reference the screenshot above and highlighted text to see which lines to modify.
Note that for the city, you'll need to keep the % 2C and % 20 text between the city and state/region. % 2C encodes into a "," and the % 20 encodes into a space, when we do the API query
Number of Pixels
In the animation.cpp, you can enter the number of pixels you'd like to use - in our project we need 24.
3D Printing
Materials
We suggest using PLA material but your free to use ABS, PET or exotic composites like wood, metals and others. The parts are listed in the tablet below.
Slice Settings
Depending on your 3D printer's hardware, you'll need to use your preferred slice settings. The parts are oriented to print "as-is" and doesn't require any support materials (very minimal overhangs).
These are the slice settings we used on our Printrbot Play, sliced using Simplify3D
- 220C Extruder (on a non-heated bed)
- 20% Infill
- 2 shells/parameters
- 4 top and bottom layers
- Extrusion multiplier
- 0.48 Extrusion width
Customize Design
The enclosure parts are available to modify and download. Click below to download the source. Size it to fit the bed of your 3D printer.
Download STLs
3D print the files "as-is" if they can fit on the bed of your 3D printer (case is 80mm x 80mm x 20mm)
But I Don't Have a 3D Printer!
That's totally OK, you can still buy the parts and have them shipped to you! You can use a service like 3D Hubs to 3D print all of the parts for you. Just download all of the STL files from our Thingiverse page and upload them to their website.
Using 3D Hubs App on Thingiverse
The easiest way to do this is to use the "Print" button on the Thingiverse page. Then, click on the Launch App button to automatically load the STL files into 3D Hubs. From there, you can select colors, materials and enter your shipping address. A total price will let you know how much the parts will cost. A list of local hubs will appear and you can select which ever looks good to you. Hubs have different prices, ratings, reviews, and sample photos so you can narrow down your choice.
Assembly
Prep Wires
Let's start by making a set of wires for connecting our components.
We'll need 5 pieces of wire about 8cm in length. I suggest using 26AWG silicone coated stranded wires.
Remove about 3mm of insulation of from the tips of each wire. Apply solder to the tips to tin them - this prevents wires from fraying.
Tap Mounting Holes
We'll need to create threads in the two mounting holes of the Adafruit Feather HUZZAH board. You can use a 4-40 tap drill or a 4-40 machine screw.
Prep Slide Switch
Trim leads short to about half their size. Remove one of the three leads from the slide - either the far left or right. Apply solder to the two remaining leads to tin them.
Wire Slide Switch
Connect one wire to each lead by heating up the tip of the lead and placing the tip of the wire.
Slide Switch
You can optionally apply some pieces of heat shrink tubing to insulate the exposed areas. The slide switch is now ready!
Wire NeoPixel Ring
Apply solder to data in, ground, and pwr +5V pins on the NeoPixel ring. Then, connect three wires to these pins on the NeoPixel ring.
Wire Slide Switch to NeoPixel Ring
Connect one of the wire from slide switch to GND pin on NeoPixel.
Wire NeoPixel to Adafruit Feather
Connect the three wires from NeoPixel to Adafruit Feather HUZZAH.
- Data in from NeoPixel to Pin #14 Adafruit Feather Huzzah
- Ground from NeoPixel to gnd on Adafruit Feather Huzzah
- 5V PWR from NeoPixel to USB on Adafruit Feather Huzzah
- Wire from Slide switch to EN on Adafruit Feather Huzzah
Test Circuit
The Arduino code should already be uploaded to the Adafruit Feather Huzzah. Connect a microUSB cable to your computer (or a 5V power supply) and to the HUZZAH board. NeoPixels should power on!
Install Slide Switch
Insert Slide Switch into case. Push it through the hole.
Install HUZZAH
Lay the board over the standoffs and align up with screw threads with the mounting holes. Fasten screws until board is secured in place.
Install NeoPixel Ring
Add pieces of mounting tack to case, press NeoPixel ring into case. Secure in place. Be cautious not to kink any wires!
Install Cover
Install the cover by twisting it onto the case like a bottle cap. It has threads, like a twisty top!
Final Build
Yahoo! Congrats on building your very own Feather Weather IoT Lamp. Now you can see what the weather is like... In lovely NeoPixel RGB color!
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum