YulleBorges_FinalProject


Final Project

 

Bluetooth Mp3 Player

Yulle Glebbyo Borges

 

Overview:

     For this project it is expected to create a functional Mp3 Player fully controlled by a Bluetooth enabled device (such as laptops, smartphones and tablets). The main objective is focus all the human-device interface be made on such devices instead of interaction with the Mp3 hardware. The product is intended to be a multimedia center/controller, meaning that it will be able to connect to a sound system (speakers, home theaters and others) and play songs while controlled by any paired device inside the range area.

     Here's a little mind map I've made when I was brainstorming for ideas on how this device would work:

YulleBorges_FinalProject%20diagram2.JPG 

                                                                           Mind Map

 

       Also, I've made a Verplank's diagram to help to conceptualize the idea:

YulleBorges_FinalProject%20diagram1.JPG

                                                            Verplank's Diagram     

 

What I have used:

     For this project I used the following materials:

 

Challenges:

     This project can be pretty challenging since it includes software and hardware difficulties. The first of the challenges is getting the Arduino talk serially with the computer through Bluetooth. After this the same logic could be extended to be applied with other Bluetooth devices, which leads to our main target: and Android device.

     The second challenge was to make a nice interface based app for Android to interact with the Arduino program. Android was the platform chosen for this project due to its ease to work and the fact that Android smartphones are getting increasingly popular.

     The last challenge is expanding the Mp3 functionalities itself. The barebones Mp3 has very basic functions and could be expanded very nicely until it becomes our Bluetooth Mp3 player.

 

Assembling:

     The assembling process was pretty straightforward since most parts were connected as shown in the lab sessions. The bluetooth module was the only part that the wiring process wasn't explained in lab, but it has a simple way of being connected. We only needed to connect four pins: TX, RX, PWR and GRND. Power and ground are self-explaining once you know that the bluetooth module runs at 3.3V. TX is connected to the Arduino's RX while RX is connected to the Arduino's TX, but for a reason which will be explained in detail later in this report the Bluetooth module's RX and TX had to be wired to the Arduino's pins 10 and 11 respectively. After that the Bluetooth module was all set and could be found by my Android phone (it was called HC-05 by standard).

YulleBorges_FinalProject%20photo1.JPG

                                                  Bluetooth connection established!

 

     Furthermore, I encountered a very unfortunate problem when wiring the Mp3 for this project: my SD card had been soldered in the wrong way, so it would come out of the bread board very easily, so I had to re-solder my SD card and that's when I figured out another bug that took me a couple days go through. After solving this problems I had everything (hardware) I needed for my Bluetooth Mp3 player.

 

Building the Software:

     In the software part of the project, my first move was to make my Android phone communicate with the Arduino via Bluetooth. For that I had to use an Arduino library called SoftwareSerial which creates a serial communication with the Arduino program using other pins (instead of 0 and 1 as the standard RX TX). I had to do this because I was powering my device through the Arduino's USB which already took the RX and TX pins so things got confusing when I tried to connect the Bluetooth to those pins. For this reason the Bluetooth module was wired to pins 10 and 11 and a serial communication was set in software for those pins (check out the documentation for SoftwareSerial here). With this I was able to send a signal from my Mac to Arduino to turn and LED on and off using Bluetooth. The same program was then converted to work with my Android phone.

 

YulleBorges_FinalProject%20photo2.JPG 

                         Sending Information from the Arduino to Android through Bluetooth.

 

     I have said that while re-soldering I figured out a bug that took me a couple days to solve: My SD card wasn't working properly even after re-soldering it. When I uploaded the Mp3 program (barebones) to Arduino it worked out normally, but when I added one line of code (literally!) to include the SoftwareSerial library the program wouldn't upload. I couldn't solve this problem, but for an unknown reason (If anyone knows why or how did it happen please tell me: glebbyo@gmail.com) when I tried someone else's SD card on my board and the same program it worked just fine, so I borrowed the SD card to finish my project and now everything was working. 

 

Expanding the Barebones Mp3 code:

     The Teaching team's Barebones Mp3 code was slightly change to add more functions. To simplify, the code for the bluetooth communication was just added to the Barebones code (in the same scope). Also, as at this point my was almost over I couldn't implement the Android app so I used a software called SENA BTerm (you can check it out on Google Play) to simulate a terminal for Bluetooth communications (similar to the Arduino's Serial Console but for bluetooth communication... and Android)

     The functions supported by my Mp3 are:

 

Videos and Pictures: Showing how it works

     Unfortunately I am in the process of moving out (that whole foreign student thing :/ )while writing this report and I figured that my project is already packed and my suitcase is already in the 'storage' so I wasn't able to record a nice video and showing some cool pictures of my project. I apologize. Maybe I'll upload 

a video when I'm home, but for now that's it.

 

Here's my code:

Bluetooth Test

Bluetooth Mp3 Player

 

If you have any feedback related to this project I would be glad to hear it (send it to glebbyo@gmail.com).