* MP3 Shield * - Rogue Robotics rMP3

@Vertigo: I assume you're using Arduino IDE 0022?

If so, there is no need to do anything else. Since 0022, the full Stream base class is now part of the core.

If you do use the rMP3 on the Arduino Uno/Duemilanove, you'll likely need to use NewSoftSerial. I've worked with Mikal (maintainer of NewSoftSerial) so that NewSoftSerial inherits from Stream (as well as support for the "mega" boards). I'm not exactly sure when Mikal intends to release the new version of NewSoftSerial. In the meantime, I have a version available here.

b

--

Check out our rKey Capacitive Touch Switch

That is awesome! Thanks a lot for the knowledge mate!

Hi,

I'm happy to hear that since 0022, the rMP3 shield is fully compatible.

I've been playing with it a bit, plugged to 2 small 8ohm speakers in series (to match the 16 ohm output impedance, and my sound file is mono): the output sound is very low, especially for bass.
Before thinking about how to add an amplifier, I wanted to try the volume and boost settings of the rMP3.

from RogueMP3 Arduino Library - Rogue Robotics :

setvolume(byte newvolume) - sets the volume (both left and right to same value).

setboost(...) - sets the audio boost enhancement.

hmm ... I managed to understand from different sources that setvolume(0) is max output, and that setboost works something as :

setboost(bass_amp [0 - 15], bass_freq [0 - 15], treble_amp [-8 - +7], treble_freq [0 - 15])

Is that right ? what bass/treble frequency range are covered by the [0 - 15] range ? how do the amp values work ?

In a more general perspective, I trust in rMP3 as a very useful and handy device (I bought 3 for my project), but now that it is fully compatible, is it not time for a synthesized documentation, in a single, linear document ? I know everybody's busy, but I have the feeling that at the present moment, important bits of info are spread over in the rogue wiki, which can be an obstacle for "base" users like me.
bhagman, if you agree to put together this "simple" user manual, I can offer some of my time if you feel the need for a french translation. :slight_smile:

What do you guys think ?

Vertigo.

I've been playing with it a bit, plugged to 2 small 8ohm speakers in series (to match the 16 ohm output impedance, and my sound file is mono): the output sound is very low, especially for bass.
Before thinking about how to add an amplifier, I wanted to try the volume and boost settings of the rMP3.

This depends completely on the speakers but an amplifier will generally be a good idea.

In a more general perspective, I trust in rMP3 as a very useful and handy device (I bought 3 for my project), but now that it is fully compatible, is it not time for a synthesized documentation, in a single, linear document ? I know everybody's busy, but I have the feeling that at the present moment, important bits of info are spread over in the rogue wiki, which can be an obstacle for "base" users like me.

I also agree but it would be a lot of work and I presume you are talking about an arduino rMP3 document (with the arduino libraries) rather than simply a document on the rMP3 module as a whole. I have been working off and on with bhagman to suggest ways to tidy up the website a bit, perhaps now I have also got to grips with it a bit more, I can help more with this and a document specifically for the rMP3 explaining the major features if not everything the module can do yet.

I'm impressed you have 3 of them, what's the project? :slight_smile:

Mowcius

Thanks Mowcius for your reply.

The project is simply a talking robot. I got 3 cards because we should use two robots in the future (+1 spare ::slight_smile: ).

You got my idea exactly : rMP3 deserves a simple manual, tutorial or web page for arduino users, explaining "only" essential points such as

  • what the board is for and can do (file formats, etc ...)
  • input : what arduino pins are used and how to reroute pins if needed
  • output : what speakers can be used (still working on this obviously)
  • content of the rmp3 lib, and how basic functions work ...

Not saying the rMP3 is poorly documented at all, but the waveshield pages for example are more friendly, at least to my level of knowledge Audio Shield for Arduino

