Sound Card Assembly Guide

Table of contents
  1. Sound Card Assembly Guide
    1. Introduction
      1. System Overview:
    2. Assembly and Component Placement
    3. Tools Required
    4. Safety Precautions
    5. Testing and Verification
    6. Visual Inspection
    7. Connectivity Testing
    8. Power-Up Tests
    9. Functional Testing
      1. I2C Verification
      2. MP3 Player Verification
    10. Troubleshooting
    11. Appendences
      1. Specifications
      2. How It Works
      3. Connections
      4. Protection
      5. References

Introduction

See the How to Use Assembly Guides for detailed instructions.

Sound Card

The Sound Card is a key component in the LCC Fusion Node system, designed to bring audio capabilities to model train layouts and other automation projects. By utilizing up to four low-cost MP3 players, the Sound Card enables the simultaneous playback of multiple sounds, triggered through LCC (Layout Command Control) Events. This feature makes it ideal for creating automated sound effects such as ambient noises, train sounds, and announcements, enhancing the realism of your layout.

The Sound Card works by interfacing with DFPlayer modules to play preloaded MP3 files in response to LCC events. Sounds can be played, stopped, or looped based on various conditions or triggers within the layout automation system. Each of the four DFPlayer modules can handle a separate audio stream, allowing you to control different sound sources at the same time.

The Sound Card integrates up to four DFPlayer modules, each capable of converting MP3 files into an audio stream. These audio streams are output to speakers, making the Sound Card a versatile solution for playing sound effects in your layout.

Key Features

  • Supports up to four DFPlayer MP3 modules, allowing simultaneous playback of different sound effects.
  • Triggered by LCC Events: The playback of MP3 files is controlled through LCC commands, enabling dynamic interaction with the layout.
  • Integration with the I/O Breakout Board: Audio streams are routed through the I/O Breakout Board and can be connected to multiple speakers.
  • Versatile Audio Control: Each MP3 module can handle separate audio files, making it easy to assign unique sounds to different events or areas of your layout.

Use Cases

  • Train Whistles and Horns: Automatically play train-related sounds when the LCC system detects certain conditions, such as a train approaching a station or a signal changing.
  • Station Announcements: Play station announcements when triggered by events like train arrival or departure.
  • Ambient Sounds: Set up background sounds (such as birds chirping or city noises) that loop in specific areas of the layout.

System Overview:

The Sound Card interfaces with the LCC Fusion Node Card, which handles the LCC Events. Once an event is triggered (such as a train passing a sensor or a control panel command), the corresponding MP3 file is played on one of the four connected DFPlayer modules. The output from the DFPlayers is routed through the I/O Breakout Board to speakers located across the layout, ensuring immersive sound throughout the environment.

flowchart LR; 
s((speakers));
subgraph layout ["Train Layout"];
direction LR;
n[Node Card] --> c["Sound Card<br/>(DF Players)"];
c --> bb[I/O Breakout Board] --> |"Audio Stream<br/> (wires)"| s;
c --> |"Audo Stream <br/> (wires)"| s;
end;
classDef lSalmonStyle fill:#FFA07A,stroke:#333,stroke-width:2px,font-size:24px;
class c lSalmonStyle;
classDef lightGrayStyle fill:#d3d3d3,stroke:#333,stroke-width:2px,font-size:24px;
class layout lightGrayStyle; 
## Terminology

For other terms, please refer to the full Terminology Guide.

Assembly and Component Placement

This section combines both the component specifications and the assembly instructions to ensure a smooth assembly process. Below is a comprehensive list of components, their placement on the PCB, and orientation details to assist you during assembly.

High-Level Steps for Assembly:

Below is a list of the PCB components used for this card (see diagram before reference):

