Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 22 of 22

Thread: DCC++ for Model Train Control with Teensy 3.x and Teensy 4.x

Threaded View

  1. #1
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    New York

    DCC++ for Model Train Control with Teensy 3.x and Teensy 4.x

    Decided to port the CommandStation-EX ( library that currently only supports Arduino Mega and Arduino Uno boards to the Teensy T3.x and Teensy 4.x ( and is used for controlling locomotives that use dcc++.
    What is DCC? DCC stands for Digital Command Control. It is a system where digital commands are sent to the locomotives through the rails. DCC is allows independent control of multiple locomotives without complicated wiring, toggle switches or power packs
    With @luni's help, @KurtE's and @PaulStoffregen final fix to EEPROM lib was able to successfully get it ported over.

    I used a custom breakout board that supports Arduino shields and used a Arduino Motor shield with a Teensy 3.5. Loaded the modified software onto the Teensy and then used exWebThrottle on a laptop to test the conversion. This video is the result.

    Why did I do this, basically wanted to see if it would work with the Teensy. For the test I am using a Walthers EMD-60 modifed for DCC in case you are curious.

    In full disclosure I haven't tested with the Teensy 4 yet - not 100% sure the Arduino Motor shield is compatible?

    UPDATES 2/1/21:
    1. @luni's version of the use of timers has been pushed to the TeensyBranch of the my github repository. Next up issuing a PR back to the authors

    2. Saw on youtube that someone created a wireless throttle using HC-12 433Mhz transceivers. So using a Teensy LC that I had I made my own to interface to the CommandStation-EX basestation:

    Basically what you need is:
    1. Teensy LC
    2. 2 HC-12 Transceivers
    3. KY-040 Rotary Encoders
    4. Nextion 3.2in display

    See for alot more details. I will post my version of the sketch to Github and update this post.
    Last edited by mjs513; 01-31-2021 at 04:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts