Difference between revisions of "ECE434 Project Christmas Wreath"

From eLinux.org
Jump to: navigation, search
(Highlights)
 
(34 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
{{YoderHead}}
 
{{YoderHead}}
  
Team members: [[user:Edougherty|Emily Dougherty, Ryan Taylor]]
+
Team members: [[user:Edougherty|Emily Dougherty]] [[user:Taylorrc|Ryan Taylor]]
  
 
== Grading Template ==
 
== Grading Template ==
Line 30: Line 30:
 
== Executive Summary ==
 
== Executive Summary ==
  
Picture that summarizes the project.
+
[[File:ChristmasWreath.jpg|thumb|Smart Christmas Wreath]]
  
Give two sentence intro to the project.
+
Our project is a "smart" Christmas wreath that allows the user to display a pattern of LEDs and play Christmas music from a mobile app (blynk). Animations and songs are predefined.
  
Give two sentences telling what works.
+
The user can follow the "Installation Instructions" and create their own Blynk application to interface with the Wreath. When a button is pressed on the Blynk app, the wreath will start a predetermined light show and play the corresponding song. Users can connect any audio device through an AUX connection to the USB audio dongle connected to the BeagleBone ad the music will be played through it.
  
Give two sentences telling what isn't working.
+
== Packaging ==
 
 
End with a two sentence conclusion.
 
  
The sentence count is approximate and only to give an idea of the expected length.
+
[[File:BreadBoard.jpg|200px|Close Up of the bread board with the USB audio device that play the music]]
  
== Packaging ==
+
In the above image you can see all the hardware pieces used to complete this project. There is a strip of 240 nano LEDs wrapped around a Christmas wreath that can perform specific animations. The strip of LEDs are run by the PRU0 on the BeagleBoard. The BeagleBoard itself (bottom left) is the brains of the system and runs the code that controls the wreath. Plugged into the BeagleBoard is an USB audio device that we use to play downloaded Christmas songs.
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.
 
  
 
== Installation Instructions ==
 
== Installation Instructions ==
Line 49: Line 46:
 
Give step by step instructions on how to install your project.   
 
Give step by step instructions on how to install your project.   
  
* 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].
+
* Obtain the code from Github: https://github.com/dougheea/ECE434/tree/master/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.
+
* Make sure that mplayer is installed on the device that will be running the code. To install, run ''sudo apt install mplayer'' on the beaglebone.
* Include a Makefile for your code if using C.
+
* Install the Blynk App on your mobile device
* Include any additional packages installed via '''apt'''. Include '''install.sh''' and '''setup.sh''' files.
+
* In the blynk app, select "New Project" and enter a name like "Christmas Wreath" and choose hardware option ''Generic Board''. Make sure the connection type is "WiFi" and click "Create Project". An authorization code has been sent to the email associated with your blynk account.
* Include kernel mods.
+
* Add your own authorization code into the setup.sh file
* If there is extra hardware needed, include links to where it can be obtained.
+
* Add 5 button widgets to the project workspace and tie them to Virtual pins V0-V4. These buttons will be tied to the predetermined songs and the stop button.
 +
* In the command line: ''source setup.sh''
 +
* Finally, run ''./playSongAndLights.py''
  
 
== 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.
+
Once the installation instructions are completed, all that is left to do is start playing Christmas music! The user can choose 1 of 4 different songs: Mariah Carey's "All I Want For Christmas Is You," NSYNC's "Merry Christmas, Happy Holidays," The Ronette's "Sleigh Ride," and the Trans-Siberian Orchestra's version of "Carol of the Bells." Each song corresponds to a specific button on the Blynk app. The user can press the desired song's button to begin the music and turn on the LED animations wrapped around the wreath. The user can stop a song at any time by pressing the stop button. Once the song and LEDs are stopped, the user can chose the next song to play.
 +
 
 +
== Highlights ==
  
Consider making it autostart for full credit.
+
Our project has 4 separate songs:
 +
* All I want for Christmas is You, Mariah Carey
 +
* Merry Christmas, Happy Holidays, NSYNC
 +
* Sleigh Ride, The Ronettes
 +
* Carol of the Bells, Trans-Siberian Orchestra
  
== Highlights ==
+
All of the songs include their own personalized light show to accompany the music.
  
Here is where you brag about what your project can do.
+
The music is being played using mplayer, a python package. Additionally, the PRU is used in lighting the LED strip.  
  
Include a [http://www.youtube.com/ YouTube] demo the audio description.
+
Click [https://www.youtube.com/watch?v=3PXV4XKxh_w&ab_channel=RyanTaylor/ here] to see a demo of the lights.
  
 
== 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.
+
Here is a flowchart that describes the structure of our code. By using the sub-processes and threading, the Blynk app can monitor when the 'Stop' button is pressed and quit the light animations/ music player.
 +
 
 +
[[File:ChristmasWreathFlowChart.jpg|Left|Code Flow Chart for the Smart Christmas Wreath]]
  
 
== Work Breakdown ==
 
== Work Breakdown ==
 +
 +
<big><big>Timeline and Milestones</big></big>
 +
* Brainstorm various light patterns to implement (11/5)
 +
* Find more songs to use (11/5)
 +
* Get the music to stop playing on a button press (11/6)
 +
* Thread the music and lights so that they occur at the same time (11/8)
 +
* Finalize the Blynk app (11/11)
 +
* Assemble final project (11/13)
 +
 +
 +
<big><big>Who Did What</big></big>
  
 
List the major tasks in your project and who did what.
 
List the major tasks in your project and who did what.
 +
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.
  
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.
+
Major Completed tasks:
 +
* Setting up Blynk App environment (Emily)
 +
* Starting and stopping music using mplayer in a python program (Emily)
 +
* Setting up lights and defining animations using PRU (Ryan)
 +
* Using threading to use mplayer and the light strip in parallel (Emily)
 +
* Procuring external power supply for final demo (Ryan)
 +
* Documentation (Emily and Ryan)
  
 
== Future Work ==
 
== Future Work ==
  
Suggest addition things that could be done with this project.
+
With more time, we would like to add functionality of a webpage to change the settings on the wreath. This webpage would be accessible from smartphones, tablets, or regular browsers. It would have the same functionality as the blynk application, but would be more accessible--the blynk app only works for smartphones who have a specific page created.
 +
 
 +
Additionally, we would like to change the type of lights we use to a more traditional style of Christmas light instead of the LED strip. These single LEDs could be multicolor or just white, but would have the same functionality as our LED strip with more of the look of traditional Christmas lights.
 +
 
 +
We would also like to put in a way for users to upload their own music to the Wreath. Currently, there are only 4 songs that are pre-loaded and have pre-defined lighting. It would be nice to expand this capability to allow users to customize the music they can play.
  
 
== Conclusions ==
 
== Conclusions ==
  
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.
+
While developing the Smart Christmas Wreath we learned a lot about sub-processes and threading. The biggest complication was getting the Blynk app to be responsive while the lights and music run indecently from each other. The details of this process can be seen in the Theory of Operation section. Once We got the structure of the system working we were able to develop different animations for the lights and download several Christmas songs to choose from. All that was left was to finalize the Blynk app and then watch it run!
 +
 
 +
Another element that could be added to the project is having the lights react to the music. For example, if the songs volume increases, the brightness of the lights could increase. This would be a neat element to add in future implementations of this project.
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Latest revision as of 10:11, 16 November 2020

thumb‎ Embedded Linux Class by Mark A. Yoder


Team members: Emily Dougherty Ryan Taylor

Grading Template

I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

09 Executive Summary
09 Packaging
09 Installation Instructions 
09 User Instructions
09 Highlights
09 Theory of Operation
09 Work Breakdown
09 Future Work/Conclusions
09 Hackster.io
09 Demo/Poster
00 Late
Comments: Have a good day.

Score:  90/100

(Inline Comment)

Executive Summary

Smart Christmas Wreath

Our project is a "smart" Christmas wreath that allows the user to display a pattern of LEDs and play Christmas music from a mobile app (blynk). Animations and songs are predefined.

The user can follow the "Installation Instructions" and create their own Blynk application to interface with the Wreath. When a button is pressed on the Blynk app, the wreath will start a predetermined light show and play the corresponding song. Users can connect any audio device through an AUX connection to the USB audio dongle connected to the BeagleBone ad the music will be played through it.

Packaging

Close Up of the bread board with the USB audio device that play the music

In the above image you can see all the hardware pieces used to complete this project. There is a strip of 240 nano LEDs wrapped around a Christmas wreath that can perform specific animations. The strip of LEDs are run by the PRU0 on the BeagleBoard. The BeagleBoard itself (bottom left) is the brains of the system and runs the code that controls the wreath. Plugged into the BeagleBoard is an USB audio device that we use to play downloaded Christmas songs.

Installation Instructions

Give step by step instructions on how to install your project.

  • Obtain the code from Github: https://github.com/dougheea/ECE434/tree/master/Project
  • Make sure that mplayer is installed on the device that will be running the code. To install, run sudo apt install mplayer on the beaglebone.
  • Install the Blynk App on your mobile device
  • In the blynk app, select "New Project" and enter a name like "Christmas Wreath" and choose hardware option Generic Board. Make sure the connection type is "WiFi" and click "Create Project". An authorization code has been sent to the email associated with your blynk account.
  • Add your own authorization code into the setup.sh file
  • Add 5 button widgets to the project workspace and tie them to Virtual pins V0-V4. These buttons will be tied to the predetermined songs and the stop button.
  • In the command line: source setup.sh
  • Finally, run ./playSongAndLights.py

User Instructions

Once the installation instructions are completed, all that is left to do is start playing Christmas music! The user can choose 1 of 4 different songs: Mariah Carey's "All I Want For Christmas Is You," NSYNC's "Merry Christmas, Happy Holidays," The Ronette's "Sleigh Ride," and the Trans-Siberian Orchestra's version of "Carol of the Bells." Each song corresponds to a specific button on the Blynk app. The user can press the desired song's button to begin the music and turn on the LED animations wrapped around the wreath. The user can stop a song at any time by pressing the stop button. Once the song and LEDs are stopped, the user can chose the next song to play.

Highlights

Our project has 4 separate songs:

  • All I want for Christmas is You, Mariah Carey
  • Merry Christmas, Happy Holidays, NSYNC
  • Sleigh Ride, The Ronettes
  • Carol of the Bells, Trans-Siberian Orchestra

All of the songs include their own personalized light show to accompany the music.

The music is being played using mplayer, a python package. Additionally, the PRU is used in lighting the LED strip.

Click here to see a demo of the lights.

Theory of Operation

Here is a flowchart that describes the structure of our code. By using the sub-processes and threading, the Blynk app can monitor when the 'Stop' button is pressed and quit the light animations/ music player.

Code Flow Chart for the Smart Christmas Wreath

Work Breakdown

Timeline and Milestones

  • Brainstorm various light patterns to implement (11/5)
  • Find more songs to use (11/5)
  • Get the music to stop playing on a button press (11/6)
  • Thread the music and lights so that they occur at the same time (11/8)
  • Finalize the Blynk app (11/11)
  • Assemble final project (11/13)


Who Did What

List the major tasks in your project and who did what. Also list here what doesn't work yet and when you think it will be finished and who is finishing it.

Major Completed tasks:

  • Setting up Blynk App environment (Emily)
  • Starting and stopping music using mplayer in a python program (Emily)
  • Setting up lights and defining animations using PRU (Ryan)
  • Using threading to use mplayer and the light strip in parallel (Emily)
  • Procuring external power supply for final demo (Ryan)
  • Documentation (Emily and Ryan)

Future Work

With more time, we would like to add functionality of a webpage to change the settings on the wreath. This webpage would be accessible from smartphones, tablets, or regular browsers. It would have the same functionality as the blynk application, but would be more accessible--the blynk app only works for smartphones who have a specific page created.

Additionally, we would like to change the type of lights we use to a more traditional style of Christmas light instead of the LED strip. These single LEDs could be multicolor or just white, but would have the same functionality as our LED strip with more of the look of traditional Christmas lights.

We would also like to put in a way for users to upload their own music to the Wreath. Currently, there are only 4 songs that are pre-loaded and have pre-defined lighting. It would be nice to expand this capability to allow users to customize the music they can play.

Conclusions

While developing the Smart Christmas Wreath we learned a lot about sub-processes and threading. The biggest complication was getting the Blynk app to be responsive while the lights and music run indecently from each other. The details of this process can be seen in the Theory of Operation section. Once We got the structure of the system working we were able to develop different animations for the lights and download several Christmas songs to choose from. All that was left was to finalize the Blynk app and then watch it run!

Another element that could be added to the project is having the lights react to the music. For example, if the songs volume increases, the brightness of the lights could increase. This would be a neat element to add in future implementations of this project.




thumb‎ Embedded Linux Class by Mark A. Yoder