recommended setup for programming N-scale with microcontroller

Mike Davidson Dec 16, 2021

  1. Mike Davidson

    Mike Davidson New Member

    5
    0
    1
    Hello,
    New to the hobby and starting from scratch - just have some Kato track. Would like to program N-scale with a microcontroller.
    What track system, microcontroller, software, etc. suggested to get started?
    Comfortable with programming.
    Thanks:)
    - Mike
     
  2. woodone

    woodone TrainBoard Member

    959
    51
    24
    I think we need a bit more information?
    Do you have a DCC system? Who’s?
    Does the locomotive have an decoder installed? Who’s?
    From your questions it looks like you need both.
    Big names in systems would be NCE Digatrax- there are others too but these two are the biggies.
    Decoders you can name your poison . Soundtraxx, ESU, Digatrax, NCE and others.
    We do not really program, but do adjust the CV’s. (Configuration values) Lots of people call this programming.
     
    Mike Davidson likes this.
  3. Grey One

    Grey One TrainBoard Supporter

    8,918
    3,731
    137
    @Mike Davidson I think folks here are going to recommend that you start with DCC.
    In terms of a 'micro-controler' do you have experience programing?
    What parts of the layout did you want to program? Passenger? Signal Lighting? Freight running? Switch control?

    Me? If I was going to program anything I would begin with passenger since it tends to go
    Point to point slowing down and stopping at each station where it pauses for a minute or two.
    Once I had that down smoothly I would go on to programing turnouts such as yard work and signal lighting.

    First? Get used to DCC.
     
    Mike Davidson likes this.
  4. Sumner

    Sumner TrainBoard Member

    2,849
    6,018
    63
    First, welcome to the hobby and to TrainBoard.

    I'd take a hard look at DCC++EX ( https://dcc-ex.com/ ). It along with JMRI and other options can give you about all that you could want and it is a very inexpensive way to get into DCC.

    Sumner
     
    BigJake and Mike Davidson like this.
  5. Mike Davidson

    Mike Davidson New Member

    5
    0
    1
    Hello :)
    Thanks for the reply.
    Yes, need both. I am interested if there is a way to do real programming such as loops with conditions, etc. Even access to a cloud database, etc.
    Thanks again:)
    - Mike
     
  6. Mike Davidson

    Mike Davidson New Member

    5
    0
    1
    Hello and thanks for the help:)
    I can program basic algorithm and loops in C++ and I would like to program all that you mention, include possibly sending info to cloud etc.
    Thanks again and have a great day:)
    - Mike
     
  7. Mike Davidson

    Mike Davidson New Member

    5
    0
    1
    Hello and thanks for the reply :)
    Great. I will definitely check that out.
    Sincerely,
    Mike
     
  8. Sumner

    Sumner TrainBoard Member

    2,849
    6,018
    63
    The group that has been developing DCC++EX is on Discord here...

    https://discord.com/invite/PuPnNMp8Qf

    With your background you might be interested in what they are working on and all the options they are pursuing,

    Sumner
     
    Mike Davidson likes this.
  9. BigJake

    BigJake TrainBoard Member

    3,329
    6,441
    70
    WRT N scale track systems, I recommend Kato Unitrack; it has a large selection of different track pieces and pre-packaged sets, and includes roadbed and robust rail connectors. You can quickly set it up a small loop, etc. on a table, build your own complex layout with it, or anything in between. For most layouts more complicated than a loop with a few sidings, I strongly recommend using track planning software to ensure they work properly. Even rigid, sectional track like Unitrack is flexible enough to 'allow' connections between pieces that are neither stable nor reliable. I use XTrackCAD, which is a free application available for download, and keeps the track plan realistic and reliable. It's a lot cheaper to try out a layout design in track planning software, than to simply purchase pieces and assemble them, hoping they will run reliably.

    For a DCC system, it sounds like DCC++EX may be right up your alley. There is a sub-forum here for DCC++ (including EX).

    If you want to get your feet wet with a more turn-key system, starter DCC systems from Digitrax (Zephyr) or NCE (Power Cab) are very popular. For a DCC system with more capacity (more amps to run larger layout with more trains, and ability to control more locomotive addresses simultaneously), Digitrax, NCE, and Digikeijs offer excellent DCC systems. I use a small DCC system called Pi SPROG 3, which is an expansion "hat" for a Raspberry Pi 4b computer that generates the DCC waveform that powers and controls the trains and accessories on a model railroad. It uses JMRI software (see below) for the user interface (if other than the throttle is needed). Most turnkey systems allow you to run trains, throw switches (turnouts) and program (configure) DCC decoders in the locomotives. Some DCC systems also have an available WiFi interface for additional throttles. My Pi SPROG 3's Raspberry Pi system connects to my home WiFi router (so I don't have to switch WiFi networks on my phone to use its throttle app), or can serve its own, isolated WiFi network.

    Then you need locomotives and railcars (freight and/or passenger). You can purchase DC locomotives and install DCC decoders (varying from hard-wired to drop-in decoders), or purchase DCC-equipped locomotives. The railcars are rarely DCC equipped, since they are simply pulled/pushed around by the locomotives, but there are some railcars equipped with DCC sound decoders, for example stock cars that make sounds of livestock, etc.

    You may also be interested in Java Model Railroad Interface (JMRI) software, which is free, and includes apps and other software to handle a large variety of model railroading activities, from programming (configuring) DCC decoders [Decoder Pro], to almost any railroading activity, up to complete automation of scheduling and running trains on a layout. JMRI is highly configurable, and compatible with most all DCC systems, including the ones listed above, but needs a USB or other interface between DCC system and the computer running JMRI. If the computer running JMRI has a WiFi interface, JMRI also allows controlling trains via WiFi throttles or throttle apps on tablets/smartphones. JMRI runs on Windows, Mac or Linux computers using Java. If for nothing else, JMRI's Decoder Pro application is highly recommended for programming (configuring) locomotive decoders, and keeping track of their programming, with a much better user interface than typical DCC systems provide. JMRI also has a "virtual sound decoder" feature which can synchronize playing engine/brake/horn sounds for up to 4 independent locomotives being run on the layout, with much better sound than available through the tiny speakers that fit in N scale locomotives. It comes with a variety of locomotive sounds, and you can add more.
     
    Mike Davidson likes this.
  10. in2tech

    in2tech TrainBoard Member

    2,713
    7,640
    78
    Good luck and welcome to Trainboard!
     
    Mike Davidson likes this.
  11. Mike Davidson

    Mike Davidson New Member

    5
    0
    1
    Th
    Thanks so much for your help!!! This is great information :)
    Thanks again to everyone who has been so helpful on this! :)
    Sincerely,
    Mike
     

Share This Page