Difference between revisions of "ECE497 Project: Alarm with Remote Speaker"
(→Executive Summary) |
m (Removed ece497) |
||
(44 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | |||
[[Category:ECE497Fall2018 |PT]] | [[Category:ECE497Fall2018 |PT]] | ||
{{YoderHead}} | {{YoderHead}} | ||
− | Team members: [[user: | + | Team members: [[user:Briant717|Brian Jennings]] and Manoj Kurapati |
== Grading Template == | == Grading Template == | ||
Line 28: | Line 27: | ||
== Executive Summary == | == Executive Summary == | ||
+ | |||
+ | [[File:Clock Picture.jpg|664x660px|frameless]] | ||
Have an alarm set up on a dresser which connects to a speaker either wirelessly or via cable (my concern is maybe wireless speakers are always reliable). The speaker is next to the bed. When the alarm goes off, you have to get out of bed to go to the alarm to turn it off. | Have an alarm set up on a dresser which connects to a speaker either wirelessly or via cable (my concern is maybe wireless speakers are always reliable). The speaker is next to the bed. When the alarm goes off, you have to get out of bed to go to the alarm to turn it off. | ||
+ | |||
+ | The clock time shows up on the seven segment display. The “AM/PM LED” is on if the time is PM and off if the time is AM. If the “Show Alarm” button is pressed and held, it stops showing the clock time and instead shows the alarm time on the seven segment display. The alarm hour can be set by pressing the “Set Hour” button and the alarm minute can be displayed by pressing the “Set Minute” button. If the “Alarm Toggle” button is pressed, it turns the alarm on. If it is pressed again, it turns the alarm off. The “Alarm LED” is turned on if the alarm is on, and it is off if the alarm is off. When the alarm is on and the the alarm time matches the clock time, then the alarm goes off. When that is the case, the a youtube clip will be fetched and played on the Bluetooth speaker and the alarm will be turned off. We were currently using this youtube clip to play: https://www.youtube.com/watch?v=nPRHumwZfk4. When we press the “Snooze” button, the Bluetooth speaker will stop playing. | ||
== Packaging == | == Packaging == | ||
− | + | === Parts Used === | |
+ | * [https://beagleboard.org/green-wireless Beagle Bone Green Wireless] | ||
+ | * [https://www.adafruit.com/product/1009?gclid=CjwKCAiAiarfBRASEiwAw1tYv5C5V_fnoOFyCpkAXwfn97gZQ-WbYh68ZSBayMP97xkrisWnFIVoDRoC8jsQAvD_BwE 5 Push Buttons] | ||
+ | * [https://www.sparkfun.com/products/9590 Red LED] | ||
+ | * [https://www.sparkfun.com/products/9650 Green LED] | ||
+ | * [https://www.amazon.com/AmazonBasics-Shockproof-Waterproof-Bluetooth-Wireless/dp/B01GF4XZ24/ref=sr_1_15?ie=UTF8&qid=1540171725&sr=8-15&keywords=amazon+bluetooth+speakers Bluetooth Speaker] | ||
+ | * [https://www.adafruit.com/product/879 Adafruit Seven Segment Display with I2C Backpack] | ||
== Installation Instructions == | == Installation Instructions == | ||
− | + | ===Installing Necessary Libraries=== | |
+ | * Checkout the project repository: https://github.com/manojkur/RemoteAlarmClock | ||
+ | git clone https://github.com/manojkur/RemoteAlarmClock | ||
+ | cd RemoteAlarmClock | ||
+ | * Run the install.sh script to install all of the necessary libraries | ||
+ | ./install.sh | ||
+ | |||
+ | * More Instructions are available in the README.md located int the repository | ||
+ | |||
+ | === Setting Up Bluetooth === | ||
+ | |||
+ | * Run: | ||
+ | Pulseaudio --start | ||
+ | Bluetoothctl | ||
+ | |||
+ | * Turn on Bluetooth device, if not paired yet run: | ||
+ | scan on | ||
− | * | + | * Once you’ve found device: |
− | * | + | pair (Address of device) |
− | * | + | trust (Address of device) |
− | + | connect (Address of device) | |
− | + | ||
− | * | + | * If you have already paired to the device: |
+ | connect (Address of the device) | ||
+ | exit | ||
+ | |||
+ | === Setting Up Correct Time === | ||
+ | |||
+ | * View the current time: | ||
+ | timedatectl | ||
+ | |||
+ | * View the current time zone: | ||
+ | timedatectl status | ||
+ | |||
+ | * List the available time zones: | ||
+ | timedatectl list-timezones | ||
+ | |||
+ | * Set the time zone: | ||
+ | timedatectl set-timezone Zone/SubZone | ||
+ | |||
+ | * The other option is locally setting time by using: | ||
+ | timedatectl set-time "yyyy-MM-dd hh:mm:ss" | ||
== User Instructions == | == User Instructions == | ||
− | + | === Alarm Clock Schematic === | |
+ | [[File:Remote Alarm Schematic.png|664x660px|Frameless|Final Schematic]] | ||
+ | |||
+ | <big>*NOTE: Used Beaglebone Black in Fritzing for schematic, but used Beaglebone Green Wireless for project. Fritzing did not have the Green, but the pin positions are the same.*</big> | ||
+ | |||
+ | === Component Wiring === | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! !! BeagleBone Green !! Schematic Name | ||
+ | |- | ||
+ | | VCC || P9_01 || VCC | ||
+ | |- | ||
+ | | Ground || P9_03 || GND | ||
+ | |- | ||
+ | | Seven Segment Display SCL || P9_19 || SCL | ||
+ | |- | ||
+ | | Seven Segment Display SDA || P9_20 || SDA | ||
+ | |- | ||
+ | | Snooze Button || P9_21 || B1 | ||
+ | |- | ||
+ | | Show Alarm Button || P9_22 || B2 | ||
+ | |- | ||
+ | | Set Hour Button || P9_23 || B3 | ||
+ | |- | ||
+ | | Set Minute Button || P9_24 || B4 | ||
+ | |- | ||
+ | | Alarm Toggle Button || P9_25 || B5 | ||
+ | |- | ||
+ | | Alarm LED || P9_26 || LED1 | ||
+ | |- | ||
+ | | AM/PM LED || P9_27 || LED2 | ||
+ | |} | ||
== Highlights == | == Highlights == | ||
− | + | Youtube Demo included [https://youtu.be/LOAV6XjStQs here] | |
− | + | Hackster.io availible [https://www.hackster.io/manoj-kurapati/ece497-project-alarm-with-remote-speaker-5eae5d here] | |
+ | |||
+ | |||
+ | * Fully functional Alarm clock that can be programmed to any time for an alarm | ||
+ | * Time converted to be normal 12 hour time | ||
+ | * Bluetooth speaker that can be placed in another part of the room, forcing you to wake up | ||
+ | * Song can be selected via youtube link, providing a free source for music and other media to wake up to! | ||
== Theory of Operation == | == Theory of Operation == | ||
− | + | === Flowchart of Alarm Code === | |
+ | [[File:Flowchart2.png|Frameless]] | ||
== Work Breakdown == | == Work Breakdown == | ||
− | + | {| class="wikitable" | |
− | + | |- | |
− | + | ! Date !! Milestone | |
+ | |- | ||
+ | | 11/3/2018 || Have Time displayed and alarm working with LED | ||
+ | |- | ||
+ | | 11/5/2018 || Have Bluetooth speaker connected and playing a tune | ||
+ | |- | ||
+ | | 11/7/2018 || Have Spotify API connected | ||
+ | |- | ||
+ | | 11/9/2018 || Have enclosure made and poster prepared for presentation | ||
+ | |} | ||
== Future Work == | == Future Work == | ||
− | + | In the future, we could create a case for the alarm clock. We could also see if there is a way to get the API for Spotify to work with the alarm clock, so the alarm clock can also function as a jukebox. | |
== Conclusions == | == Conclusions == | ||
− | + | Bluetooth is not always reliable since it sometimes disconnects. So in the future we might want to explore other connection options. Also the speaker is just powered by a battery, which would eventually cause issues with running out of battery when you might need it most. So the answer would in the future use a speaker that did not rely on battery power to function. | |
+ | |||
+ | == References == | ||
+ | * [https://www.digikey.com/en/maker/blogs/beaglebone-green-wireless-playing-music-through-a-bluetooth-speaker-or-headset beaglebone-green-wireless-playing-music-through-a-bluetooth-speaker-or-headset] | ||
+ | * [https://github.com/adafruit/Adafruit_Python_LED_Backpack/tree/master/examples Adafruit_Python_LED_Backpack] | ||
+ | |||
{{YoderFoot}} | {{YoderFoot}} |
Latest revision as of 08:13, 19 October 2019
Embedded Linux Class by Mark A. Yoder
Team members: Brian Jennings and Manoj Kurapati
Contents
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 Installation Instructions 00 User Instructions 00 Highlights 00 Theory of Operation 00 Work Breakdown 00 Future Work 00 Conclusions 00 Demo 00 Late Comments: I'm looking forward to seeing this. Score: 10/100
(Inline Comment)
Executive Summary
Have an alarm set up on a dresser which connects to a speaker either wirelessly or via cable (my concern is maybe wireless speakers are always reliable). The speaker is next to the bed. When the alarm goes off, you have to get out of bed to go to the alarm to turn it off.
The clock time shows up on the seven segment display. The “AM/PM LED” is on if the time is PM and off if the time is AM. If the “Show Alarm” button is pressed and held, it stops showing the clock time and instead shows the alarm time on the seven segment display. The alarm hour can be set by pressing the “Set Hour” button and the alarm minute can be displayed by pressing the “Set Minute” button. If the “Alarm Toggle” button is pressed, it turns the alarm on. If it is pressed again, it turns the alarm off. The “Alarm LED” is turned on if the alarm is on, and it is off if the alarm is off. When the alarm is on and the the alarm time matches the clock time, then the alarm goes off. When that is the case, the a youtube clip will be fetched and played on the Bluetooth speaker and the alarm will be turned off. We were currently using this youtube clip to play: https://www.youtube.com/watch?v=nPRHumwZfk4. When we press the “Snooze” button, the Bluetooth speaker will stop playing.
Packaging
Parts Used
- Beagle Bone Green Wireless
- 5 Push Buttons
- Red LED
- Green LED
- Bluetooth Speaker
- Adafruit Seven Segment Display with I2C Backpack
Installation Instructions
Installing Necessary Libraries
- Checkout the project repository: https://github.com/manojkur/RemoteAlarmClock
git clone https://github.com/manojkur/RemoteAlarmClock cd RemoteAlarmClock
- Run the install.sh script to install all of the necessary libraries
./install.sh
- More Instructions are available in the README.md located int the repository
Setting Up Bluetooth
- Run:
Pulseaudio --start Bluetoothctl
- Turn on Bluetooth device, if not paired yet run:
scan on
- Once you’ve found device:
pair (Address of device) trust (Address of device) connect (Address of device)
- If you have already paired to the device:
connect (Address of the device) exit
Setting Up Correct Time
- View the current time:
timedatectl
- View the current time zone:
timedatectl status
- List the available time zones:
timedatectl list-timezones
- Set the time zone:
timedatectl set-timezone Zone/SubZone
- The other option is locally setting time by using:
timedatectl set-time "yyyy-MM-dd hh:mm:ss"
User Instructions
Alarm Clock Schematic
*NOTE: Used Beaglebone Black in Fritzing for schematic, but used Beaglebone Green Wireless for project. Fritzing did not have the Green, but the pin positions are the same.*
Component Wiring
BeagleBone Green | Schematic Name | |
---|---|---|
VCC | P9_01 | VCC |
Ground | P9_03 | GND |
Seven Segment Display SCL | P9_19 | SCL |
Seven Segment Display SDA | P9_20 | SDA |
Snooze Button | P9_21 | B1 |
Show Alarm Button | P9_22 | B2 |
Set Hour Button | P9_23 | B3 |
Set Minute Button | P9_24 | B4 |
Alarm Toggle Button | P9_25 | B5 |
Alarm LED | P9_26 | LED1 |
AM/PM LED | P9_27 | LED2 |
Highlights
Youtube Demo included here
Hackster.io availible here
- Fully functional Alarm clock that can be programmed to any time for an alarm
- Time converted to be normal 12 hour time
- Bluetooth speaker that can be placed in another part of the room, forcing you to wake up
- Song can be selected via youtube link, providing a free source for music and other media to wake up to!
Theory of Operation
Flowchart of Alarm Code
Work Breakdown
Date | Milestone |
---|---|
11/3/2018 | Have Time displayed and alarm working with LED |
11/5/2018 | Have Bluetooth speaker connected and playing a tune |
11/7/2018 | Have Spotify API connected |
11/9/2018 | Have enclosure made and poster prepared for presentation |
Future Work
In the future, we could create a case for the alarm clock. We could also see if there is a way to get the API for Spotify to work with the alarm clock, so the alarm clock can also function as a jukebox.
Conclusions
Bluetooth is not always reliable since it sometimes disconnects. So in the future we might want to explore other connection options. Also the speaker is just powered by a battery, which would eventually cause issues with running out of battery when you might need it most. So the answer would in the future use a speaker that did not rely on battery power to function.
References
- beaglebone-green-wireless-playing-music-through-a-bluetooth-speaker-or-headset
- Adafruit_Python_LED_Backpack
Embedded Linux Class by Mark A. Yoder