Simple Mp3 Player Hacking

This is a simple mp3 player hacking to use with Arduino

I don't know if this is the best way and I'm not responsible for any damage.
I'm new the the world of electronics and searched for a way to add sound to Arduino project.
Most ways I found are expensive and the cheapest I one cost around 20$
The benefit was that you can control what to play and with this next hack you can't really but we can do something with the software.
The idea is to reset the player to track 1 and remember in software the track you jump to with next/ prev options.

So here are short and simple instructions of what I did to control an mp3 player using Arduino.


I bought a simple small mp3 player, now its even available with a TF slot.

Unscrew the two screws on the side and take off the white cover.
Push the circuit with little force and it will come out on the other side.
The buttons are covered with a plastic sticker cover so just pill it off.



Now I weld thin wires on the buttons. two wires per button, one wire on the inner plate and one on the outer plate.



In the image I connected only the play/ pause and next/ prev buttons. You can do the same for the volume.

Now I connected everything to Arduino using a transistor NPN, in my case I used tip122 which what I had and used a 1K ohm resistor.
You can use other transistors, on PNP the wires will be crossed. You can also use opto-isolator.

Here is a sketch of how I connected the mp3 player switch:

The input I connected to digital input 12. The green line is the white on the mp3 image. the inner circle. The blue is the outer circle.



Since I have only one transistor I only connected the on/ off switch.

The Arduino code I tested with:

int mpPin = 12;
int val = 0;

void setup()
{
  pinMode(mpPin, OUTPUT);
  Serial.begin(9600);
  Serial.flush();
}

void loop()
{
  if (Serial.available() > 0) {
    val = Serial.read();
    Serial.println(val);
    if (val == 111) {
      MpOnOff();
    } else if (val == 112) {
      MpPlayPause();
    }
  }
}

void MpOnOff()
{
  Serial.println("On / Off");
  digitalWrite(mpPin, HIGH);
  delay(5000);
  digitalWrite(mpPin, LOW);
  delay(100);
}

void MpPlayPause()
{
  Serial.println("Play / Pause");
  digitalWrite(mpPin, HIGH);
  delay(100);
  digitalWrite(mpPin, LOW);
  delay(100);
}


Here is a short video showing the control using serial input with Arduino:

Simple Mp3 Player Hacking


Comments