"Quality First ,Credit First"

LED Weather Words Forecast

by:Taian Lamination Film     2020-10-03
This project utilizes the 22x13 matrix of the addressable RGB led to visualize the weather forecast extracted from the Weather Underground API.
Raspberry Pi runs a python program that aims to get weather forecast data from the API on a regular basis, parsing the data into an array of temperature, wind speed, and weather conditions, then light up the specific LED group representing the words in the LED matrix.
The project is installed in its own shell and can be placed on a shelf, on a table, or on a wall as a visual display of the upcoming weather conditions for the next 12 hours.
The inspiration for this project is from the beautiful LED word clock, which drew my imagination when they first appeared on the manufacturer community forum.
After a lot of research, patching, programming, and several failed attempts, I\'m happy to have a distorted version that I can share with the community that inspires me.
If you like the \"weather word\", please check my previous weather visualization \"weather color\" here \".
Hardware * Please note that you will need a USB hub, a micro USB plug to USB plug adapter, and a mini HDMI to standard HDMI jack adapter if you choose to use zero, for software setup and troubleshoot.
Other materials of the software * Please note that my local copy shop does not carry the required transparent film.
I purchased the film in large quantities online, which was not expected at the beginning of the project.
You may be lucky or able to negotiate with a store in your area to carry this material.
For this project, it is important to center the weather word template at the bottom and top in the shell, so that when the two are installed together, between rows and rows of words, A slight baffle will appear.
Measure and record the innermost length and width of the housing.
Mine test 11 \"x 14-1/16\".
Cut a solid piece of cardboard into this size and check if it fits comfortably in the case.
This product will serve as the basis for the installation of LED, lamp baffles and the assembly of electronic hardware.
Cut another solid piece of cardboard about 14 \"4\" in length.
This piece will be cut into a light baffle in a later step. Print out two (2)
11 copy of \"bottom word template\" on \"x17\" paper.
Be sure to print in 100% ratio (
Not \"scale to fit \").
Measure and trim one of the templates to center it on the cardboard base.
Glue this template firmly on the cardboard to ensure that most of the paper is adhered (
This is important because the LED and light baffles will be attached to this base in later steps).
Put the second copy of the bottom template aside for later reference (
This will help to measure and compare top templates in later steps). Print out one (1)
11 copy of \"side baffle template\" on \"x17\" paper.
Be sure to print in 100%.
The lines on this template are intended to align with the line of words on the bottom template and help to get the line and square line of light baffles later in the project.
Measure and trim the template to center it on the 14 \"x4\" cardboard.
Glue this template firmly on the cardboard to ensure that most of the paper is glued.
Print out three (3)
11 copy of \"Top Word template\" on \"x17\" transparent film (acetate)
Using a laser printer (
I used the local copy shop for this step).
Again, make sure these are printed in a 100% scale.
Also check if the top template is roughly around the width of the acetate fiber (
The width of my shell is exactly the width of my acetate fiber. . .
Staying centered at this step helps make sure I\'m roughly centered to my bottom template).
Before proceeding, compare the printed top template with the saved copy of the bottom template.
The two should be close (
Since acetate shrinks under the heat of laser printing, there will be some differences from top to bottom, but the difference should be small).
Measure and trim each top template, center them to the previously recorded enclosure size, and check if they fit into the enclosure.
Align the words of each copy of the top template together and use double sided tape to stick the copy together.
LED matrix (22)
Addressable rgb led bar line (
13 LED per row).
Because the LED light strip was purchased with meters plus length, each line of the item was cut on the copper patch board between the 13 th and 14 th LED that purchased the light strip.
Use double sided tape to stick each line of the LED to the bottom template.
From the movement of data on the top word line from left to right (
Looking for the arrow on your LED strip)
Then right to left on the next line of words.
Alternate data transfers in this way across all 22 rows of the template.
The line of LED will be in 5 groups (
Then 2 at the end).
All rows will be connected in data points (
Make a fully addressable block of 286 LEDs)
But these lines will only be powered by a parallel group of 5.
Before welding these lines together, you may consider passing the wires through the bottom template cut holes or slots at the end of each line.
As you can see from the photo, I wound directly between the two rows and later needed to cut the slot on the side baffle to accommodate.
The baffle slots work fine and do not cause any excess light bleed outside of the intended area, but they take extra time to cut and install properly on the wires.
Short now (
About 2 \")
Wire to GNDto-GND, DIN-to-DOUT, and VDC-to-
VDC in the direction in which the data movement is stopped at the end of the fifth line.
Welding DIN only-to-
DOUT between 5 rows and 6 rows.
Weld the short lines to the GND and VDC in the sixth row, and then let them connect the power supply freely.
Continue down all 22 lines of the template this way.
Get some thin (ish)
Cardboard cut into a light baffle row (
I used a cereal box. .
Measure and trim the cardboard (46)
5/8 wide \"x 1 Long \".
The tape is glued together in pairs using double-sided tape to obtain (23)
Light baffle row (
The separate bezel looks fragile and I think the two baffles together can provide better stability. . .
It may seem excessive afterwards, but I can\'t say if a strap is enough). Cut an extra (5)
The bar used as a word block baffle in a later step.
Use the melt gun and glue to row each light baffle onto the line on the bottom template.
Make sure to use a lot of glue and work quickly to get a strong adhesion between the baffle row and the bottom template.
Also make sure that each baffle row is alignedto-
At the bottom of the printed template line.
Measure and trim the 14 \"x4\" cardboard into two 13-with the adhesive side baffle Template-
1/4 wide \"x 1 Long \".
Check that the side of the bottom template is appropriate.
Each line on the side baffle template should be aligned with the word line on the bottom template.
The row at the top and bottom should also have some protruding parts of the side baffle.
Use the melt gun and glue to paste the side baffle along the left and right sides of the bottom word template.
Again make sure to use a lot of glue and work quickly to get a strong adhesion between the side and the bottom template.
Now use hot glue to stick each end of the baffle row to both sides of the baffle.
Next, cut and stick (47)
Word block baffle.
These baffles block the light between bright weather words.
Use the bottom template as the guide, trim the individual block baffles and stick them together using melt glue.
Trim each piece for a comfortable fit. . .
Enough to block the light, but not enough to distort the baffle row.
The final step of the light baffle process is to cut a black plastic garbage/garbage bag that completely covers the light baffle.
There are two uses for this package. . .
It spreads the light of the bright LED from the clear font and acts as an additional black barrier to prevent the light from showing through the black transparent layer and highlighting the baffle at the back
As an optional step, I cut the vellum paper into small size and bend it slightly on the LED for each word cell.
This method cancels the effect of seeing each LED when viewing directly through a transparent font.
The Raspberry Pi Zero is not assembled to the title on the GPIO pad.
You need to weld at least one joint to the pin 12 position (GPIO18).
The basic hardware installation is almost one-for-
One implementation at a level-
Learning System tutorial for Adafruit NeoPixels found converter chip wiring settings on Raspberry Pi.
The setting of the breadboard is summarized as follows: in addition to the above, I chose to add a capacitor (1000 µF, 6. 3V or higher)
Resistance of Cross and terminal and data cable (300 to 500 Ohm)
Between the input of the 74 ahct150 pin 1Y and the DIN of the first LED line.
The project was tested without adding hardware, with no obvious adverse effects, but as a precaution based on best practices found in \"Adafruit neopiüberguide\"
The power supply is introduced into the housing through the MicroB USB connector breakthrough, and split, and the behavior Pi and bread plate power supply.
Welding head terminals for VCC and GND.
Weld the capacitor and two pairs of wires to each head Terminal (
Make sure the capacitor leads match correctly with positive/VCC terminals and negative/GND terminals).
Connect the ends of a pair of VCC and GND wires to the breadboard.
Weld the micro USB connector housing to the end of another pair of wires and connect it to the Raspberry Pi.
Now you should be able to turn on the power of the Pi from the micro USB connection.
However, the LED will not do anything until the NeoPixel Library is installed next.
* Note: There is no need to route pin 6 position (GND)
As shown in the reference figure, when the Raspberry Pi and the led share the same power supply.
I originally connected the project this way and noticed that a large part of the current is grounded through this pin.
Removing this connection has no adverse effect on the operation of the led.
First, it is necessary to blacklist the Broadcom audio kernel before proceeding with the software installation (
On-board sound driver for Pi).
This is to eliminate the PWM conflict between the following Library installation and on-board audio, which can cause some strange behavior in the led (
Random mixing of flashing or flashing pixels)
Or the function of the Pi when HDMI is disconnected.
Instructable \"disable built-in-
In the sound card of raspberry pie, you will go through the blacklist steps.
Now download and install the NeoPixel library for Raspberry Pi (
Rpi_ws281x Library)
With one exception, follow the software instructions in the Adafruit Learning System tutorial.
In addition to the tutorial instructions for installing libraries to Python by executing: cd python Sudo Python installer.
Py install you also need to install the library to Python 3 by executing: sudo Python 3 installer.
This is because of the weather words.
The py program that will be installed later is written in Python 3.
Continue with the software instructions using the Strandtest example.
Make sure to change the LED_COUNT constant to reflect the number of pixels in the project (
286 in this case)
Otherwise, when you execute the sample code, only the first line of the matrix will be controlled.
If all your connections are good, you will get a good highlight * demo in the whole matrix!
* Note that for the Strandtest example, with a brightness setting of 255 and a pixel count of 286, the 2 amp power supply will be pushed to the upper limit.
I measured about 2.
When running the rainbow sequence on a 2 amp power supply, 2 amps of the LED, about 2 amps.
5 amps when running on a 4 amp power supply.
However, be careful when playing with the code. An all white (255, 255, 255)
Settings can be pulled above 17 Am ps (
Refer to the power supply NeoPixels section of \"Adafruit neopiel ü berguide\" for estimating the power demand of NeoPixel).
I ran a full white version as a test that triggered my Pi to restart the sequence.
The Word program is designed to get weather forecast data from the API every 15 minutes, parse the data into an array of temperature, wind speed, and weather conditions, and then light up a specific LED group representing the words in the LED matrix.
In order for the API to work, you need to get the API key from the WeatherUnderground website (available here).
This key will be entered into the apiboot.
Txt file for later steps.
Execute the following command from the Raspberry Pi terminal to download and install the required apiboot.
Txt and weather _ word.
Program file.
The Git apiboot clone needs to be edited now. txt file to 1)
Add your API key, 2)choose (uncomment)
One of API query options, 3)
Select \"English \"(degrees F)or \'metric\' (degrees C).
Executing the following command will open apiboot.
Txt file in the nano text editor: sudo nano/home/pi/weather _ word/apiboot.
City/State queries are not commented by default (Miami/FL).
Select and modify any queries you like, just make sure the comments (#)
Any queries that are not used.
For more examples of the query type and how to customize the query to meet your specific needs, please refer to the Weather Underground documentation.
After editing the nano file, Ctrl-
X exit, Y save file.
Now, to test the installation, do the following: sudo Python 3/home/pi/weather _ word.
When Pyon is executed, the program will write to its first log. txt file.
However, if you open the log file now, the log file will only indicate that the program is initializing with a rainbow color sequence.
The rainbow color sequence will chase 60 seconds on the LED matrix.
The Weather _ word program is intended to start at the start of the Raspberry Pi.
The 60 second delay is to give the Pi enough time to start and connect to wifi before the first API call.
After about 60 seconds, the program will make the first API call.
If all goes well, the current weather condition will be displayed on the LED matrix.
Every 20 seconds, the display will cycle to \"upcoming low\" based on the results analyzed from the next 12 hours of weather data, and then \"upcoming high\" to predict weather conditions. Open the log.
The Txt file will reveal the data set from the API call.
The program will proceed with API calls and update the LED matrix and logs.
Txt file every 15 minutes until the Pi is closed or the program is terminated (Ctrl-
C from Terminal).
If the API call fails to connect or returns an error, the program erases the LED matrix with a red display and writes the error encountered to the log.
Txt file and terminate.
If the API call times out in the startup sequence, the program wipes the LED matrix with a yellow display and writes the message to the log.
Txt file and try to connect again in 3 minutes.
To test the quality of the baffle in your project, I wrote the following test program to cycle through each word in the display.
Sudo Python 3/home/pi/weather _ word _ test.
The PyEach word stays for 5 seconds and then repeats when it reaches the end of the display.
When you are satisfied with your setup, the last step in the software installation is to have the Pi start the program at startup.
This is done by modifying the crontab using the following terminal command. sudo crontab -
EScroll to the bottom of the file and add a line: @ reboot sudo Python 3/home/pi/weather _ word.
After editing the file, Ctrl-
X exit, Y save file.
Now, when you close and restart the Pi, the weather _ word program will start as expected.
Be patient during startup, because the first 15 seconds or so will not be displayed until the crontab is executed.
Now you can untie the tether of the item from the keyboard, mouse and display and place it anywhere you want to see the current weather and weather forecast at a glance!
Custom message
Chat Online
Chat Online
Chat Online inputting...
Sign in with: