Audio Card Assembly Guide

LCC Fusion Project

Pat Fleming

Audio Card Assembly Guide

Introduction

See the How to Use Assembly Guides for detailed instructions.

Audio Card

The Audio Card works in conjunction with the LCC Fusion Node Card and a Node Bus Hub to provide advanced audio playback capabilities, including text-to-speech and .wav file playback, through up to four connected speakers. The Audio Card allows administrators to assign specific LCC Event IDs to trigger the playback of either pre-recorded sounds or synthesized speech, which is highly configurable via the LCC Configuration Tool.

Typical applications for the Audio Card include: - Audio feedback for LCC system users: - Playback of error notifications, system status updates, and operational messages. - User-defined voice messages triggered by specific LCC Event IDs configured through the CDI (Configuration Description Information).

The Audio Card also integrates with other LCC modules, enabling synchronized responses across devices for complex audio-visual effects on model train layouts.


Hardware Configuration and Features

The Audio Card is equipped with a robust hardware setup designed to handle both text-to-speech conversion and high-quality audio playback from external sound files. Its hardware configuration includes:

ESP32 DevKit-C Module:

The core of the Audio Card, the ESP32, runs the firmware responsible for managing both text-to-speech (TTS) and audio file playback capabilities:

Audio Amplifier:

The Audio Card supports up to four MAX98357A IC audio amplifiers, capable of sending audio signals to individual speakers. These amplifiers feature the following:

Power Supply and Configuration:

Communication and Control:

Use Case Scenarios

The Audio Card is designed for multiple use cases in model train layout automation, where immersive audio effects and feedback are critical:

System Overview:

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

Mermaid diagram