Print PCB Sound Card PCB
Print
Component Identifier Count Type Value/Description Package Purpose Orientation
Diodes            
D1, D2 2 ESD Diode PESD1CAN SOT-23 SMD I2C data bus electrostatic discharge (ESD) protection Fits only one way
Filters & Noise Suppression            
FB1, FB2 2 Ferrite Bead BLM31PG121SN1L 1206 SMD I2C Network Bus Data Line Noise Suppression None
Connectors            
J1 1 RJ45 Socket 8P8C PTH Speaker connections Fits only one way
J2-J5 4 Spring Terminal 8-Pin, 2.54mm PTH Speaker connections None
J6-J9 4 Male Headers 2-Pin, 2.54mm PTH Earphone/Speaker connections for testing None
J11-J14 8 Female Headers or Male Pins 8-Pin, 2.54mm PTH Socktet mount for DFRobots DFPlayer Mini (or compatible MP3-TF-16P player) to play files from mini-SD card None
Resistors            
R1 1 Resistor 15kΩ 1206 SMD Limits the current to the Tact button and MP3 player (volume+ long press) None
R2, R4-7 5 Resistor 33kΩ 1206 SMD Limits the current to the Tact button and MP3 player (play/pause function) None
R3 1 Resistor 24kΩ 1206 SMD Limits the current to the Tact button and MP3 player (volume- long press) None
R7-R9 3 Resistor 10kΩ 1206 SMD Limits the current to SW1 and ESP32 for the I2C address None
Selectors & Indicators            
JP1, JP2 2 Male Header 3P, 0.1” spacing PTH Used to set the I2C bus to be used (A or B). These are the ESP32 hardware buses used for serial communications (0 or 1). None
SH1, SH2 2 Jumper Cap Jumper Cap (2.54mm) 2.54mm Used with I2C Bus selection None
SW1 1 DIP / Slide Switch 3P, 2.54mm PTH Sets I2C address offset (0-7), added to base address of ESP32 (0x10). Position so switch so ON is towards PCB top edge
SW2-SW6 5 Tact Button N/A SMD Controls for play/pause, and volume + / - (player 1) Fits only one way
ICs            
U1 1 ESP32 Module ESP32 DevKitC DevKitC Processes I2C text messages from the Node Card and sends player commands via UART Position USB connection to PCB right edge
Storage 1 per player MicroSD Card N/A N/A Stores MP3 files to play (one per player). Filenames must be formatted as 000nn.mp3, where nn is a number from 1-100. N/A

Tools Required

List of recommended tools.

Safety Precautions

Testing and Verification

The following test and verifications of the card should be performed after a through inspection of the card’s soldering. Check all of the PTH component pins and SMD pads. Make sure there are no solder bridges between pins and pads.

  1. Insert MP3 player devices. Position the players using the diagram on the PCB. The SD card slot should be facing out.
  2. Insert ESP32, using diagram on the PCB. USB-C socket should face outward. Note, firmware is loaded before inserting ESP32 into headers.
  3. Add pair of Jumper Shunts to JP10 to set the I2C communications bus (A or B). Insure that both I2C lines are set to the same A or B value.
  4. Set I2C communications address using slide DIP switch (SW1). Address can be set to 0 thru 7. This value must match the card’s configuration in the CDI.
  5. Attached speaker wires to the spring terminal connector(s) and/or using network cable (CAT5/6) using RJ45 socket.
  6. Install card into Node Bus Hub, along with a LCC Fusion Node Card for testing.

Note that cards must be orientated in Node Bus Hub to align their card key with Node Bus Hub cutout.

Visual Inspection

  1. Initial Check: Examine the board for any obvious issues like missing components, solder bridges, or components that are misaligned or not fully seated.

  2. Solder Joint Inspection: Use a magnifying glass or a microscope to inspect solder joints. Look for cold solder joints, insufficient or excessive solder, or any shorts between pads.

  3. Component Orientation: the IC’s are correctly oriented according to the PCB silkscreen or schematic.

Connectivity Testing

  1. Continuity Check: Use a multimeter in continuity mode to check for shorts between power rails and ground, and to ensure there are no open circuits in critical connections.

Power-Up Tests

  1. Apply Power: Check for correct voltage levels at these locations:
    1. Using the tabs at the base of the card, verify at the base of the card that the LCC Fusion Node Bus Hubis providing 3V3, 5V, and 12+V. If verification fails, there is a component that is not installed correctly, or a solder bridge.
  2. Check for Hot Components: Feel for components that are overheating, which could indicate a problem like a short circuit or incorrect component.

Functional Testing

I2C Verification

  1. Verify that the I2C connection between the LCC Fusion Node Card and the IO Card work. See Testing I2C Cards for details on how to test the I2C for a I2C enabled card.

MP3 Player Verification

After validating the LCC Fusion Node Card can connect with the IO card, test each of the MP3 players as follows:

Troubleshooting

Appendences

Specifications

The card has the following:

Characteristic Value
MP4 Players 1 1-4
# Speakers 2 1-4
Max MP3 per player 100
  1. Requires a mini MP3 player. Supported players are the DFRobots DFPlayer Mini and compatible (MP3-TF-16P player)
  2. 4 watts @ 4-8 Ω

How It Works

The following outlines the flow of activity for the Sound Card:

