BY8001 16P mp3 module doesn't work with library's commands

Hello,

First of all, I'd like to apologize for my lack of knowledge or any mistakes about this post.

I choose to make a smart clock for my licence diploma with multiple functionalities including audio player. I am using BY8001 module with an SD card from Kingston with 16GB. The problem is that the led of my mp3 module doesn't turn on. It's off all the time, even if the rest of the modules and sensors are working, so it has 5V and GND. I've connected VCC, GND, 1st and 2nd speaker and the RX (RX with 1ohm resistor) and TX. It's working only if I send an impulse from GND, then the LED is on. But I need to control the module from my code, using the library's function (I mean next song, play, pause; I have an interface for them using an TFT LCD).
Searching, I found some informations about the fact that the A,B and C resistors need to be removed in order for this functions to work. (B is already removed from factory)

Please help me with some advices, if this is what I need, because I have only 1 piece to broke, for testing.

Here is a part of the code to see the specific functions which I need to use, but first, I need to make the module to turn on like the others when plugging the cable into a source.

if ((x >= 116) && (x <= 204) && (y >= 77) && (y <= 165))
      {
        if (status_redare == '0')
        {
          drawFrame(159, 121, 42);
          drawPauseButton();
          mp3.playTrackFromFolder(00, 001);
          delay(100);
          status_redare = '2';
          return;
        }
        if (status_redare == '1')
        {
          drawFrame(159, 121, 42);
          drawPauseButton();
          mp3.play();
          delay(100);
          status_redare = '2';
          return;
        }
        if (status_redare == '2')
        {
          drawFrame(159, 121, 42);
          drawPlayButton();
          mp3.pause();
          delay(100);
          status_redare = '1';
          return;
        }
      }

It would be more useful to have links to the module's datasheet/manual and to whatever library you are using. And the COMPLETE code not just a little snippet of it.

Steve

I use the official library and here is the link:

Datasheet:
http://www.picaxe.com/docs/by8001.pdf

About the full code, due the fact that it’s my licence, I’m not allowed to post the entire code.
What can I say is that I have the necesary objects as BY8001, SoftwareSerial(pins 10&11), I initialize them, but the module is still off, isn’t working at all while the other sensors are working fine. While the led from the module is not on, I don’t think that the code is involved in this problem.
Thanks and sorry!

p_andrew:
It's working only if I send an impulse from GND, then the LED is on.

I don't understand what this means. How do you send an impulse from GND? Do you mean you short one of the pins to GND. If so WHICH pin? You do know that the LED is only intended to be on when a track is playing?

Anyway what Arduino do you have and how is it powered? If you are trying to power this MP3 board as well as a number of other modules and sensors all from the Arduino 5V pin that maybe guess you are overloading the internal regulator or the power source. Which of those will depend on how you are powering everything.

Steve

When I say impulse I’m referring to a cable connected to GND and while the mp3 module is on a breadboard, I enter the pin in the IO_1 place and I take it out immediately. It’s there for 1 sec and it’s enough to start.

I didn’t know that the led is on just when it’s playing something...

I’m using Arduino Mega AT2560 with a breadboard to split the power from the 5V spot and I connected all to my laptop’s USB port.

O.k. so I'm not sure if there's still any problem. Have you removed all 3 resistors A,B and C. The fact that it does something when you short one of the key trigger pins suggests not.

Have you actually tried playing anything from your code? Do any of the commands do anything? Can you put some debug Serial.prints in so you can see if it's actually getting to the mp3 commands?

Steve

slipstick:
O.k. so I'm not sure if there's still any problem. Have you removed all 3 resistors A,B and C. The fact that it does something when you short one of the key trigger pins suggests not.

Have you actually tried playing anything from your code? Do any of the commands do anything? Can you put some debug Serial.prints in so you can see if it's actually getting to the mp3 commands?

Steve

