| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Srivatsan, Akshay – Final Project

Page history last edited by Akshay Srivatsan 8 years, 7 months ago

EE47 Final Project: Akshay Srivatsan

Modular MP3 Player

 

Video:

 

Point of View:

I designed this player for people whose needs are constantly changing. Such a person may need his/her MP3 player to be quiet while at work or at a library, but loud while at home. He/she may want a display while playing music at home, but not want to risk damaging it while biking or running. Current MP3 players are "all-or-nothing" – an iPod Classic can't be used while biking because it needs headphones and has a fragile display. A boombox can't be used at work because it is too loud. An MP3 player with tactile buttons may be great for use in a pocket, but would be horrible for use in a kitchen (water/guacamole/whatever would get stuck in the buttons or enter the electronics). Conversely, capacitive buttons are great for the kitchen, but horrible for in-pocket use (how would you tell the buttons apart?). It's impractical to buy a separate MP3 player for each of these uses, so a MP3 player which makes each part easily removable and reattach-able would be much more efficient.

 

Verplank Diagram:

 

Original Design Sketch:

State Diagram:

The state diagram does not include any transitions for adding/removing modules because all the modules I made were "write-only". This meant the Arduino could send commands to them even when they weren't present and everything would continue to function. A side effect of this is that the player needs to be rebooted when the display is reconnected, since the Arduino has no way of detecting "hot-plugging" and reinitializing the display. (This does not affect the speaker or VS1053 in any way).

 

Early Prototypes:

I originally wanted to make the modules out of these plastic tubes from TAP Plastics. The thing on the far left is an Adafruit Pro Trinket (for scale). The leftmost tube was my favorite – its size made it was easy to hold, and it was rigid enough to hold its shape. Unfortunately, I had no way of cutting holes in the side of hard plastic, so I then tried to use a thin plastic tube (like the second one from the left). However, as I built my project, I found that I needed more space – approximately like the far right tube. At that point the tube was too big to hold comfortably, so I decided to make the MP3 player box-shaped instead.

 

This was a very early enclosure prototype. At this point, I wanted the boxes/modules to be stackable. The two square holes in the top were for Molex connectors. The box on the right would have become the speaker module, and the box on the left would have become the main module. The Adafruit Trinket is present for providing scale. Even these boxes were too small to hold the electronics, which prompted me to make my own. However, this version of the prototype did affect the final product considerably.

 

 