` Diagram Explanation

Here’s an explanation of the diagram above. Click to listen to an audio explanation.

Audio (mp3)

The Audio Card interfaces with the LCC Fusion Node Card, which processes and triggers LCC Events. When an event is triggered (such as a sensor detecting a train or a command issued from the control panel), the Audio Card plays the corresponding audio message or sound effect. The system can perform either text-to-speech conversion or playback pre-recorded .wav files stored on the micro-SD card.

Audio Playback Process:

This flexible design ensures that audio feedback, from synthesized voice messages to rich sound effects, is an integral part of the model train layout, enhancing both the realism and interactivity of the environment.

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):

Node Card PCB
Component Identifier Count Type Value Package Purpose Orientation
Capacitors
C1, C3, C5, C7, C9, C11, C13 7 Capacitor-Ceramic 0.1uF 1206 SMD Decoupling Capacitor for IC Protection None
C2, C4, C6, C8, C10, C12, C14 7 Capacitor-Ceramic 10uF 1206 SMD Decoupling Capacitor for IC Protection None
Diodes
D1 - D8 8 Diode-Schottky SS310 SMD Circuit protection from reverse current from speaker connections. Cathode end has a white line and positioned towards PCB left edge
D5 1 ESD Diode PESD1CAN SOT-23 SMD I2C data bus electrostatic discharge (ESD) Cathode end has a white line and positioned towards PCB left edge
Fuses & Protection
F1 1 Fuse-PTC Polymer 0.2A, 3V (or higher) 1206 SMD Protects overload from SD Module None
F2 1 Fuse-PTC Polymer 1A, 5V (or higher) 1206 SMD Protects overload from audio speakers None
Filters & Noise Suppression
FB1, FB2 2 Ferrite Bead BLM31PG121 1206 SMD I2C Network Bus Data Line Noise Suppression None
FB3, FB4 2 Ferrite Bead BLM31PG121 1206 SMD 3V3 Noise Suppression for SD card reader and I2C display None
Connectors
J1 - J4 4 JST XH Socket or 2-Position Spring Terminal Connector 2P, 2.54mm PTH, vertical or horizontalPTH or Spring Terminal Connectors to speakers None
J5 1 RJ45 Socket 8P8C PTH Network cable (CAT5/6) connections to speakers (4 pairs). Fits only one way
J6, J7 2 Female Header 19-Pin PTH Socket for ESP32 DevKit-C board None
J8 1 Female Header 8-Pin PTH Required when using Micro-SD Card Reader for playing .wav files. None
J9 1 Female header 2-Pin, 2.54mm PTH OLED Display Connection None
Resistors
R1, R2, R3 3 Resistor 1kΩ 1206 SMD Used to limit the current to SW1 and MCP23017 for the I2C address None
R4 1 Resistor 3.3kΩ 1206 SMD Current limiting for LED None
R5 1 Resistor 10k Ω 1206 SMD Voltage Divider (high/low ends) None
R6 1 Resistor 1.8k Ω 1206 SMD Voltage Divider (high/low ends) None
Switches & Indicators
LED1 1 LED (Red) 2 mA 1206 SMD 5V Power Indicator Reference back of LED, position cathode towards PCB left edgeImage
JP1, JP2 2 Male Header 3P, 0.1” PTH Used for COMM BUS selection (I2C hardware bus) for either BUS A or BUS B. None
SH1, SH2 2 Jumper Cap (Shunt) 2.54mm - Used to set the COMM BUS selection (JP1, JP2) None
SW1 1 Slide Switch 3P, 2.54mm PTH Used for COMM ADDR selection (I2C address offset, 0-7). Position ON towards PCB top edge
ICs
U1, U2, U3, U4 4 Audio Amp MAX98357A 16TQFN Class D audio amplifier supporting I2S connections Small dot (pin 1) on package is positioned to PCB bottom and right edges
U5 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 bottom edge
Miscellaneous
Micro-SD Card Reader 1 Module SPI N/A Micro-SD Card Reader is required for playing .wav files.
Micro-SD Card 1 SD Card N/A N/A Required for storing .wav files. N/A
1 OLED Display SSD1309, SSD1306 4-Pin, I2C Display serial messages from firmware Refer to silk screen of OLED and card, display extends out from card.

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.

Visual Inspection

  1. 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.
  2. Component Orientation: the IC’s are correctly oriented according to the PCB silkscreen or schematic.

Power-Up Tests

  1. Seat the Audio Card Insert the Audio Card into a tested LCC Fusion Node Bus Hub (leave speakers disconnected).
  2. Load firmware & insert the ESP32
  3. Power the Audio Card
    1. Power the Node Bus Hub using either a tested Node Card or a Power-CAN Card.
    2. Quickly check for hot components; power off if anything heats abnormally.
  4. Self-test the Audio Card
    1. Attach and open a serial monitor at 115200 to the Audio Card’s ESP32 (DevKit-C on the Audio Card, not the Node Card).
    2. From a serial monitor, enter the command (letter) T to start the firmware’s self-test, then review the results.
      • Messages may appear on BT, OLED, or the attached serial monitor.
      • See: PCB Self Testing.
      • What you do: simply watch the summary—no meters or scopes required.
      • Pass indicators: each tested group reports a success status.
      • If any group fails: power down, re-seat the DevKit-C and Audio Card, inspect solder on the affected header/IC, and re-run.
  5. Tests Performed
    1. Audio Card Pins Test (automatic)
      1. I²S: BCLK, LRCLK, DIN[1..4] driven and verified as Outputs.
      2. SPI: SCK, MOSI, CS as Outputs; MISO checked as an Input.
      3. I²C: SDA/SCL briefly exercised as open-drain I/O to confirm upstream Hub pull-ups and line integrity.
    2. SD Card Access Test (automatic)
      1. Initializes the SD interface at a conservative SPI clock, opens a small file, and reads a short block.
      2. What you do: insert a known-good micro-SD and observe init/read status.
      3. If it fails: try a different card, re-seat the socket, and re-run. (Lower SPI speed in firmware if needed.)
    3. Speaker Path Test (audible)
      1. Plays a short test-tone sequence over I²S → MAX98357A → speaker with gentle fade-in/out.
      2. What you do:
        1. Connect one speaker to the first speaker connector.
        2. Run the Speaker Test and listen for two distinct tones (e.g., higher tone then lower).
        3. For multiple amps/speakers, move the connector to each speaker connector and repeat.
      3. Expected result: clear, non-distorted tones at moderate volume; no pops/crackles at start/stop.
      4. If no sound: verify I²S header orientation, amplifier IC soldering, speaker wiring/polarity, and the 5 VDC audio rail.

Audio Output Testing (Using Card Monitor Board)

If you connect the Audio Card’s RJ45 output to the Card Monitor Board, the LEDs will show faint flicker or shimmer in response to sound output across all eight lines.
This test is optional but can confirm that the ESP32, amplifier, and output drivers are active before connecting speakers.

Lines What You Should See How to Read It
L1–L8 Dim flicker or variable brightness when audio is playing LEDs react only to the positive half of the AC audio signal. You’ll see subtle glow/flicker that follows loudness or rhythm. If all remain dark, the card is silent or inactive.

Jumper / Ground Setup

Item Setting / Action Purpose
JP1 (L8: GND / OUTPUT) OUTPUT Select OUTUT since the Audio Card does not provide a GND line on the RJ45.
J1 (PWR BUS GND) Connect to the Audio Card’s supply GND Provides the only return path so the LEDs can light. Must share the same power ground as the Audio Card (Node Bus Hub)

Notes: 1. The Audio Card does not supply GND on the RJ45 audio lines. You must connect J1 GND to the Audio Card’s power-supply ground (common return). 2. LEDs are activity indicators only—they do not represent tone, volume, or fidelity. 3. LEDs light only on the positive half-cycles, so flicker may be faint or uneven—this is normal. 4. Speaker pair mapping: adjacent lines form pairs (e.g., L1/L2, L3/L4, L5/L6, L7/L8). In stereo builds, you’ll typically see different flicker patterns between left/right pairs. 5. For meaningful audio testing (quality, channel balance), use speakers.

Tip: Use this LED check just to confirm the Audio Card is alive before you hook up speakers; faint flicker is expected.


Provisioning the Card


Troubleshooting

Appendices

PCB Specifications

The card’s specifications are as follows:


Notes:

(This notes table is intended for optional annotations. It can be edited directly in LibreOffice or Microsoft Word, or annotated in PDF readers that support text annotations. Empty rows may collapse in EPUB or PDF exports; this is expected.)