A Japanese train station departure bell and announcement system hardware replica with a responsive web-based control interface. Designed to run on ESP32 microcontrollers and to be installed into authentic housing (KASUGA BSW215B3), JR-Beru brings the nostalgic sounds of Japanese train stations to your home with both physical and web-based remote control options. the device self host the web interface therefore no internet connection/app is required. entire system is self contained and does not require any cloud services.
- Live Demo
- Features
- Hardware Requirements
- Pin Configuration/Wiring
- Audio File Structure
- Setup Instructions
- Configuration Files
- Hardware Installation
- Web Interface Access
- Station Config Web Editor
- Uploading Station Config via Web UI
- Firmware Updates
- Version History
- Serial Monitoring
- Serial Shell
- Station Config JSON File Structure
- Credits
- License
- Support
demo-1.1.mp4
- Departure Melodies: JR station departure melodies
- ATOS Announcements: Yamanote Line ATOS announcements (current file system contains ATOS for the Yamanote Line)
- Door Chimes: Door opening and closing sounds
- Platform Announcements: JR station platform announcements (current file system contains announcements for the Yamanote Line)
- New audio files can be added to the SD Card; device will re-index on reboot
- Physical Button Control:
- Single press: Start melody loop (random play by default, can be toggled in the web interface)
- Release: Play ATOS announcement followed by door chime
- Web Interface Control:
- Custom station config file upload (with validation)
- Dynamic station sign display with preconfigured audio selections
- Station name, line code, direction indicator dynamically updated from the config file
- Audio selection for all sound types, manual selection/auto-populate from the config file
- Volume control (range: 0-30)
- Play mode selection (selected, random, sequence)
- Manual platform announcement trigger
-
Responsive Design:
- Fully functional on both desktop and mobile devices
-
Station Config Upload:
- Custom station config file upload with size limit (max 100KB)
- Error handling/validation/recovery for invalid config files
- JSON structure validation including checks for required fields
- Station info dynamically updated from the config file
- Audio selection for all sound types configured in the config file
-
Station Sign Display:
- JR station sign display with dynamic station name, line code, direction indicator
- Station name, line code, direction indicator dynamically updated from the config file
- Multilingual station names (Japanese, Korean, English)
- Line Marker displaying (e.g., JY03) created with HTML/CSS code, no online resources required
-
Station Config Editor:
- Web-based editor for creating and modifying station configuration files
- Visual preview of station signs based on your configuration
- Export optimized JSON files for use with JR-Beru
-
Real-time Controls: Instant feedback and response to user inputs
-
Enhanced Error Handling:
- Consistent modal dialogs for all errors and notifications
- Clear visual feedback for success/error states with color-coding
- Improved display of backend JSON parsing errors
- WiFi Manager: Simplified WiFi configuration with AP mode fallback
- OTA Updates: Seamless over-the-air firmware updates
- Persist Memory: Retains settings between power cycles
- Dual-core operation: Audio playback and web interface run on different cores for improved reliability
- Memory optimization: Efficient handling of large JSON configuration files
- Serial Output: Detailed status logs for monitoring and debugging
- Serial Shell: Interactive command-line interface for device control and diagnostics
- Improved Stability: Enhanced stack sizes for critical tasks to prevent overflow errors
- ESP32 Board: Compatible with ESP32 dev board
- DFPlayer Mini MP3 Player: For audio playback
- SD Card: Formatted as FAT32 with audio files
- Speaker: Suitable for MP3 playback
- Push Button: KASUGA BSW215B3
- Power Supply: 5V regulated power source
| Pin | Function |
|---|---|
| GPIO16 | DFPlayer RX |
| GPIO17 | DFPlayer TX |
| GPIO4 | Main Button Input |
The SD card file system must follow this structure:
/01/ # Departure melodies
/02/ # ATOS announcements
/03/ # Door chime sounds
/04/ # Platform announcements
📦 Download: SD File System
- Format the SD card as FAT32
- Copy audio files to the appropriate folders
- Connect hardware according to the Pin Configuration
- Flash firmware to the ESP32 using the Arduino IDE
- Power on the device
- Connect to the "JR-BERU-AP" WiFi network
- Configure your WiFi settings via the web interface
- Access the web interface at the device's assigned IP address
The station configuration file is a JSON file that defines lines, stations, and tracks for the system. The structure includes:
- lines: Available JR lines (JY, JR, etc.)
- style: Visual styling for the station sign elements (colors)
- stations: List of stations on the selected line
- stationInfo: Details about the station (names, codes)
- tracks: Different track configurations
- lineMarker: Line and station number
- audio: Audio file mappings
- direction: Previous and next stations
You can use the included station config editor to create or modify configuration files.
Cut away all the original contactor and glue in a momentary switch.
Create a USB-C port connection to the ESP32 board.
Completed installation in the housing.
- URL:
http://[device-ip]
The Station Config Web Editor is a powerful tool that allows you to create and customize JR BERU configurations without manually editing JSON files. This editor features a user-friendly interface for configuring all the station/audioparameters in the JR-Beru system.
- Open
station_config_editor.htmlin your web browser - The editor works on both desktop and mobile devices
- Visual Station Sign Preview: See real-time updates as you modify your station configuration
- Line Configuration: Create and customize multiple JR lines with appropriate styling
- Station Management: Add, modify and remove stations with full multilingual support
- Track Configuration: Set up multiple tracks with custom audio mappings
- Direction Settings: Configure previous and next station information for accurate announcements
- Color Customization: Adjust colors for line markers, station numbers, and direction indicators
- Audio Mapping: Easily assign audio files to each station configuration
- JSON Validation: Automatic validation ensures your configuration will work with JR-Beru
- Export/Import: Save your configurations as JSON files for backup or sharing
- Auto-Fill Config: The editor will auto-fill the station config with the previous station information for faster configuration
- Create a Line: Start by creating a JR line (like JY for Yamanote) and set its styling
- Add Stations: Create stations with Japanese, English, Korean and Hiragana names
- Configure Tracks: Set up track numbers, line codes, and audio mappings
- Set Directions: Define previous and next stations for directional announcements
- Preview: Use the visual preview to check your station sign appearance
- Export: Download your configuration as a JSON file so you can upload it in JR-Beru web interface
- Use accurate station codes and numbers based on the real JR system. If you leave the station code blank, the station will not be displayed
- Match color schemes to the actual JR line colors for a realistic experience
- Configure all language fields for proper multilingual support
- Test your configuration thoroughly before final upload
- Keep backup copies of your station configurations
The JR-Beru web interface allows you to easily upload and apply custom station configuration files created with the Station Config Web Editor.
- Access the Web Interface: Navigate to
http://[device-ip]in your browser - Locate the Upload Section: Find the "Upload" button in the sequence control section
- Select File: Click "Choose File" and select your JSON configuration file
- Upload: Click the "Upload" button to send the file to your JR-Beru device
- The system automatically validates your configuration file before applying it
- Files are limited to 100KB maximum size
- JSON structure is checked for required fields and proper formatting
- If validation fails, you'll receive a specific error message explaining the issue
After a successful upload:
- The station sign will immediately update to show your new configuration
- Audio selections will be updated based on the configuration
- The device will save your new configuration and keep it across reboots
- You can immediately use the new configuration with the physical button or web controls
- File Size Error: If you see "File too large", reduce the number of lines in your configuration
- JSON Format Error: Check your file for syntax errors (missing brackets, commas, etc.)
- Missing Fields: Ensure all required fields are present in your configuration
- Audio File Issues: If audio doesn't play, check that the file indices in your config match the available files on the SD card
- Access
http://[device-ip]/update - Enter credentials when prompted:
- Default OTA Username:
JR - Default OTA Password:
BERU
- Default OTA Username:
- Select the new firmware file
- Click upload to update
- Web editor V1.2.2
- Enhanced error handling with consistent modal dialogs for all errors
- Optimized JavaScript code for better performance and reduced size
- Improved UI components with consistent styling and better feedback
- Increased button handler task stack size for improved stability
- Added better code organization with descriptive comments
- Fixed JSON error parsing and display from backend responses
- Added JR-BERU Shell CLI for device control and diagnostics
- Added json file validation and error recovery
- Improved error handling and user feedback
- Enhanced stability for button handling
- Fixed minor UI issues
- Updated confirm dialogs to use the modal system
- Added ability to upload station config via web interface
- Migrated to ESP32 platform for improved performance and reliability
- Added station configuration editor
- Improved configuration file validation
- Added file size limit (100KB) for uploads
- Enhanced memory management for large configuration files
- Dynamic station sign display
- More accurate station sign display
- Improved audio control reliability
- Added Reset DF-Player support in WebUI
- Enhanced station sign display
- Improved audio control reliability
- Added multilingual support
- WiFi connection stability improvements
The device outputs detailed status information via Serial (115200 baud rate). Use the Arduino IDE's Serial Monitor or any serial terminal to monitor real-time logs.
=================================
| JR-Beru Booting |
=================================
Firmware Version: ESP32-MCU-Rx.x.x WebUI-Rx.x.x
Initializing MP3-Player ... (May take 3~5 seconds)
MP3-Player online.
=== Indexing Audio File ===
Melody Files: x
Atos Files: x
DoorChime Files: x
VA Files: x
===========================
===== Loading Station Config Json=====
Config file size: xx bytes
Free heap before reading: xx
Free heap after parsing: xx
Station Config Json Loaded
Final heap after loading: xx
======================================
Station config loaded successfully
=== Loading Device State ===
Stored values:
Random Play: OFF
Volume: xx
Current Melody: xx, Current Atos: xx, Current DoorChime: xx, Current VA: xx
Playback Mode: sequence
Restoring station selection:
Line: xx, Station: xx, Track: xx
Station restored successfully
============================
*wm:AutoConnect
*wm:Connecting to SAVED AP: xx
*wm:AutoConnect: SUCCESS
*wm:STA IP Address: xx
WiFi Connected!
IP Address: xx
Web server started!
PlayingFolder: xx
RandomPlay: xx/xx
========Boot up Completed!========
======== System Health ========
Memory : xx% used (xx KB free)
Flash : xx% used (xx KB free)
SPIFFS : xx% used (xx KB free)
CPU Temp : xx°C
===============================
Welcome to JR-Beru Shell. Type 'help' for available commands.
Firmware Version: ESP32-MCU-Rx.x.x WebUI-Rx.x.x
JR-Beru:_$
- Track selection:
PlayingFolder: X, Playing Audio: Y - Random play:
RandomPlay: X/Y - Playback completion:
Number:X Play Finished! - Door chime triggers:
====Door Chime playing====
- Configuration validation:
File validation successful - Memory usage:
Free heap during parsing: X - File upload progress:
Upload progress: X bytes written
Time Out!: MP3 player communication timeoutStack Wrong!: MP3 player stack errorCard not found: SD card reading errorCannot Find File: Requested audio file not foundFile Index Out of Bound: Invalid file number requestedFile too large, max size is 100KB: Attempted upload exceeds size limitInvalid JSON format (unbalanced braces): Configuration file error
- Connection status
- IP address assignment
- Web server initialization
- Open Serial Monitor in Arduino IDE
- Set baud rate to 115200
- Ensure "Newline" is selected for line ending
- Power cycle the device to see boot sequence
- Monitor real-time operation status
The device includes an interactive command-line interface accessible through the serial monitor at 115200 baud rate. This shell provides direct control and diagnostic capabilities without requiring the web interface.
| Command | Description |
|---|---|
health |
Display system health information (memory usage, SPIFFS usage, etc.) |
status |
Show current station and playback status |
volume [0-30] |
Get or set the volume level |
play melody |
Play current melody |
play atos |
Play current ATOS announcement |
play chime |
Play current door chime |
play va |
Play current platform announcement |
ls / |
List files on SPIFFS |
ls stations |
List available stations with their tracks |
station [line] [station] [track] |
Set current station (e.g., station JY Tokyo 4) |
reset player |
Reset the DFPlayer Mini |
reset wifi |
Reset WiFi settings |
reboot |
Restart the ESP32 |
help |
Display list of available commands |
- Connect to the device using a serial terminal (Arduino IDE Serial Monitor or other terminal program)
- Set the baud rate to 115200
- After the device boots, you'll see the
JR-Beru_:prompt - Type a command and press Enter to execute
- For commands with parameters, separate them with spaces (e.g.,
volume 20)
Example session:
JR-Beru_: help
============= JR-Beru Shell Commands =============
help - Display help
health - Display system health information
status - Display current station and playback status
volume - Get or set volume level [0-30]
play - Play current melody/atos/chime/va
index - Reindex the file Count of the DFPlayer
ls - List files on SPIFFS or available stations
station - Set current station [line] [station] [track]
reset - Reset the WiFi or DFPlayer
reboot - Restart ESP32
===================================================
JR-Beru_: status
======== Current Status ========
Current Line: JY
Current Station: 東京 (Tokyo)
Current Track: 4
Volume: 22/30
WiFi Status: Connected
IP Address: 192.168.1.2
===============================
JR-Beru_:
- lines: Available JR lines (JY, JK, etc.)
- style: Visual styling for the station sign elements
- lineMarkerBgColor: Background color for the line marker
- lineNumberBgColor: Background color for the station number display
- directionBarBgColor: Background color for the direction indicator bars
- stations: List of stations on the selected line
- i: Station information array: [stationCode, nameJa, nameHiragana, nameEn, wardBox]
- Element 0: Station code (e.g., "AKB")
- Element 1: Japanese station name (e.g., "秋葉原")
- Element 2: Hiragana reading (e.g., "あきはばら")
- Element 3: English station name (e.g., "Akihabara")
- Element 4: Ward designation (e.g., "山")
- t: Array of track configurations, each containing:
- Element 0: Track name (e.g., "Track1")
- Element 1: Line code (e.g., "JY")
- Element 2: Station number (e.g., "03")
- Element 3: Audio file indices [melody, atos, doorchime, platform]
- Element 4: Previous station info [nameJa, nameEn]
- Element 5: Next station info [nameJa, nameEn]
- i: Station information array: [stationCode, nameJa, nameHiragana, nameEn, wardBox]
- style: Visual styling for the station sign elements
{
"lines": {
"JY": {
"style": {
"lineMarkerBgColor": "#000000",
"lineNumberBgColor": "#80c241",
"directionBarBgColor": "#006400"
},
"stations": {
"Default Config": {
"i": ["AKB", "秋葉原", "あきはばら", "Akihabara", "山"],
"t": [
[
"Track1",
"JY",
"03",
[1, 1, 1, 1],
["前の駅", "Previous Station"],
["次の駅", "Next Station"]
]
]
}
}
}
}
}- Station melodies and announcements are the property of JR East
- Web interface design inspired by JR Yamanote Line station signage
- Built using the ESP32 Arduino Core and DFRobotDFPlayerMini library
This project is released under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
This means you are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made
- NonCommercial — You may not use the material for commercial purposes
For issues and feature requests, please use the GitHub Issues page.