If I go back to the speaker issue, Mowcius, I'm using two 50mm 0.5W 8ohm speakers in series. As I wrote above the sound is pretty low, lower than a normally speaking person (that's a standard :wink: ). Here's what I checked and tested :

  • rMP3 : set volume to 0 (max)
  • rMP3 : boost bass
  • file : normalized to 100% (I tested other music mp3s, too)
  • speakers : connect only 1 speaker, hence 8 ohm instead of 16. I was affraid to burn the card. Did not burn, but the sound was not louder.

Am I missing something ? what do you mean by "This depends completely on the speakers" ?

I measured the rmp3 output on my scope, it ranges between +/- 0.8V, is it supposed to be so ?

Am I missing something ? what do you mean by "This depends completely on the speakers" ?

What housing are the speakers in? Try taking a speaker out of it's speaker housing and see how much quieter it sounds.

Like anything, you can get good and bad speakers, better ones will be louder for the same impedance.

I will try to do some work on a simple guide to the rMP3 for arduino - if I can understand it - most other people should be able. :wink:

Mowcius

Hey Vertigo,

I totally agree with you about having a tutorial or such for Arduino/Wiring etc.

I'd be willing to work out something for anyone who wants to build up a tutorial/howto on our wiki. And I'll definitely take you up on your offer to translate to French. Just email me and we can get things worked out.

RE: speakers - the audio output on the rMP3 (i.e. from the VS1011) can only drive a 16 Ohm impedance load minimum.

Impedance is only half of the equation though. All speakers have two ratings: Impedance and Watts. To effectively use your speakers to produce the sound level for which they have been designed, you need to drive it with enough current to move their coils.

For example, an 8 Ohm speaker rated at 25 Watts will require 14 Volts (RMS - Root Mean Square - roughly means average) to produce maximum output swing on the speaker coil.

