Not a failure anymore! Thanks to Viraj's advice, by connecting the audio ground to GND, the USB works fine as well.
I also found this rather brief instructable, which shows how to connect the buttons, basically shorting V+, V-, Mode and P to the ground.
The module takes around 53mA when playing the radio, and about 90mA when playing from USB stick (medium volume and using headphones). The current would be lower with the LED display turned off (I guess that display itself takes at least 20mA). So a small-sized LiPo battery of 300-500mAh could last a few good hours.
Now that it's all kind-of figured out, this small module could be integrated into a larger project, eventually controlled by Arduino; radio alarm clock comes to mind. (I wish the module had integrated RTC and work as clock as well.)
These modules, manufactured by Vire, seem to be used in a lot of devices. They also come in various formats and shapes, with different displays (LCD, for example). They can be bought from alibaba.com in bulk for about $5.
There are also variations of the small Vire module, probably made by other manufacturers, that include the extras (SD card socket, infrared receiver, USB socket, buttons). These, like the one pictured below (from dealextreme), retail for under $15.
On the other hand, they can be bought as finished consumer products (encased, even including the LiPo battery and charger, cables, speaker) for about $15 (ebay, dealextreme, amazon).
This is a posting about failure. I wanted to document it before I shelve it and forget about it.
A while back I bought an "FM radio and MP3 player" module, with the purpose of integrating it with an Arduino. (I looked into many other FM radio modules, but this seemed the lowest cost and easiest to interface.) Here it is in the photo below.
The FM radio module I received was capable of much more than just digital radio receiving, it seemed:
- show, on a 3 1/2 7-segment LED display, the FM radio station frequency (MHz);
- scan FM range and memorize up to 30 stations;
- control from an infrared receiver, with the provided (included) remote control;
- play MP3 files from USB memory stick or SD card;
- interpret and execute complex commands: volume up/down, mute, repeat, equalizer (5 types, preset).
With no application note/schematic/datasheet, the only way to connect it was to resort on the names of the pins found on the silkscreen.
The bottom connector has the following pins:
L, G, R, V+, MODE, V, P, G, IR, 3V3
I correctly assumed that L is "Left audio channel", "G" is ground, "R" is right audio channel, "IR" is infrared input from an external infrared receiver.
I assumed incorrectly that "P" is positive (Vcc), because pins P-G-IR coincide with the terminals of the infrared receiver.
Once powered (5V), the radio, which is the default mode, starts working and an FM frequency is shown on the display. The only way to control the module at this point was through the remote control. After re-connecting the Vcc of the infrared receiver from pin "P" to "5V", the remote control started to work.
So far so good. Now, on to the MP3 player and USB.
I managed to get the schematic for the module
which showed how to wire the 4 pins of an USB type-A connector: GND, DP, DM, 5V. These are the 4 bottom pins of the lateral 10-pin connector.
With the USB memory stick (with a few MP3 tracks on it) inserted, the module seems to be reading it: the LED on the USB stick flickers. But, and this is where the failure is, there is no sound in the headphones, as it is when the radio is active.
While struggling with this module, I found a radio+MP3 player device that I believe uses internally a similar one. The major difference seems to be the display, which is LCD instead of LED.
I tested the USB memory stick with it and it plays just perfect.
I tried to open it up to look at its internals, but it seems to be glued together with no chance to put it back once opened. The case is made of pressed particle board, covered in some plastic veneer. There are just 4 screws in the back, which I was able to remove for a peek inside.
The box is mostly empty, except for the 2 side speakers and a rechargeable battery glued to the top (green object in the photo above). The small board shown is the audio amplifier. The FM+MP3 module is in the front of the enclosure, I guess, together with the LCD display and the sockets for USB type-A and SD card,
So here is what I have so far:
- Both modules I have behave the same (USB mode is "silent", no sound from the USB memory stick), although the USB stick seems to be read correctly, based on the flickering LED.
- The audio part works fine, since the radio is audible.
- I double checked my connections, the 4 wires from the module to the USB connector (proof is that the USB seems to be read, as well).
- I made sure the MP3 files are accessible and playable by a similar device.
I ran out of ideas. Looking at the schematics, I realize that it could be also a software (microcontroller) bug. The audio signal is output by the microcontroller through pins 14 (DAC_L) and 16 (DAC_R), I assume.
Since the radio works (using the same pins), I also assume that these pins are correctly connected to the audio amplifier.