Difference between revisions of "ECE434 Project- LED Matrix Information Board"

From eLinux.org
Jump to: navigation, search
m
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:ECE497 |PT]]
 
 
[[Category:ECE434Fall2020 |PT]]
 
[[Category:ECE434Fall2020 |PT]]
 
{{YoderHead}}
 
{{YoderHead}}
  
Team members: [[user:Weger|Andrew Weger]]
+
Team members: [[user:Wegerac|Andrew Weger]]
  
 
== Grading Template ==
 
== Grading Template ==
Line 10: Line 9:
  
 
<pre style="color:red">
 
<pre style="color:red">
09 Executive Summary
+
00 Executive Summary
09 Packaging
+
00 Packaging
09 Installation Instructions  
+
00 Installation Instructions  
09 User Instructions
+
00 User Instructions
09 Highlights
+
00 Highlights
09 Theory of Operation
+
00 Theory of Operation
09 Work Breakdown
+
00 Work Breakdown
09 Future Work/Conclusions
+
00 Future Work/Conclusions
09 Hackster.io
+
00 Hackster.io
09 Demo/Poster
+
00 Demo/Poster
 
00 Not Late
 
00 Not Late
  
Score:  90/100
+
Score:  --/100
 
</pre>
 
</pre>
  
 
== Executive Summary ==
 
== Executive Summary ==
  
This project will take an LED matrix and a Beagleboard Black and use them to create an information board that can display weather data.
+
In this project, I took my BeagleBone Black and a LED matrix from Adafruit and created a clock that shows the current temperature outside.
  
 
== Packaging ==
 
== Packaging ==
If you have hardware, consider [http://cpprojects.blogspot.com/2013/07/small-build-big-execuition.html Small Build, Big Execuition] for ideas on the final packaging.
+
[[File:FinishedMatrixRotated.jpeg|1000px|center|Finished Product]]
 +
Currently the components just lay on the desk, but I do have plans to make a case that holds the beagle and matrix together.
  
 
== Installation Instructions ==
 
== Installation Instructions ==
  
Give step by step instructions on how to install your project.
+
'''GitHub:''' The repository for this project can be found here. [https://github.com/rhit-wegerac/BBB_Led_Matrix_Info_Board.git BBB_Led_Matrix_Info_Board]
  
* Include your [https://github.com/ github] path as a link like this to the read-only git site: [https://github.com/MarkAYoder/gitLearn https://github.com/MarkAYoder/gitLearn].  
+
'''Hardware:''' Below are the following products used to complete this project.
* Be sure your README.md is includes an up-to-date and clear description of your project so that someone who comes across you git repository can quickly learn what you did and how they can reproduce it.
+
* [https://www.adafruit.com/product/1996 BeagleBone Black]
* Include a Makefile for your code if using C.
+
* [https://www.amazon.com/Micro-Center-Class-Memory-Adapter/dp/B07K835MNR?th=1 Micro SD Card]
* Include any additional packages installed via '''apt'''. Include '''install.sh''' and '''setup.sh''' files.
+
* [https://www.adafruit.com/product/2278 LED Matrix]
* Include kernel mods.
+
* [https://www.adafruit.com/product/1466 5V 4A Power Supply]
* If there is extra hardware needed, include links to where it can be obtained.
+
* [https://www.adafruit.com/product/368 DC Power adapter - 2.1mm jack to screw terminal block]
 +
* [https://www.amazon.com/gp/product/B079DN31SW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 8cm Prototype PCB]
 +
* [https://www.amazon.com/OCR-6Colors-Breakable-Connector-Arduino/dp/B0796RCJHK/ref=sr_1_21?keywords=pcb+headers&qid=1637005026&s=industrial&sr=1-21 PCB Headers]
 +
* [https://www.amazon.com/gp/product/B07CZT26DM/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 22 Gauge Wire]
 +
 
 +
'''Installation'''
 +
Start off by going to the link here [https://github.com/FalconChristmas/fpp/releases 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. [https://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone#Make_Room_for_Files 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. [[File:BeagleLEDCapeConnector.jpg|thumb|Wiring diagram for the cape.]]
 +
 
 +
'''Cape Construction'''
 +
[[File:MatrixCape.JPEG|thumb|Finished LED Matrix Cape]]
 +
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.
 +
[[File:MatrixBack.JPEG|thumb|Connecting the matrix.]]
 +
 
 +
 
 +
 
 +
'''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.
 +
[[File:MatrixOutputs.PNG|1500px|center|Configuring Matrix]]
 +
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.
 +
 
 +
[[File:MatrixTesting.PNG|1500px|center|Testing the matrix]]
 +
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. 
 +
 
 +
[[File:MatrixInputs.PNG|1500px|center|Configuring Matrix Inputs]]
 +
 
 +
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!
  
 
== User Instructions ==
 
== User Instructions ==
  
Once everything is installed, how do you use the program? Give details here, so if you have a long user manual, link to it here.
+
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
  
Consider making it autostart for full credit.
+
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 [https://www.openweathermap.org 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.
  
 
== Highlights ==
 
== Highlights ==
  
Here is where you brag about what your project can do.
+
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).
 
 
Include a [http://www.youtube.com/ YouTube] demo the audio description.
 
  
 
== Theory of Operation ==
 
== Theory of Operation ==
  
Give a high level overview of the structure of your software. Are you using GStreamer?  Show a diagram of the pipeline. Are you running multiple tasks?  Show what they do and how they interact.
+
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.
  
 
== Work Breakdown ==
 
== Work Breakdown ==
  
List the major tasks in your project and who did what.
+
{| class="wikitable"
 
+
|-
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.
+
! Date !! Milestone !! Notes
 +
|-
 +
| 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
 +
|}
  
 
== Future Work ==
 
== Future Work ==
  
Suggest addition things that could be done with this project.
+
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.  
  
 
== Conclusions ==
 
== Conclusions ==
  
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.
+
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 [https://markayoder.github.io/PRUCookbook/ PRU Cookbook]
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Latest revision as of 08:29, 30 November 2022

thumb‎ Embedded Linux Class by Mark A. Yoder


Team members: Andrew Weger

Grading Template

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

Executive Summary

In this project, I took my BeagleBone Black and a LED matrix from Adafruit and created a clock that shows the current temperature outside.

Packaging

Finished Product

Currently the components just lay on the desk, but I do have plans to make a case that holds the beagle and matrix together.

Installation Instructions

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.

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.

Wiring diagram for the cape.

Cape Construction

Finished LED Matrix Cape

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.

Connecting the matrix.


Putting it all Together When attaching all of the components, be sure to always connect the components in this order.

  1. Connect the LED matrix to the power cord.
  2. Connect the matrix to the beagle with the data cable provided. (Keep in mind the position of the notch, black rectangle in wiring diagram)
  3. 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.

Configuring Matrix

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.

Testing the matrix

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.

Configuring Matrix Inputs

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!

User Instructions

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.

Highlights

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.

Work Breakdown

Date Milestone Notes
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

Future Work

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.

Conclusions

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




thumb‎ Embedded Linux Class by Mark A. Yoder