MP3 Player

hippy

Technical Support
Staff member
Probably not but it depends on how the VS1002 works.

If the VS1002 connects directly to an SD Card and is just instructed what to do by the PICAXE then that should be possible. If the PICAXE has to retrieve data from the SD Card then pass that on to the VS1002 that seems less possible. The PICAXE likely won't have the raw speed required to fetch and stream data at the required rate. Plus you need to write code for handling SD Cards and FAT filing systems; no small task in themselves.

The VMUSIC2 module (USB030) would be a much more suitable product for use with PICAXE. That's a USB Memory Stick to MP3 player where the PICAXE simply selects what's to be played etc. It may be possible to use a USB SD Card reader if SD cards are preferred.
 

MurrayJ

Senior Member
It depends what you are trying to do. I have the Vmusic2 Module and they are very good, easy to connect to a picaxe.

Another new sound module is the SOMO-14D. It is also controllable from the picaxe, and use a microSD card. They are tiny - 2cm x 2cm, but you will have to convert your music to the format it uses (.ad4), but a free converter is on the web page. Only $25 too. Have a look here:

http://www.4dsystems.com.au/prod.php?id=73
 

D396

Senior Member
SOMO-14D looks good do you have any idea how to control it,The data sheet will not open on my browser.
P.S Thanks
 
Last edited:

inglewoodpete

Senior Member
SOMO-14D looks good do you have any idea how to control it,The data sheet will not open on my browser.
P.S Thanks
I'm using Adobe Reader Version 8.1.7 and it downloads and displays fine for me.

Edit: The module runs off 2.7 to 3.6 volts so care must be taken when interfacing to a PICAXE or other 5v controller. (A PICAXE that runs off 3v would be ideal, though.)

It interfaces via clocked serial (SPI). Refer to the ShiftOut/SPIOut command descriptions in the command manual.
 
Last edited:

D396

Senior Member
Yes A code snippet would be nice
I got the data sheet to work. I had to save and then open it.
 
Last edited:

westaust55

Moderator
The module runs off 2.7 to 3.6 volts so care must be taken when interfacing to a PICAXE or other 5v controller. (A PICAXE that runs off 3v would be ideal, though.)
A 2N7000 (or smilar) FET transistor in each line will handle the voltage difference. In fact it makes for a good bi-directional signal level change as well.
Philips (NXP) have a paper on the topic of level shifting which I have made reference to before.

I have been using this method between a 5V PICAXE 18X with chips (eg DS1307) that require 5V and HopeRF modules that work at 3/3.3V
Nor is the method/circuit limited to 5V <--> 3.3V.
 

inglewoodpete

Senior Member
All commands are composed of single word (16 bit) data that must be clocked into the module in a serial fashion (most significant bit first). The clock rate is approximately 2.5Khz which lends itself to even the slowest micro bit-banging two I/O ports to achieve this simple communication.
Code would look something like:
Code:
Symbol MP3ClockPin = 1  'Defined to suit
Symbol MP3DataPin  = 4  '    your actual wiring
{other code}
Let w7 = $FFF3          'Set volume to step 3 of 8  (simplified value put into send register)
{other code}
SPIOUT MP3ClockPin,MP3DataPin,MSBFirst_L,(b14,b15)
{other code}
 

goom

Senior Member
SOMO-14D Embedded Audio-Sound Module

I decided to look into the SOMO-14D as an alternative to the ISD2560 sound recorder chip, which I have used successfully in the past for a sailboat race countdown start timer. It may also prove to be a useful unit for model sound effects, commanded by a spare RC receiver channel.
I am new to 2-wire serial communications, and am having some difficulty understanding it.
From the datasheet, it appears to require a rather slow data transmission - a 2.5kHz clock frequency. It also reqires a minimum 2ms start and stop bit pulse width. I therefore conclude that using SPIOUT (or HSPIOUT) would be much too fast for the SOMO-14D. Is that correct?
How fast is SPIOUT? I could not find any mention in the manuals. Perhaps underclocking could make it slow enough?
I decided to try my hand at some bit-banged SPI code:
Code:
'Countdown timer using PICAXE-28X1 and SOMO-14D Embedded Audio-Sound Module
setfreq m8
Start:
W0=65527 '=%1111111111110111, set volume to max
gosub Send_Data
W0=500 '=%0000000111110100, play sound file 0500.ad4
gosub Send_Data
end
Send_Data:
  low 0
  pulsout 2,400  'Pause 2ms by pulsing dummy pin (needs >2ms start bit)
  for b4=1 to 16  'Loop through all 16 bits
  W0=W1&%1000000000000000  'Mask MSB
  pin1=bit15  'Set data to MSB
  if b4=16 then
   high 0  'Clock high (needs >2ms stop bit)
   else
   pulsout 0,40  'Clock high for 200us to latch data on pin1
   pulsout 2,40  'Pause 200us by pulsing dummy pin (low clock)
  endif
 W0=W0<<1  'Shift left to get next significant bit
  next b4
Return
I would appreciate it if someone could do a sanity check to see if I am on the right track. I can't try anything yet since I ordered the unit only today.
 
Top