A NEW MintyMP3, anyone want to help?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Re: A NEW MintyMP3, anyone want to help?

Postby Amberwolf » Sun Feb 08, 2009 1:50 pm

I'm pretty sure it needs to be as fast as possible so you can reliably get data from the card to the buffer to the output amp in time to not have any crackles or dead air, along with whatever other work you want it to do. Moving audio data realtime is pretty CPU-intensive, especially if you do any processing of it (like with EQ profiles, etc), and the audio has to have priority over anything else.
Watch me build an electric bike from assorted junk!
Alternative Energy Sources for the Home from Recycled Junk
A subsidiary of Cybernetic Necromancers, Discorporated:
"We Bring Dead Things To Life"
User avatar
Amberwolf
 
Posts: 310
Joined: Wed Oct 08, 2008 1:42 am
Location: Phoenix, AZ, USA

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Sun Feb 08, 2009 3:55 pm

Alright, I'm ordering a wide variety of products from Mouser right now (at least two of everything, I KNOW I'm going to blow up a few chips in the process!) so I'll throw in a couple different oscillators. From what I've seen in other MP3s, there need to be a few crystals, one for the main microchip, one for the MP3 decoding chip (maybe?) and one for the USB to serial chip (again, maybe?). I'm actually thinking that USB may not even be the best idea, at all. Any firmware upgrading could be done through an ICSP header and charging could be done through a DC jack, while songs are transferred to the SD card manually with a card reader or something.
I'm also ordering a couple breakout boards for the SMT chips so I'll be able to easily experiment with this :D
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby trialex » Sun Feb 08, 2009 3:59 pm

magician13134 wrote:what frequency does this need to be?


It think you can run your "processor" (i.e. the AVR) at any speed you want - the mp3 decoder will run off it's own crystal.

I would have thought you'd want to run it at 16MHz to maintain compatibilty with the standard Arduino environment - or does the new '328 version of the IDE support 20MHz?

Also the AVR might not be rated for the full 20MHz at 3.3V if you go down that road as I posted about before.

magician13134 wrote: The chip I'm ordering (Mega328) says 20MHz, but that's always confused me, does that mean I can't use higher than that? Or does it mean that for higher frequencies I'll need an external resonator/oscillator? I looked through my resonator drawer and found some "20.00MX", will that work? Thanks :?


Yeah 20MHz is the highest speed that the manufacturer will rate it at. It probably will work faster, but at the risk of damage.