flowchart LR;
  network["LCC Network"];
  cdi[("CDI Data")];
  fNodeFw("Firmware<br/>(ESP32)");
  fIoFw("Firmware<br/>(ESP32)");
  cs("Communications Bus/Address");
  
  p["DF Players (4x)<br/>(converts mp4 to audio)"];
  sp1(("Speakers"));
  sp2(("Speakers"));
  sd[("SD Reader")];
  
  subgraph layout ["Train Layout"];
  	direction LR;
      subgraph fIoCard ["Sound Card (16x)"];
        direction LR;
        fIoFw -->|"DF Player cmds<br/>(UART Serial Comm)"| p;
        sd -->|".mp4 file"| p;
        cs --> fIoFw;
      end
      subgraph fIoBb ["I/O<br/>Breakout Board"];
      	direction LR;
      end
      subgraph fHubBb ["Node Bus Hub<br/>Breakout Board"];
    	  direction LR;
      end
      subgraph fNodeCard ["Node Card"];
        direction LR;
        cdi --> |"Config"| fNodeFw;
      end
   	  fNodeFw --> |"Text Command (player#, file#, cmd)"| fHubBb --> fIoFw;
   	  network --> |"LCC Events<br/>(cable/WiFi/Now)"| fNodeFw;
   	  p --> |"Audio Stream<br/>(cable)"| fIoBb;
      fIoBb --> |"Audio Stream<br/>(wire)"| sp2;
      p --> |"Audio Stream<br/>(wire)"| sp1;
    end

  classDef blueStyle fill:#ADD8E6,stroke:#333,stroke-width:2px,font-size:24px;
  class fNodeCard blueStyle;
  classDef cyanStyle fill:#00FFFF,stroke:#333,stroke-width:2px,font-size:24px;
  class fIoCard cyanStyle;
  classDef lSalmonStyle fill:#FFA07A,stroke:#333,stroke-width:2px,font-size:24px;
  class fHubBb,fIoBb lSalmonStyle;
  classDef lightGrayStyle fill:#d3d3d3,stroke:#333,stroke-width:2px,font-size:24px;
  class layout lightGrayStyle;  
  1. Activity starts with an LCC Event sound related event being received by an LCC Fusion Node Card (firmware)

  2. The LCC Node uses the Sound Card’s CDI configuration information to determine the I2C address of the card

  3. A unique text message is sent to the Sound Card via I2C communications. The text message indicates one of the following:

    • play a specific mp3 file at the specified volume from a specific player (1-4). MP3 files are identified by their relative file number (0001xxx.mp3, 0002yyyy.mp3, etc.)

    • loop a specific MP3 file continuously

    • pause playing the current MP3 file on a specific player device

    • reset causes the MP3 players saved setting to be reset (setting are saved by default to NVS)

  4. The Sound Card’s ESP32 devices processes the message and uses UART serial communications to connect to the specified MP3 device and sends MP3 commands to the player (play/pause, file #, and volume level)

  5. MP3 player device plays/pauses the MP3. MP3 files are loaded from micro-SD card inserted in the player’s SD card reader.

Connections

Component Designator Connector Label Connector Type Connection Number Description
J1 SPEAKERS 1-4 RJ45 Socket 1/2, 3/4, 5/6, 7/8 Pairs of connections to 4 speakers
J2, J3, J4, J5 SPKR 1 - SPKR4 JST XH, Spring Terminal n/a Pairs of connections to 4 speakers
J6, J7, J8, J9 SPEAKER Male Header n/a Connection to player’s speaker
JP1, JP2 COMM BUS Male Header A, B COMM BUS selection (I2C hardware bus) for BUS A or BUS B. Must match configuration in the LCC Node CDI setup.
SW1 COMM ADDR Slide Switch 1, 2, 3 COMM ADDR selection (I2C address offset 0-7). Added to base address of MCP23017 (0x20). Configure for CDI setup.
SW3, SW5, SW6, SW7 PAUSE/PLAY Tact Button n/a Pause / Play of sound files
SW2, SW4 VOL +/- Tact Button n/a Vol + and - for Player 1

Protection

The Sound Card is equipped with several protective components to ensure reliable operation and safeguard the board and connected devices from potential electrical issues. Below is an overview of the protection mechanisms implemented:

Print
Protected Component Protection Component Function Specifications Location
I2C Communication Lines PESD1CAN Diode Protects the I2C lines from ESD (Electrostatic Discharge) and other electrical surges. Clamping voltage: 24 V max Located on I2C data (SDA, SCL) lines.
I2C Communication Lines BLM31 Diodes Provides additional protection to the I2C lines by filtering out high-frequency noise and protecting against voltage spikes. Bidirectional TVS diode Positioned along I2C communication lines.
I2C Address Selector 10kΩ Current Limiting Resistors Limits the current on the I2C address configuration pins, preventing excessive current from damaging the MCP23017. 10kΩ resistors On the I2C address offset selector switches.

References

  1. DFPlayer Specifications
  2. DFPlayer Purchase (AliExpress)
  3. MP3Gain tool for configuring the gain (sound level) of MP3 files
  4. Micro SD Cards (AliExpress) - recommend low cost 2GB-4GB cards
  5. ESP32 DevKitC Module - 38Pin ESP32 DevKitC with ESP32-WROOM-32D

Last updated on: May 10, 2025 © 2025 Pat Fleming