Files
Maison/ESP32/DCC-Bench/TESTING_CHECKLIST.md
2026-02-10 12:12:11 +01:00

7.8 KiB

🔍 Pre-Flight Checklist for ESP32-2432S028R DCC Bench

Hardware Assembly Checklist

ESP32-2432S028R Module

  • Module has USB-C port
  • Display is ILI9341 (320x240)
  • Touch controller is XPT2046
  • Module powers on via USB-C

Motor Driver Connection

  • Motor driver is LM18200, L298N, or compatible
  • ESP32 GPIO 18 → Motor Driver PWM
  • ESP32 GPIO 19 → Motor Driver DIR
  • ESP32 GPIO 23 → Motor Driver BRAKE
  • ESP32 GND → Motor Driver GND
  • ESP32 5V → Motor Driver VCC (logic)
  • Power supply → Motor Driver Power In
  • Motor/Track → Motor Driver Output

DCC Booster Connection

  • DCC booster compatible with logic-level inputs
  • ESP32 GPIO 17 → DCC Booster IN_A
  • ESP32 GPIO 16 → DCC Booster IN_B
  • ESP32 GND → DCC Booster GND
  • Power supply → DCC Booster Power
  • Track → DCC Booster Output

Relay Module Connection

  • Relay module is 5V type
  • ESP32 GPIO 4 → Relay IN
  • ESP32 GND → Relay GND
  • ESP32 5V → Relay VCC
  • Track wiring connected to relay outputs (2-rail/3-rail config)

Power Supply

  • 12-18V power supply (depending on scale)
  • DC-DC buck converter to 5V (if using single supply)
  • All grounds connected together (common ground)
  • Proper fusing on track outputs

Software Checklist

Development Environment

  • Visual Studio Code installed
  • PlatformIO extension installed
  • Project opens without errors
  • Git branch: ESP32-2432 (feature branch)

Project Configuration

  • platformio.ini shows [env:esp32-2432s028r]
  • Libraries in lib_deps:
    • TFT_eSPI
    • XPT2046_Touchscreen
    • ArduinoJson
    • DCCpp
  • Build flags include TFT configuration

Code Files Present

  • include/TouchscreenUI.h
  • src/TouchscreenUI.cpp
  • include/RelayController.h
  • src/RelayController.cpp
  • Updated Config.h (no WiFi structs)
  • Updated Config.cpp
  • Updated main.cpp

Pin Assignments Verified

  • DCC: GPIO 17, 16 (not conflicting)
  • Motor: GPIO 18, 19, 23
  • Relay: GPIO 4
  • Touch CS: GPIO 22 (defined in platformio.ini)

Build and Upload Checklist

Build Process

  • Run pio run - builds without errors
  • Check for warnings - resolve if critical
  • Verify binary size fits in flash

Upload Process

  • ESP32-2432S028R connected via USB-C
  • Correct COM port selected
  • Run pio run --target upload
  • Upload completes successfully (100%)

Serial Monitor

  • Run pio device monitor
  • Baud rate: 115200
  • See boot messages
  • See "Locomotive Test Bench v2.0"
  • See "Configuration loaded"
  • See "Relay Controller initialized"
  • See "Touchscreen UI initialized"
  • No error messages

Functional Testing Checklist

Display Testing

  • Display shows UI immediately
  • All buttons visible
  • Text is readable
  • Colors correct (not inverted)
  • Status bar shows at bottom

Touch Testing

  • Tap [POWER] button - responds
  • Tap [MODE] button - responds
  • Tap [RAILS] button - responds
  • Tap [DIR] button - responds
  • Drag speed slider - responds
  • Touch accuracy is good (±5mm)

Power Control Testing

  • Power starts OFF (red button)
  • Tap power - turns ON (green)
  • Status bar shows "PWR:ON"
  • Tap again - turns OFF (red)
  • Serial shows power state changes

