ECE434 Project- LED Matrix Information Board
Embedded Linux Class by Mark A. Yoder
Team members: Andrew Weger
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!
00 Executive Summary 00 Packaging 00 Installation Instructions 00 User Instructions 00 Highlights 00 Theory of Operation 00 Work Breakdown 00 Future Work/Conclusions 00 Hackster.io 00 Demo/Poster 00 Not Late Score: --/100
In this project, I took my BeagleBone Black and a LED matrix from Adafruit and created a clock that shows the current temperature outside.
Currently the components just lay on the desk, but I do have plans to make a case that holds the beagle and matrix together.
GitHub: The repository for this project can be found here. BBB_Led_Matrix_Info_Board
Hardware: Below are the following products used to complete this project.
- BeagleBone Black
- Micro SD Card
- LED Matrix
- 5V 4A Power Supply
- DC Power adapter - 2.1mm jack to screw terminal block
- 8cm Prototype PCB
- PCB Headers
- 22 Gauge Wire
Installation Start off by going to the link here Falcon Christmas Player and download the BeagleBone Black image. Next follow the instructions on on the following page to get the Beagle set up and connected to the internet. Out of the Box, Bone Note: When following Mark A. Yoder's instructions the Falcon Christmas Image doesn't have the same username and password as the one in Out of the Box, Bone. The username and password are as follows:
- username: fpp
- password: falcon
Note: Every time you type debian in the setup, it needs to be replaced with fpp.
With that done and out of the way, if you wish to run the program completely on the bone, you can ssh into it and clone the repo at this time. You can also run the program on a host computer as well without being connected by ssh, so if you wish to run it this way go ahead and clone the repo to your host computer now
Next we need to work on the hardware part of this project before we continue with the software.
It is possible to connect the LED matrix to the beagle with breadboard wires, but if you don't want to worry about wiring it wrong, or will want to unplug it often it is nice to have a cape for this. If you wish to not continue with cape construction, continue to the wiring diagram below. To start off constructing the cape, take one of the 8cm proto boards from the link above and cut off one end of the board that has the surface mount pads; cut all the way to the to the exposed copper of the first row of holes.(See photo of completed cape for a better idea of where to cut) Next, take four rows of 26 header pins and solder them in place so that they will go into the P8 and P9 headers of the beagle.
Note: the cut side of the PCB needs to be towards the side of the board with the USB and ethernet ports.
Once completed take two rows of 8 header pins, stick them into the top of the cape and solder them from the underneath side, we will solder wires to these next. Next, continue soldering the connections as seen in the picture to the right.
Note: I soldered the pins with the P8_7 and P8_8 pins of the connector at the cut end of the PCB because I wanted the matrix to the right of my beagle.
Power Cord Preparation My matrix came with a cord with two connectors on it, if you plan on adding another matrix to the setup later, skip the next part about splitting the cable into two. I cut the power cord above and below the solder joints the re-soldered the cable with one connector and one positive/negative wire. Whether you decided to split the cable into two or not, cut the terminal ends off of the cable, twist the ends and apply solder to create a better connection with the terminal block adapter. Once soldered, insert the wires into the terminal block connector.
Putting it all Together When attaching all of the components, be sure to always connect the components in this order.
- Connect the LED matrix to the power cord.
- Connect the matrix to the beagle with the data cable provided. (Keep in mind the position of the notch, black rectangle in wiring diagram)
- Connect the beagle to your host computer.
Configuring Falcon Player
On your host computer open up a web browser and navigate to the Falcon Player interface, "192.168.7.2" by default.
Go to Input/Output Setup -> Outputs and click on "LED Panels", your screen should now closely match the image above. Change the parameters on your screen to match the image above. Make sure you click the Enable LED Panels button. Scroll down a bit and you will see the LED Panel Layout section, we can leave this as the default, just make sure that the arrow is pointing to the right.
With that set, go to Status/Control -> Display Testing. Select the Model Name to be LED Panels, the end channel should update to 6144. Next, click on Enable Test Mode and your matrix should light up with dancing red, green, and blue LEDs. If successful, click test display again to turn off the display. Now return back to Input/Output Setup, but this time we will be going to the Inputs page.
There should already be one universe set up on the page when you first look at it. Configure this universe in the following way
- Active: Selected
- Input Type: E1.31 Unicast
- FPP Channel Start: 1
- Universe #: 1
- Universe Count: 1
- Universe Size: 96
Once this has been done, go to the inputs count, type in "64" and click set. There should now be 64 universes exactly like the first one, with the appropriate start and end channels.
That's it, you're now ready to run the program!
Navigate to where you cloned the repo on your computer or beagle, and run the install file from the command line with the following command.
$host sudo ./install.sh
Before running the program, in clockMatrix.py, change Terre Haute,US in line 12 and 242 to where you want the temperature data to be pulled from. Also sign up on OpenWeather for an API key and replace "YOUR_API_KEY" with your API key in line 9.
To run the program, run the following lines.
$host chmod +x clockMatrix.py $host ./clockMatrix.py
If you get a odd error about it not liking the "\r" character, run the following lines then try to run the program again.
$host sudo apt install dos2unix $host dos2unix clockMatrix.py
If that doesn't fix it, run:
$host unix2dos clockMatrix.py
Then try running the program again.
The matrix displays a 12hr format clock, local temperature, and Rose-Hulman Institute of Technology Logos. As the temperature increases the temperature color changes from Blue(coldest) to Green, and finally to Red(hottest).
Theory of Operation
Falcon player works by separating the matrix into slices, or universes which is what we separated the matrix into in one of the previous sections. We set the board up into 64 universes for the 64 columns of the display. Each universe has a set size, we set ours to 96 because each pixel has 3 LEDs (red, green, and blue) and there are 32 rows in the universe(3*32 = 96). The python script splits up a determined matrix into a universe, and sends that universe over the connection to Falcon Player where it is listening for the 64 universes. Falcon Player then takes that universe and displays it on the matrix. You can think of this as scan lines on a CRT TV.
|10/25/2021||Setup Power Cable||I prepared the power cable so it would only have one connector|
|10/29/2021||Flash Falcon Player to the Bone||I flashed the SD card with the Falcon image and gained access to the bone|
|11/2/2021||Figured out wiring for the matrix||I tested the display with falcon player|
|11/4/2021||Figured out how to talk to Falcon Player||I figured out how to talk to Falcon Player with a python script|
|11/5/2021||Custom cape||I created the custom cape for the matrix|
|11/12/2021||Clock Matrices||I created the custom matrices for the different clock digits|
|11/13/2021||Temperature API||I figured out how to get temperature data and created the matrices for the digits|
|11/15/2019||Project Demonstration||I demonstrated the project to Dr. Yoder and the ECE434 class|
In the future I would like to replace the Rose-Hulman logos with images of different weather conditions, such as clouds, rain, and snow, so that the board can be more useful. This shouldn't be very hard has the weather API can return a weather status that gives weather conditions. Also I would like to add a dimming feature because at night the display can get very bright and distracting.
This was a really interesting project, and I learned a lot along the way. At first, I though that this project was going to be straightforward, but this was far from true. When I decided on this project, I didn't understand how little documentation there is out there for these displays. Luckily Dr. Yoder has a great resource that covered the basics on Falcon Player in it called the PRU Cookbook
Embedded Linux Class by Mark A. Yoder