The best tools to make your project dreams come true

Login or Signup
USD


By Adafruit Industries

Feather Weather Lamp

Courtesy of Adafruit Industries

 

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.

Project uses a Feather HUZZAH and NeoPixels

Prerequisite Guides

Walk through the following guides to get familiar with the hardware used in this project.

Parts

Tools & Supplies

Circuit Diagram

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.

Download Arduino Sketch

input your WiFi credentials and your city

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

keep , and   text between city and state/region

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

3D Printed parts

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)

Download STLs

Download STLs

Download Source

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.

Prep Wires

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.

Tap Mounting Holes

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.

Prep Slide Switch

Wire Slide Switch

Connect one wire to each lead by heating up the tip of the lead and placing the tip of the wire.

Wire Slide Switch

Slide Switch

You can optionally apply some pieces of heat shrink tubing to insulate the exposed areas. The slide switch is now ready!

Slide Switch

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 NeoPixel Ring

Wire Slide Switch to NeoPixel Ring

Connect one of the wire from slide switch to GND pin on NeoPixel.

Wire Slide Switch to NeoPixel Ring

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

Wire NeoPixel to Adafruit Feather

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!

Test Circuit

Install Slide Switch

Insert Slide Switch into case. Push it through the hole.

Install Slide Switch

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 HUZZAH

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 NeoPixel Ring

Install Cover

Install the cover by twisting it onto the case like a bottle cap. It has threads, like a twisty top!

Install Cover

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!

Final Build

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 1528-1530-ND
  • 1528-1099-ND
  • EG1903-ND
  • 1528-2013-ND
  • 1691-1037-ND
  • 1691-1281-ND
  • 1691-1083-ND
  • 201PV-ND
  • 1528-2144-ND
  • TL510-ND
  • 1738-1226-ND