Pages: 1 ... 8 9 [10] 11 12   Go Down
Author Topic: * MP3 Shield * - Rogue Robotics rMP3  (Read 39853 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is great! Thanks a lot bhagman!
So I need to upgrade the firmware before I do anything now. I will try something either tonight or tomorrow morning. Cross fingers! smiley-wink
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so here is a recap of what I've done this morning:
- upgraded firmware via arduino (btw, the java updater doens't find any COM port, I had to use the command line method)
- installed arduino 21, then installed the arduino stream pack (18/10/10), rogue MP3 pack (v3), rogue SD pack (v4), NewSoftSerial pack (18/10/10) and ethershield pack (v1.1)
- Tested the ethernet board: I needed to rename the files from 'etherShield' to EtherShield', but then I could access the web page from my house network smiley *moment of happiness*
- Then I placed a file on the root folder of the rMP3 SD card with the characters 'D3' and carriage return to set the rMP3 module baudrate to 57600 bauds
- I uploaded a script and it works fine! smiley (Well, I had to work a bit)
- Then I tried to upload a song from the serial port using the following script and it caused problem: the quality of the music is degraded during uploading (there are small pauses of ~100ms every 100ms) and the file is not copied correctly. The function below is called when the user send 'w' on the USB port:

void writeFile()
{
  int8_t filehandle;
  uint8_t v = 8;
  
  Serial.println("Enter the name of the file:");
  Serial.read(); // flush the data
  
  while(!Serial.available()) // wait for data to arrive
  {
    Serial.print(".");
    delay(500);
  }
  int length = 0;
  name[length] = Serial.read();
  while (1)
  {
    delay(10); // wait for the next character
    if (Serial.available())
    {
      length++;
      name[length] = Serial.read();
    }
    else
    {
      break;
    }
  }
  // at that point we have the name of the file to write, so we can open a file
  filehandle = filecommands.open(strcat("/", name),open_mode(OPEN_WRITE));  
  if (filehandle<1) // in case of an error during the opening
  {
    Serial.println("Error: cannot open the file.");
    return;
  }
  // next ask for the data to write in it
  Serial.println("Load the data:");
  while(!Serial.available()) // wait for data to arrive
  {
    delay(10);
  }
  Serial.println("");
  Serial.println("Loading...");
  int i = 0;
  while (1)
  {
    i++;
    if (Serial.available())
    {
      char buf = Serial.read();
      filecommands.write(filehandle,1,&buf);// write the buffer
      //Serial.print(buf);
      i = 0;
    }
    if (i>10000)
    {
      break; // ends on timeout (maybe 10000 is a bit large)
    }
  }
  // finally, close the file
  filecommands.close(filehandle);
  
  updateSongList();
  Serial.println("Done!");
}

It is probably not the best way to copy a file of th SD card. Is there any obvious mistake or suggestions?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have another problem now: the rMP3 won't synchronise. It stops when I use the sync method.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Its getting somewhere:
I am using the ethershield library from nuelectronics, and I can now download data from a server. I have tried with google.com, and it (sort of) works smiley
About the rmp3, I can sync again (it was a problem with the compiler) but the SD card has been damaged beyond repair the last time I tried to use the module. I am not sure if that is due to a bug in the new version of the firmware, if it comes from the sync problems or if the card is just dead from old age...
Anyway, I wont have time for it before a few days. Merry christmas to you all!
Logged

Toronto, ON
Offline Offline
Full Member
***
Karma: 10
Posts: 233
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey LB01,

Same with me... Holidays are here.  I'll help out more in the new year!

Enjoy, be safe, and happy holidays!

b
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi and happy 2011 to all ! smiley-grin

I just tested my newly arrived rMP3 on an Arduino Mega 2560 with the arduino 0022 IDE.
I rerouted the rMP3 #6 and #7 pins to the mega's #19 and #18 (serial1), as per http://www.roguerobotics.com/wikidocs/code/rmp3_on_an_arduino_mega
(in fact I rerouted from the pin pads in order to be able to stack shieds above the rMP3).

Then I installed the rMP3 library, and tested the example given in the above-linked page, and it worked immediately ! GREAT !!!  8-)

I'm surprised because I thought I would have to do the "Core-stream-baseclass thing" ( http://www.roguerobotics.com/wikidocs/code/arduino_serial_base_class ) to make it work, but it seems that on the Arduino Mega, it's unneeded. Am I right ? I have the feeling it is because with the Mega's Serial1, the Softwareserial lib is not used, whereas it was on smaller boards ?

Is it so simple ? should I still do the Stream Class update for any reason, e.g. more-advanced use of the rMP3 features in the future ?
Logged

Toronto, ON
Offline Offline
Full Member
***
Karma: 10
Posts: 233
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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
« Last Edit: January 03, 2011, 04:49:43 pm by bhagman » Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 http://www.roguerobotics.com/wikidocs/code/library/arduino/roguemp3 :

Code:
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 :

Code:
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.  smiley

What do you guys think ?

Vertigo.
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
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?  smiley

Mowcius
« Last Edit: January 05, 2011, 05:33:47 am by mowcius » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :smiley ).

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 http://www.ladyada.net/make/waveshield/index.html

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 smiley-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 ?


« Last Edit: January 05, 2011, 09:22:41 am by Vertigo » Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.  smiley-wink

Mowcius
« Last Edit: January 05, 2011, 02:40:46 pm by mowcius » Logged

Toronto, ON
Offline Offline
Full Member
***
Karma: 10
Posts: 233
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Mowcius
Logged

Pages: 1 ... 8 9 [10] 11 12   Go Up
Jump to: