Extension board · Controls and displays

SD audio player

Plays recorded sounds or spoken messages from a microSD card through a small speaker. A bought DFPlayer Mini module does the playing; choose files over a serial port with your own driver, or step through them with two push contacts.

Top view of the audio player board: the DFPlayer module in the middle, a speaker screw terminal, line-out and trigger headers and a socket on the left and right edges.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
microSDup to 32 GB, FAT16 or FAT32
9600 baud3.3 V serial control
8 Ωsmall speaker, under 3 W
Line outfor an external amplifier
2 contactsstand-alone triggers
70 × 70millimetres, four M3 holes
Never connect either speaker terminal to ground: the output is bridged. Do not use this board for safety alarms.

Tech specs

PurposeMessages for job end, errors or tool changes
ModuleDFRobot DFPlayer Mini (DFR0299), socketed; bought separately. Copies differ in behaviour
ControlSerial at 9600 baud on contacts 4 (to module) and 5 (from module), busy signal on contact 3, 1 kΩ in series each
OutputsBridged speaker terminal; line out right, left, ground
TriggersTwo contacts to ground (J5), wired to module inputs IO1 and IO2
Supply5 V from the socket; allow for peaks of several hundred milliamperes
ConnectorsScrew terminal, 2.54 mm headers with optional STEMMA JST PH alternatives (J14, J15), two Gadgeteer type U sockets (Samtec SHF-105, 1.27 mm)
Size70 × 70 mm, four M3 holes on a 60 × 60 mm pattern
Works withSmoothieboard V2 Prime header GB electrically; no firmware driver
LicenceOpen hardware, CERN-OHL-S-2.0

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side.

  1. 1
    Player module (U1) — Fit it with the card slot toward the speaker side.
  2. 2
    Speaker terminal (J3) — 8 Ω speaker between the two screws.
  3. 3
    Line out (J4) — Right, left and ground.
  4. 4
    Trigger contacts (J5) — Trigger 1, trigger 2, ground.
  5. 5
    Input socket U IN (J1) — Busy 3, transmit 4, receive 5, 5 V on 2.
  6. 6
    Chain socket CHAIN (J2) — Contacts 6 to 9 pass through.
  7. 7
    Serial resistors (R1 to R3) — 1 kΩ.
  8. 8
    Output resistors (R4 to R7) — 1 kΩ on line out and triggers.
  9. 9
    Supply capacitors (C1 to C3) — Including 220 µF for audio peaks.
  10. 10
    Chain links (JP3 to JP5) — Open as delivered.
  11. 11
    Mounting hole — One of four M3 holes.
Point at a number, or tap it, to read what the part is; the same text is in the list. On a small screen, scroll the drawing sideways.

Pinout

Signal names are from the controller’s side: transmit goes into the module.

J1: input socket (U IN)

ContactSignalUsePrime header GB
13.3 VPassed to the chain3.3 V
25 VModule supply5 V
3BUSY_HOSTPlaying indication from modulePD9
4TX_HOSTController transmitPB9 (UART1 TX)
5RX_HOSTController receivePH14 (UART1 RX)
6 to 9Passed throughNot usedPK0, PK1, PH8, PA8
10GNDGroundGND

Speaker, line out and triggers

ConnectorPins
J3Speaker 1, speaker 2
J4 or J14Right, left, ground
J5 or J15Trigger 1, trigger 2, ground

What you need

A DFPlayer MiniOriginal or compatible.
A microSD cardFAT16 or FAT32, with your audio files.
A speaker8 Ω, under 3 W.
5 V headroomFor audio peaks.
For serial controlYour own driver.

Get started

Minimum wiring: contact 2 to contact 2, 5 V; PD9, contact 3 to contact 3, busy; PB9, contact 4 to contact 4, transmit; PH14, contact 5 to contact 5, receive; contact 10 to contact 10, ground. Prime header GB (J33) Audio board J1 contact 2contact 25 V PD9, contact 3contact 3busy PB9, contact 4contact 4transmit PH14, contact 5contact 5receive contact 10contact 10ground
For stand-alone trigger use, only 5 V and ground are needed.
  1. Prepare the card

    Format it FAT32 and copy the audio files following the module maker’s naming rules; insert it into the module.

  2. Fit module and speaker

    With power off, card slot toward the speaker side; speaker on J3.

  3. Connect and power

    Plug J1 into header GB.

    The module has its own light that shows activity.

  4. Play

    Briefly connect a trigger pin to ground, or send serial commands from your driver.

    The speaker should play a file. The trigger actions are listed on the module maker’s wiki.

Configuration

You wantModuleExample
Play on commandNoneNo SmoothieV2 driver for the DFPlayer
Play from a contactNoneThe module reads J5 by itself

There is nothing to add to config.ini. Serial commands and trigger behaviour are described on the DFRobot wiki.

How it works

The module reads the card, decodes audio and drives the speaker. J1 serial9600 baud 1 kseries Modulecard, decoder J3 speakerbridged output J5 contactspush to ground 1 kseries Module IOstand-alone J4 line outto amplifier
Control inputs and audio outputs.

All decoding and amplification happen on the module. The carrier gives it a well decoupled 5 V supply, protects each signal with a series resistor and brings the outputs to connectors. Check the polarity of the busy signal on your module before depending on it.

Solder links

A serial port connects two devices only, so leave these links open.

Solder links as delivered: JP3 open; JP4 open; JP5 open. JP3 · openchain contact 3 JP4 · openchain contact 4 JP5 · openchain contact 5
The links as delivered. Close one with a small blob of solder across both pads; open it by removing the solder or cutting the copper between the pads.
LinkWhat it doesAs delivered
JP3Joins busy to the chainOpen
JP4Joins transmit to the chainOpen
JP5Joins receive to the chainOpen

Chaining

A further board can use contacts 6 to 9.

The controller's ribbon cable goes to the connector U IN of the audio player board. Inside the board each of the ten pins runs through a solder link to the connector CHAIN, where a second ribbon cable continues to the next board. A closed link passes its pin on, an open link stops it. Controller one ten-pin port audio player board U IN CHAIN pin 4, transmit stops here pin 5, receive stops here pin 6, free passed on one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of U IN leads to pin 1 of CHAIN, pin 2 to pin 2, and so on, each through its own solder link. The three lines stand for the ten pins and show the links as delivered. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. Serial signals stop here; pin 6 is wired straight through.
ContactSignalOn CHAIN
1, 2, 10Power and groundPassed on
3 to 5Busy and serialStopped by open links
6 to 9FreePassed on

Troubleshooting

SymptomLikely causeWhat to check
SilentNo card, wrong format, or speaker looseCard, file names, J3
No serial replyTX and RX crossed or wrong baudTest points M_RX and M_TX; 9600 baud
Module resets when loud5 V dipsLower the volume; improve the supply
Busy signal invertedModule variantInvert it in software
Trigger does nothingContact not to ground, or module variantJ5 wiring; maker’s wiki
Light Meaning
Light on the module Module activity, as defined by the module maker

Still stuck? Read how to ask for help or see the general troubleshooting guide.

Downloads

FileWhat it is
Schematic (PDF)The circuit diagram
Parts list (CSV)Every component with its value, footprint and part number where one is chosen
Board drawing (PNG)The top view used on this page
3D view, top (PNG)Rendered from the design files; the module model is approximate
3D view, angled (PNG)Rendered from the design files; the module model is approximate

Appendix: mounting dimensions

For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side. Leave access to the card.

Mounting drawing of the audio player board, component side: outline 70 by 70 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 70 70 0, 0 X Y 1 5.00, 5.00 2 65.00, 5.00 3 5.00, 65.00 4 65.00, 65.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 70 × 70 mm, corners rounded to a 1 mm radius, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
15.005.003.2 mm, not platedMounting, M3 screw
265.005.003.2 mm, not platedMounting, M3 screw
35.0065.003.2 mm, not platedMounting, M3 screw
465.0065.003.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.

ParameterApplies toLowerNominalUpperBasis
Supply5 V3.2 V5 V5 VModule maker
SerialContacts 4, 5—9600 baud, 3.3 V—Module maker
SpeakerJ3—8 Ω3 WModule maker
Serial edge timeModule input—66 ns5 µsSimulated
High level at moduleModule input3.0 V3.3 V3.35 VSimulated
5 V dip on an assumed 0.6 A, 100 µs peak5 V—0.11 V0.35 VSimulated

Component stress limits

PartLimitUse on this board
Speaker outputBridgedNever ground or short it
5 V supplyShared host regulatorAudio peaks
Capacitors10 V and 16 V5 V

Appendix: simulation

The serial input and the supply dip during an audio peak were simulated with ngspice; the peak current is an assumption.

Each simulated value (yellow mark) against its allowed range (green band). Serial edge at the module (bit time 104 us)65.8 ns High level3.3 V 5 V droop for an assumed 0.6 A, 100 us audio peak107 mV
Simulated value (yellow) against the limit used for it (green). Each bar has its own scale.
ResultSimulated valueLimitOutcome
Serial edge at the module (bit time 104 us)65.8 nsat most 5 µsWithin
High level3.3 V3 V to 3.35 VWithin
5 V droop for an assumed 0.6 A, 100 us audio peak107 mVat most 350 mVWithin

Not simulated: the module, audio quality and its real current.

Appendix: datasheet

The first page of the module data sheet. Click the page to open the PDF. It is a distributor copy.

First page of the DFPlayer Mini (DFR0299) datasheet
DFPlayer Mini (DFR0299) — DFRobot, 2 pages.

See all boards on the extension boards page.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.