Introducing the DCC (Digital Command Control) to Arduino Converter 2.0: Build your own DCC decoders with Arduino, ESP32, and other MCUs.
At Loco.Engineering, we're focused on simplifying how we control model trains and other electronic toys. To be honest, most of the technologies used in model trains and RC toys are outdated. For example, many DCC decoders still require CV programming with special proprietary tools, when we now have WiFi, and all settings should be updated via a web browser in 2024. That’s why we continue to work on our DCC converter, which allows you to use almost any MCU with Arduino or native SDKs to control model trains via DCC or WiFi, without needing a command station.
Our DCC converter is designed to convert DCC signals from the track into a digital signal (0 or 1) that can be read by any MCU, such as ESP32 SoCs, Raspberry Pi, and others. Additionally, the converter transforms DCC or AC into DC, which can power accessories, train motors, and other components. It also drops the voltage to 5V and 3.3V to power MCU boards, RGB LEDs, servo motors, and other devices requiring those voltages.
The new version can handle much more current: up to 2A on outputs with 8–22V, up to 2A on outputs with 5V, and up to 1A on the 3.3V output. This should be enough to power several servo motors, RGB LEDs, ESP32/Raspberry Pi boards, train motors, and more. We’ve reduced the board size to 35mm x 18mm x 5mm, allowing it to fit even in some H0 trains with MCU boards.
Full Specifications:
- Dimensions: 35mm x 18mm x 5mm
- Converts DCC signal from rails into a digital signal that can be read by an MCU (ESP32 boards, Arduino boards, and others)
- Converts DCC and AC into DC (Direct Current)
- Maximum total current: 2A (up to 2A on outputs with 8–22V, up to 2A on outputs with 5V, and up to 1A on 3.3V)
- Power supply: 8-22V DCC / AC / DC
- 3 power outputs: 3.3V DC, 5V DC, 8-22V DC
- Mounting holes
An example schematic of how to use this circuit can be found at: loco.engineering/docs
How to Use and Connect a DCC Converter
You can use a DCC converter in two ways:
- Without an MCU board: Use it solely to convert DCC/AC into DC to power accessories. Three outputs are available: the same voltage as the track, 5V, and 3.3V.
- With an MCU board (e.g., ESP32S3 dev board or Raspberry Pi): You can handle the DCC signal with your MCU board or use WCC (Wireless Command Control) to control trains or accessories on your layout.
Example of how to control a signal with DCC, the DCC converter, and an MCU board.
Example of How to Control a Signal with DCC, the DCC Converter, and an MCU Board
To control accessories or model trains, you can use:
- Our SimpleDCC firmware, which includes a built-in web app and a web throttle (works only with ESP32S3 boards).
- NmraDCC library.
For more information and a Getting Started guide, visit our documentation at: loco.engineering/docs/dcc-converter
I Don’t Want to Touch Any Hardware, But I Want to Upload My Own Firmware
If you prefer to use ready-to-go programmable decoders, check out our train and accessory DCC/WCC decoders. You can upload any firmware that works with ESP32S3 SoCs. All decoders come with default firmware that works out of the box, allowing you to control trains and accessories with DCC or directly from a web browser, even without a command station. Your layout can run on DC (analog control).
Where to Buy
Loco.Engineering DCC converters and decoders can be ordered from our store: loco.engineering/products
Feel free to contact us at hey@loco.engineering if you have any questions.