The VS1011 can only provide 2 Vpp (2 volts peak to peak maximum, and typically 1.6 Vpp - which is what you've measured). It is designed to drive headphones or a line-input, and hence it will not be able to effectively drive the two larger 8 Ohm speakers in series.

We are designing a small amplifier board that one can use with the rMP3/uMP3 to drive small speaker loads. Follow us on Twitter and we will announce when it's ready.

In the meantime, you can use a cheap set of pc speakers - they are usually amplified and cost very little.

b

--
Wiring - Open Source Electronics Prototyping Platform
rKey Capacitive Touch Switch
rEDI Education Board

Hey,

I have recently got my rmp3, and was wondering how do I get the mp3 songs that are playing on the rmp3, to act as an input to an Arduino module?

I would like to have the songs playing and controlled from my rmp3, and then analysed for frequency on my arduino module to activate different output pins for different frequency pitches?

Thanks

Jenny

There is the Visualiser example code featured on the Rogue Robotics website:
http://www.roguerobotics.com/wikidocs/projects/rmp3/spectrum_analyzer_demonstration

Mowcius

very cool, i can't wait to get one.

Hey,

Thanks for the reply. From that it seems that I have to use an arduino board. I thought this may be the case.
Will I be able to use any arduino module, and seeing the output bitrates for the music from the rmp3, will I have to use mp3's encoded at a low bitrate so the music can be analysed over the serial port?

Hopefully I can go and start soldering my rmp3 to the nano board, and get my project up and running.

Thanks

Thanks for the reply. From that it seems that I have to use an arduino board. I thought this may be the case.

You do not have to as all of the rMP3 functions are controlled via serial commands (these can be sent from anything).
The visualiser example however has been coded as an arduino library so it would be easiest to use an arduino.

Will I be able to use any arduino module

Yes.

will I have to use mp3's encoded at a low bitrate so the music can be analysed over the serial port?

No, the visualiser example uses the VLSI's in built function to analyse the frequency bands of the audio. The mp3 can be in any bitrate (up to 320kbps)

Mowcius

@jennyc: You can use any bitrate mp3 (up to and including 320 kbps). Each time you want a sample of the frequencies, you use the getspectrumanalyzer() method. You can call this at any time during playback. So, you can do it as often or as little as you want.

b

@mowcius Thanks, I already have some code that uses an arduino to analyse an mp3, over usb, when it is all run from an arduino sketch on my laptop. I was going to use the rmp3 to listen to the music on the go, and though I will need to use an arduino module to send the commands over serial then.

The communication between the two should be ok then?

I was going to use the FrequencyEnergy library that comes with the arduino programme, export it to my nano, and where the output display is changing the size of the words, just set the output to set my arduino to set an output to HIGH, to activate a motor.

This should be ok to do, with having the arduino to control the playing of the music on the rmp3, and analysing the mp3 off the sdcard at the same time?

@bhagman As said above, I was going to use the FrequencyEnergy library example that is in the arduino programme. Would using the getspectrumanalyser() method be more useful for my project? Or would doing what I described above be a better method of achieving this?

Thank you very much for your help
Jenny

Would using the getspectrumanalyser() method be more useful for my project?

Yes - this is specific to the rMP3 and takes values directly from the audio (with the VLSI chip).
It will return values to you for the frequencies you have specified and then with a trigger value, if the value (volume on that frequency) goes above the trigger value then it will cause something to happen (light up an LED for example).

I was going to use the FrequencyEnergy library that comes with the arduino programme

I have not seen this library for arduino - do you mean the one that comes with Processing?
This is completely different and cannot simply be exported for use with arduino.

Mowcius

I think I am starting to see more how this is going to work now.

On the arduino module, I set it to "tell" the rmp3 to getspectrumanalyser(), which will then return a frequency value to my arduino module, and if it is above a certain frequency will trigger and output to a motor.

Can this be used to trigger an action for groups of different ranges of frequencies, a low frequencies group, medium and high? Rather than just if the frequency goes above a set value?

On the arduino module, I set it to "tell" the rmp3 to getspectrumanalyser(), which will then return a frequency value to my arduino module, and if it is above a certain frequency will trigger and output to a motor.

Yes - that's the general idea but it does not return a frequency - it returns a value for the different frequencies you have specified. You can specify up to 23 different frequencies and retreive the values of them

Can this be used to trigger an action for groups of different ranges of frequencies, a low frequencies group, medium and high? Rather than just if the frequency goes above a set value?

Not quite sure what you mean. Perhaps my comment above addresses this.
You can do whatever you like with the values - You could choose just to analyse low frequencies, high frequencies etc if you wanted.

Mowcius

Have just been playing with it a bit, and have got a better grasp of how these things talk to eachother. Will go away and read about the getspectrumanalyser() and see where to go from there.

What I was meaning is that if it is a low frequency, the rmp3 will return a value to the arduino that will activate one output, and if it is a mid range frequency, the rmp3 will return another value to the arduino to trigger a different output.

With the aim of having a different output for a different frequency range.

Thanks

Ahh well if you specify a range of low med and high frequencies you can then monitor the values returned and do something if they go over a threshold.

Just been trying to get it even playing an mp3, and it never compiles. Just gets the same error every time.

In file included from sketch_jan17a.cpp:1:
C:\Users\Jennifer\Desktop\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:32:24: error: SerialBase.h: No such file or directory
In file included from sketch_jan17a.cpp:1:
C:\Users\Jennifer\Desktop\arduino-0022\libraries\NewSoftSerial/NewSoftSerial.h:45: error: expected class-name before '{' token
sketch_jan17a:4: error: no matching function for call to 'RogueMP3::RogueMP3(NewSoftSerial&)'
C:\Users\Jennifer\Desktop\arduino-0022\libraries\RogueMP3/RogueMP3.h:110: note: candidates are: RogueMP3::RogueMP3(Stream&)
C:\Users\Jennifer\Desktop\arduino-0022\libraries\RogueMP3/RogueMP3.h:103: note:                 RogueMP3::RogueMP3(const RogueMP3&)

And I have no idea why it is not working. I have downloaded, and installed the serials library change, and selected the [stream] uno module.

Any ideas what the issue might be?