magician13134 wrote:And I'm having trouble finding good, cheap switches. On the MintyMP3, there's those nice right-angle switches and that very cool (I'm guessing) volume control switch... Does anyone know a good brand of those? Preferably on Mouser?


Here's a surface mount rocker switch
http://www.sparkfun.com/commerce/product_info.php?products_id=8184

Here's a surface mount SPST switch
http://www.sparkfun.com/commerce/product_info.php?products_id=8769

magician13134 wrote:I'm actually thinking that USB may not even be the best idea, at all. Any firmware upgrading could be done through an ICSP header and charging could be done through a DC jack, while songs are transferred to the SD card manually with a card reader or something.


Yep definately do this, at least for the first version. Get the whole SD -> AVR -> decoder working and add USB from there...
trialex
 
Posts: 188
Joined: Mon Apr 03, 2006 5:25 pm

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Sun Feb 08, 2009 4:04 pm

Alright. And one more thing. If I wanted to use a rocker switch like that for volume control... How would I (could I?) do that? Would I need a digital potentiometer? What would be the best solution there?
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby trialex » Sun Feb 08, 2009 4:20 pm

Not sure exactly what you mean.

The rocker switch is just a normal momentary switch with a spring to return it to centre.

Wait, do you mean controlling the volume using like a pot, so that an analog resistance (and therefore voltage on on the AVR analog input pins) would be proportional to voltage?

I was thinking more a "digital" volume level control, ie have a variable that sets the voltage, and pushing up on the switch increases the value in the variable which increases the volume. i THINK the volume is controlled by the MP3 decoder chip and I think that's how it's done... i'll go have a look at the vs1001 datasheet.

by the way have you decided on a decoder chip?
trialex
 
Posts: 188
Joined: Mon Apr 03, 2006 5:25 pm

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Sun Feb 08, 2009 4:38 pm

STA013 because it's easier to get a hold of, unless you recommend the vs1001
(Although, I've found some pretty good resources for the STA013...)
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby trialex » Sun Feb 08, 2009 9:55 pm

Nup, only reason I have mentioned the VS chips is because sparkfun has them, and they are the easiest supplier to get stuff posted to australia.

Here's one link talking about the STA013 - even a good "plain english" explanation of getting the mp3 data into the decoder:

http://www.pjrc.com/mp3/sta013.html
trialex
 
Posts: 188
Joined: Mon Apr 03, 2006 5:25 pm

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Sun Feb 08, 2009 9:57 pm

trialex wrote:Here's one link talking about the STA013 - even a good "plain english" explanation of getting the mp3 data into the decoder:

http://www.pjrc.com/mp3/sta013.html
That's the one I was referring to when I said I had some good resources. Great minds think alike (Or at least click on the same Google links :wink:)
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby trialex » Sun Feb 08, 2009 10:14 pm

STA013 and AVR (AtMega128)
http://www.frankvh.com/hwdetails.htm

Seems to say RAM is at a premium... AtMega328 has 2k?
trialex
 
Posts: 188
Joined: Mon Apr 03, 2006 5:25 pm

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Sun Feb 08, 2009 10:39 pm

Yup. Also, twice the EEPROM and twice the flash of the 168 counterpart :D
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby Amberwolf » Mon Feb 09, 2009 1:50 am

magician13134 wrote:Alright. And one more thing. If I wanted to use a rocker switch like that for volume control... How would I (could I?) do that? Would I need a digital potentiometer? What would be the best solution there?

A digital pot is very simple, since all you need are two input switches (either two individual ones, or a rocker with two poles like my bike turn signal switch for left, off, right, just not latching like that).

A digital pot with two separate buttons often even gives you the option for instant mute, by pressing both buttons at the same time (many devices I've used do this, such as TVs, stereos, etc).

Maxim makes a number of them:
http://para.maxim-ic.com/en/search.mvp? ... ree=master
Some have rotary encoder interfaces, some have button interfaces.
Some even have built-in audio post-processing, such bass/treble and "ambience", etc.
Some are addressable by the microcontroller via 2-Wire protocol, for example, to get to advanced functions and whatnot.
Some have LED drivers built-in as well.
Some even have a separate subwoofer out, though you won't need that for the MP3 player. :)

They do all the debouncing for you, so you don't have to deal with it in hardware or software. They also remember the last setting, so you don't have to reset the control every time you power cycle the unit.

This one, as a simple 4-button example, also has features like "auto accelerate", meaning it goes up (or down) faster the longer you hold the button down, so you don't have to keep clicking the thing to go far in it's range.
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5288
Image
It has a 5-led level meter output if you want to use it, which will also indicate left/right balance while you're adjusting that, if you need it.
The pots are dual, controlled as stereo.
It only uses 1uA in "shutdown" mode.
Watch me build an electric bike from assorted junk!
Alternative Energy Sources for the Home from Recycled Junk
A subsidiary of Cybernetic Necromancers, Discorporated:
"We Bring Dead Things To Life"
User avatar
Amberwolf
 
Posts: 310
Joined: Wed Oct 08, 2008 1:42 am
Location: Phoenix, AZ, USA

Re: A NEW MintyMP3, anyone want to help?

Postby magician13134 » Mon Feb 09, 2009 6:37 am

Very nice find, Amberwolf! Only problem is, can you read the current volume with a micro then? If I have a screen, I'd like to show the volume level on it...
Other than sampling, is there anywhere I can get these Maxim ICs? I was also looking at using one of their charging chips for the battery. (I did sample a couple of those chips, though, so I'll be able to do some testing soon). Also, I was thinking... Could I run the LED outputs (mode select and such) into the ATMega to figure out about where the volume is? Or is there another pin on there that I'm overlooking that would help me do that?

Does anyone know where to find an eagle library for the STA013?
User avatar
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 8:17 am
Location: Ann Arbor

Re: A NEW MintyMP3, anyone want to help?

Postby Amberwolf » Mon Feb 09, 2009 3:27 pm

magician13134 wrote:Very nice find, Amberwolf! Only problem is, can you read the current volume with a micro then? If I have a screen, I'd like to show the volume level on it...
<snip>
Could I run the LED outputs (mode select and such) into the ATMega to figure out about where the volume is? Or is there another pin on there that I'm overlooking that would help me do that?

On that particular version there's no MCU interface, but on some of the others there is. You could run the LED level meter to an R2R ladder and then into an ADC input on the MCU to determine volume level, if using this version, but it'd be easier to use the chips made for that.

There are also others like the DS1666 that are intended for control by a micro, but could be controlled via pushbuttons with a little logic:
http://www.diyaudio.com/forums/attachme ... 1232794234
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2747
It's even available in DIP for breadboarding experiments. :) And 3 different resistance values. However, it's an older chip, and probably will be discontinued eventually.

I know TI also makes some, but I don't know that they're as easy to use as Maxim's--only time I went looking back when, they required dual power supplies and were more complex to setup. They've probably simplified them since then, but I tend to look at Maxim first for most things--they're pretty innovative.

Other than sampling, is there anywhere I can get these Maxim ICs? I was also looking at using one of their charging chips for the battery. (I did sample a couple of those chips, though, so I'll be able to do some testing soon). Also, I was thinking...

Easiest way to buy anything at Maxim is to use this page:
https://shop.maxim-ic.com/storefront/welcome.do
and enter the p/n you are looking for in the "Price and Availability" search box.
If you don't want to buy directly thru Maxim's store, I'm sure Mouser and/or Digikey has them or can get them for you. If not, Avnet probably can.
Watch me build an electric bike from assorted junk!
Alternative Energy Sources for the Home from Recycled Junk
A subsidiary of Cybernetic Necromancers, Discorporated:
"We Bring Dead Things To Life"
User avatar
Amberwolf
 
Posts: 310
Joined: Wed Oct 08, 2008 1:42 am
Location: Phoenix, AZ, USA

Re: A NEW MintyMP3, anyone want to help?

Postby trialex » Mon Feb 09, 2009 3:39 pm

Am I missing something, or is this just adding more parts? The STA013 can control the volume, you just send it volume up / volume down commands. What advantage do these parts give you?
trialex
 
Posts: 188
Joined: Mon Apr 03, 2006 5:25 pm

Re: A NEW MintyMP3, anyone want to help?

Postby Amberwolf » Mon Feb 09, 2009 3:44 pm

Ah. I don't know anything about the STA013, other than it's an MP3 decoder chip. :oops:

I guess none of what I suggested is needed then! ;)
Watch me build an electric bike from assorted junk!
Alternative Energy Sources for the Home from Recycled Junk
A subsidiary of Cybernetic Necromancers, Discorporated:
"We Bring Dead Things To Life"
User avatar
Amberwolf
 
Posts: 310
Joined: Wed Oct 08, 2008 1:42 am
Location: Phoenix, AZ, USA

PreviousNext

Return to General Project help

Who is online

Users browsing this forum: ArekKindAcere, csracruisers and 6 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]