I didn't removed the resistors. As I said in my initial post, I found about the fact that I may need to remove them, but having just 1 piece for testing, I've asked for advices here. So, no, the resistors are NOT removed yet. Is this the solution I'm searching for?

And yes, I've put some code for debug and it's getting the mp3 commands.
Here is a sketch I've made just to see if it's getting the commands and I see my Serial prints in Terminal.

#include <SoftwareSerial.h>
#include <BY8001.h>

SoftwareSerial mp3Serial(10, 11);  // RX, TX
BY8001 mp3;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);  // set serial monitor baud rate to Arduino IDE
  mp3Serial.begin(9600);  // BY8001 set to 9600 baud (required)
  mp3.setup(mp3Serial); // tell BY8001 library which serial port to use.
  delay(800);  // allow time for BY8001 cold boot; may adjust depending on flash storage size
}

void loop() {
  // put your main code here, to run repeatedly:
  mp3.setVolume(15);
  Serial.print("Volume");
  mp3.playTrackFromFolder(0000, 0001);
  Serial.println("Folder");
  delay(5000);
  mp3.playTrackByIndexNumber(0002);
  Serial.println("Index");
  delay(5000);
  mp3.pause();
}

Outside my knowledge now...the only one I've ever used had no resistors but from the manual it looks like it should work with your default setup. Are you sure the serial connections are correct Arduino Tx to MP3 Rx etc? It might be worth trying it with a smaller SD card (2Gb maybe) because they're said to be temperamental with larger cards.

Other than that I'm out of ideas. Let's hope someone with better knowledge comes along.

Steve

slipstick:
Outside my knowledge now...the only one I've ever used had no resistors but from the manual it looks like it should work with your default setup. Are you sure the serial connections are correct Arduino Tx to MP3 Rx etc? It might be worth trying it with a smaller SD card (2Gb maybe) because they're said to be temperamental with larger cards.

Other than that I'm out of ideas. Let's hope someone with better knowledge comes along.

Steve

I removed the A,B and C resistors and the result is the same, unfortunately. I connected the RX of the mp3 module to pin 10 with 1ohm resistor and the TX with pin 11, but I changed the pins with 0 and 1 which are RX and TX and still nothing.

Thank you for your help!

p_andrew:
I removed the A,B and C resistors and the result is the same, unfortunately. I connected the RX of the mp3 module to pin 10 with 1ohm resistor and the TX with pin 11, but I changed the pins with 0 and 1 which are RX and TX and still nothing.

That's the wrong way round. As I said before it goes RX to TX and TX to RX. That's how serial connections always work.

The MP3 RX (pin2) should connect to Arduino TX (pin11). MP3 TX (pin3) to Arduino RX (pin10). Or if you're using Serial then it's pin2 to pin1 and pin3 to pin 0. And the resistor should be 1K not 1 Ohm.

Steve

slipstick:
That's the wrong way round. As I said before it goes RX to TX and TX to RX. That's how serial connections always work.

The MP3 RX (pin2) should connect to Arduino TX (pin11). MP3 TX (pin3) to Arduino RX (pin10). Or if you're using Serial then it's pin2 to pin1 and pin3 to pin 0. And the resistor should be 1K not 1 Ohm.

Steve

Ok, so I've made the changes and for the sketch uploaded earlier it worked if I removed the RX and TX pins when the code is uploading to the board. Not only that I can see the serial prints, but it does what the code says. I choose the 9 and 10 pin after I read about RX pins here:
https://www.arduino.cc/en/Reference/softwareSerial

Thanks a lot!

Now, the problem is that when I connect everything with the other sensors, the speakers are doing some noise. I put some debug code and I can see the serial prints where the commands are called, but they aren't working, again.
Do you have any ideeas why is this happening? I mean I just switched the boards because on the other I have all the sensors and now isn't working anymore.

I have no idea what your code or your connections look like now so no I don't know what might be wrong. Sorry.

Steve