Mode Switching Testing

  • Default mode shows (DC/Analog - yellow)
  • Tap mode button
  • Power automatically turns OFF
  • Mode switches (DCC - cyan)
  • Serial shows "Power automatically turned OFF"
  • Tap mode again - switches back
  • Power still OFF (safety feature working)

Rail Configuration Testing

  • Default: 2-Rail
  • Tap [RAILS] button
  • Relay clicks (audible)
  • Button shows "3-Rail"
  • Status bar updates
  • Tap again - relay clicks again
  • Button shows "2-Rail"

Direction Control Testing

  • Default: FWD
  • Tap [DIR] button
  • Changes to REV
  • Status bar updates
  • Tap again - back to FWD

Speed Control Testing

  • Slider starts at 0%
  • Drag slider right
  • Speed value updates in real-time
  • Status bar shows new speed
  • Slider visual updates (active portion grows)
  • Tap directly on slider - jumps to that position

Settings Persistence Testing

  • Set specific values:
    • Power: ON
    • Mode: DCC
    • Rails: 3-Rail
    • Speed: 50%
    • Direction: REV
  • Note all values
  • Power cycle ESP32 (unplug/replug USB)
  • Verify all settings retained after reboot
  • Serial shows loaded values match

Output Testing Checklist

DC Analog Mode Testing (No Load)

  • Select DC Analog mode
  • Power ON
  • Set speed to 25%
  • Measure voltage on motor driver outputs
  • Voltage increases with speed slider
  • Change direction
  • Polarity reverses
  • Emergency stop (power OFF) - voltage goes to 0

DCC Mode Testing (with Oscilloscope)

  • Select DCC mode
  • Power ON
  • Connect oscilloscope to GPIO 17 and 16
  • Verify square wave signals
  • Signals are inverted relative to each other
  • Measure timing:
    • '1' bit: ~58μs half-cycle
    • '0' bit: ~100μs half-cycle
  • Signals clean (no ringing or noise)

Relay Testing

  • Toggle 2-Rail/3-Rail multiple times
  • Relay clicks each time
  • No missed toggles
  • Test with multimeter on relay contacts
  • Continuity changes with relay state

Safety Testing Checklist

Mode Change Safety

  • Power ON in DC mode
  • Switch to DCC mode
  • Verify power turns OFF automatically
  • Serial confirms automatic power-off
  • Repeat with DCC → DC
  • Safety feature works both ways

Emergency Stop

  • Power ON with speed at 50%
  • Tap power button
  • Output stops immediately
  • Speed value retained (but no output)
  • Can restart by tapping power again

Overload Protection

  • Motor driver has current limiting
  • Track has appropriate fuse
  • Test emergency stop with load

Integration Testing Checklist

With DC Locomotive

  • Connect DC locomotive to track
  • Select DC Analog mode
  • Power ON
  • Start at low speed (10-20%)
  • Locomotive moves smoothly
  • Increase speed gradually - smooth acceleration
  • Change direction - locomotive reverses
  • Emergency stop works
  • No unusual sounds or heating

With DCC Locomotive

  • Connect DCC locomotive to track (via booster)
  • Verify DCC address matches locomotive
  • Select DCC mode
  • Power ON
  • Start at low speed (10-20%)
  • Locomotive responds to DCC commands
  • Increase speed - smooth operation
  • Change direction - locomotive reverses
  • Power OFF - locomotive stops

⚠️ Known Issues / Notes

To Monitor

  • ESP32 temperature during extended use
  • Motor driver heat dissipation
  • Power supply voltage under load
  • Touch calibration drift over time

Future Improvements

  • Add DCC address entry via touchscreen
  • Add DCC function buttons (F0-F12)
  • Add current monitoring display
  • Add speed presets
  • Add locomotive profiles

📋 Test Results

Test Date: __________
Tester: __________
ESP32 S/N: __________
Firmware Version: 2.0

Overall Results

  • All hardware tests PASS
  • All software tests PASS
  • All functional tests PASS
  • All safety tests PASS
  • Ready for production use

Issues Found




Notes





Checklist Version: 1.0
Last Updated: December 2025