0
\$\begingroup\$

I'm building an MP3 player into a photo frame for an art project. The frame is being mounted with three LEDs. When power is turned on, it will play an mp3 track too.

I'm waiting for the kit to arrive but I really don't know if I should just use a 9V battery off the shelf or lithium rechargeable - what and where capacitors are needed.

I'm a bit lost.

Does anyone have any advice?

One 3 watt 8 ohm speaker

DFplayer 5V

Mp3 plY

Three 3V LEDs (pre soldered resistors)

I mocked this up:

enter image description here

I've been given this as a plan of action:

  • Connect the positive (red) wire from your 9V battery to the VIN pin on your LDO regulator.
  • Connect the negative (black) wire from your 9V battery to the GND pin on your LDO regulator, as well as to the GND pin on each of your LED lights and your MP3 player.
  • Connect a 10µF capacitor between the VIN and GND pins on your LDO regulator.
  • Connect a 1µF capacitor between the VOUT and GND pins on your LDO regulator.
  • Connect a 330Ω resistor in series with each of your LED lights, connecting one end of the resistor to the LED's positive pin and the other end to GND.
  • Connect the positive pin of your MP3 player to the VOUT pin on your LDO regulator, and the negative pin to GND.
  • Connect a button between the VIN pin and a digital input pin on your microcontroller. When the button is pressed, the digital input will read high, and you can turn on the LEDs and play the MP3.
\$\endgroup\$
7
  • \$\begingroup\$ There should be an e-book tutorial about how to use this mp3 player. You will need a stabilized voltage for it, just a resistor in the supply line will not work properly. \$\endgroup\$
    – Jens
    Commented Apr 20, 2023 at 9:40
  • \$\begingroup\$ @Jens - Thanks for the reply - I have the pin out for the player and know what Im doing with it but I have no knowledge in safely powering it and the leds together. - Ive posted the image of the spec for the player \$\endgroup\$ Commented Apr 20, 2023 at 10:27
  • \$\begingroup\$ You could use a voltage stabiliser (e.g. 7805), but an easy alternative is to use a cheap USB powerbank. Cut up a standard USB cable and attach the power wires to your player. \$\endgroup\$
    – Paul
    Commented Apr 20, 2023 at 11:20
  • \$\begingroup\$ Do you think this player will start playback without any interaction? \$\endgroup\$
    – Jens
    Commented Apr 20, 2023 at 17:59
  • \$\begingroup\$ Is that switch to toggle power on/off or to short-circuit the battery? So far you've achieved the latter \$\endgroup\$
    – Maple
    Commented Apr 21, 2023 at 6:09

1 Answer 1

0
\$\begingroup\$

To work out what battery you need, first calculate how many (milli)amp-hours you want. Add up the current draw of all the components. Then multiply by the number of hours you expect the battery to last. That gives you a figure in amp-hours or milliamp-hours.

Then look around for a battery that will meet that need. For non-rechargeables, find a good manufacturer (e.g. Duracell) who provide datasheets.


For the MP3 player, you probably want a proper voltage regulator, as the current it needs depends on how loud the sound is. You can get 3-pin low drop out (LDO) regulators that only need two capacitors to work properly. That's three small components.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks Simon much appreciated! \$\endgroup\$ Commented Apr 21, 2023 at 10:40
  • \$\begingroup\$ The specs for the MP3 player does not say or show it can drive a speaker. The tiny speaker has no audio specs and will sound awful. \$\endgroup\$
    – Audioguru
    Commented Apr 21, 2023 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.