Build Process:

     For my project, I was focused on size and modularity. I wanted to make the MP3 player as small as possible (originally, I wanted it to fit in someone's hand. While working on it, I discovered that wasn't possible, but I still tried to keep it small.) I also wanted the modularity to be intuitive – the user shouldn't have to connect wires together or connect things in a specific order. The modules should be plug-and-play.

     I started by buying products from Adafruit – particularly, their "Pro Trinket" and VS1053 Breakout. The Pro Trinket is a board based on the ATMega328p (like the Arduino Uno) that is Arduino-compatible, but about two thirds the size of the Arduino Micro. The biggest issues I encountered while using it were its one interrupt pin and its low RAM/Flash capacity. It also needs to be reset before uploading, and has no USB Serial port. I got around the low memory problem by using u8glib, an Arduino library capable of driving many small displays. It splits the display into "pages", so it consumes much less RAM than the Adafruit library (but is slower). I also used the MP3 library from Lab 6 instead of Adafruit's, since it consumed (slightly) less flash. To get around the serial port issue, I put an Arduino Uno into perpetual reset (I connected the reset pin to ground), then connected it's RX and TX to the Pro Trinket's.

     I started working on the project on August 5th. By the end of that day, I had a working barebones MP3 player using the Adafruit parts. By August 7th, I had the display minimally working. I started laser-cutting my enclosure on August 10th, and managed to complete the main module's case that day. I made the enclosure for the other parts on August 11th. (I went to Room 36 early in the week to avoid the inevitable crowd at the end of the week). On August 13th, I was originally planning to use Molex to connect the different modules together. I had estimated that having two 9-pin Molex connectors on each side of each module would break out enough pins for the near future. However, after crimping a few wires, I realized finishing that would take too long. I then noticed the male and female headers in the lab and figured it would be faster to use them to make my own connector. I decided each connector should consist of two rows of five pins, and that there should be two connectors on each side of each module. The connectors fit into the slots I had laser-cut for the molex connectors, so I didn't need to make any modifications to the case. I then spent the rest of the day using the "nibbling tool" to cut pieces of perfboard to the right size. That evening, I cut color-coded wires to the right lengths to fit in my enclosures. On August 14th (Friday), I soldered the wires to my connectors. On the evening of August 14th and early morning of August 15th, I put my electronics into my enclosures. I had cut the wires about an inch too long, so I had to fold them within the modules to make them fit. The tension from the bent wires is strong enough to push a side out of the press-fit box, so I had to use tape to hold the sides in place. The connectors were hot-glued in place and initially took some pressure to connect to each other, but gradually became easier to fit together. I made a few final modifications to the software on August 15th, and had a working modular player ready for the presentation.

 

     I completed the "main", speaker, and display modules, including 3 tactile buttons on the main module. There is an SPI bus running through the connectors, so it can be expanded (I haven't connected all of the chip select wires to the Arduino, however). I have also allocated space for an I2C bus, but it is not yet connected to my Arduino. This means I finished somewhere between my "plan A" and "plan B" – I didn't make it handheld or 100% modular (the buttons, Arduino, and VS1053 are all connected), but I did make a removable speaker, removable display, and a standard connector to link the modules (which allows for further expansion). This fulfills my basic Point of View – the player can be easily and quickly modified as the needs of the user change.

 

     In terms of portability, I have been demonstrating the player hooked up to a power supply over USB to make it easier to reset. I need to reset the Arduino every time I reupload code, and the reset button on my Arduino is hard to access while it is in its enclosure (it is accessible if you press it with a paperclip or pen, but that would have been tiring while I was debugging my code). There is a JST connector and LiPo charging circuit in the main module, so attaching a LiPo would only take about five minutes. When the battery is present, it can charge off the Micro USB cable. However, my code does not currently support sleep mode, so the Arduino would continue to drain the battery even when not being used. According to Adafruit's blog, there is a way to put the Arduino into a low power mode when not being used, so the battery would last longer.

 

Connector Pinout (looking at male header from outside):

Left:

Power (3.3V) MISO  MOSI  SCLK D/C 
Left Audio Audio Ground Right Audio (NC) Reset  Ground 

Right: 

Chip Select 1  Chip Select 2 (NC) Chip Select 3 (NC) NC  NC 
SDA (NC) SCL (NC) NC  NC  NC 

The pins only marked NC are disconnected. The pins with a label and marked (NC) are connected as busses, but are not connected to the Arduino. Pins in bold are pins that were actually used by the modules I built. The audio pins are wired directly to the headphone jack and VS1053. All digital signals are 3.3V. Power, Ground, Reset, MISO, MOSI, and SCLK were all connected to hardware pins on the Arduino and the respective pins on the VS1053. D/C and the Chip Selects could be connected to any unused pins (I used A0 and A1).

 

Modules:

 

Issues I Faced:

  • Making things small is a lot harder than it sounds. My Speaker and Display modules barely have enough space to accommodate the wiring (which I had to coil several times).
  • The Arduino is extremely low on RAM and Flash. I had to almost completely rewrite my program to use smaller libraries.
  • Solid core wire does not bend well. I managed to break several wires by bending them too many times. This is especially true of the wire available in the lab.
    • Also, it is nearly impossible to straighten bent wire. 
    • The wire in my final design is actually bent within the modules. I cut the bus wires too long, so there are fifteen wires that are each an inch too long folded up within each module. The tension that results from this has pushed the side off my press-fit box several times. 
  • Crimping is difficult and time consuming. The fact that my original plan involved crimping 108 wires inspired me to make connectors out of headers instead.
    • Related to this, headers are stronger than they look. They are also harder to pull apart than they look. My final design uses them as mechanical connectors as well as electrical connectors.
  • If you bend wire away from a breadboard, it's difficult to keep that wire in the breadboard.
    • I ran into an odd glitch where music would speed up and slow down randomly. This was actually caused by my DREQ pin floating after its wire disconnected itself. (I discovered this when I placed my hand near my Arduino and the music went back to normal).
  • Cutting perfboard into small pieces is incredibly time consuming. The most reliable way is to use the "nibbling tool", which ends up destroying about half of the perfboard by shredding it into tiny pieces.
  • Trying create many parallel solder bridges next to each other on perfboard is difficult. I nearly burnt a piece of perfboard because three solder bridges fused together and I overheated the board while trying to separate them. 

 

User Interaction:

 

Button/Action  Click  Hold 
Green  Volume Up  Next Song 
Blue  Play/Pause  More Information (Track Name, Artist, Album) 
Red  Volume Down  Previous Song 

 

 

Photos:

 

My first laser-cut enclosure prototype:

My first few connectors (and the perfboard that I cut up to make them):

The finished connectors:

The wires that I soldered to the connectors to create busses:

The first finished busses/connectors:

The connectors attached to the electronics of the different modules:

http://pressplay.pbworks.com/w/file/99265458/Srivatsan%2C%20Akshay%20-%20Final%20Project%20Video%201.mp4

 

The partially assembled speaker module:

The partially assembled display module:

The fully assembled speaker and display modules:

The partially assembled main module:

 

First video of project in its enclosure (running an older version of the software):

Srivatsan, Akshay - Final Project Video 2.mp4

 

 

Finished Version (the same as at the top of the page):


 

Code: http://pressplay.pbworks.com/w/file/99266218/Srivatsan_Akshay_Modular_MP3.zip

 

Note: I didn't have a chance to finish cleaning up this code. There are a lot of commented out lines of code and comments that are no longer relevant. I am uploading it as-is because this is the version that was running during the project demo.

Note 2: This code requires the Mp3 and u8glib libraries. The Mp3 library is from Lab 6, u8glib can be found at https://github.com/olikraus/u8glib.

 

Since the code was spread across 5 files, I uploaded it as a zip file:

Srivatsan_Akshay_Modular_MP3.zip

 

 

Comments (1)

xyyue@... said

at 2:28 pm on Aug 18, 2015

Hi Akshay,

This is really a great idea and the performance of your device is so nice.

We love the intention for your design since it's really useful and practical. Further, your lab report is really detailed for us to understand it quite well. The diagrams are also clear enough and so good. We can see the effort that you put in and thanks for this.

Well done and good luck for your future!!!

You don't have permission to comment on this page.