Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. HVT

    HVT TrainBoard Member

    74
    93
    15
    Gregg,
    Sorry, I didn't mean to try to confuse you. You are right as I think back about the sequence, I powered up Mega 2 with the USB attached and used JMRI to turn to track power on/off. Next the loco was run between Pololu 2 Main & Prog tracks with 7&8 jumpered to 12. When that went smoothly the USB was moved to Mega 1 and Pololu 2 pins 7&8 were connected to Pololu 1 pin 12 for the rest of the testing. Mega 2 was powered by a 5v power supply the whole time. Didn't issue any <1> commands directly, only thru JMRI because it works so well.

    It seems there is still much to do to make this usable. But I have made a start.

    Thanks again,
    Dave
     
    Last edited: Jan 19, 2016
    Scott Eric Catalano likes this.
  2. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    I had a similar thought with the Booster Station concept. I wonder if we should put in a request to have them create a DCC++ subforum?...
     
  3. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Thanks Dave - that makes sense since JMRI was able to enable the power to the second Pololu before you switched the USB to the first Pololu. As long as the second Mega retained power, its enable pins would remain High.

    I'm going to try to spend some time this upcoming weekend on implementing the TWI library and create a DCC++ Server that would take commands from the main board to control outputs and read sensor inputs. I will also jumper over the DCC signals so that the Server boards can act as a separate booster.
     
    HVT and Scott Eric Catalano like this.
  4. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    A separate forum for DCC++ would be great. It would enable us to keep different threads going so that topics can be logically grouped (and new members don't have to read though 40 pages to get started).

    Anyone care to make the request to TrainBoard?
     
  5. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    I just posted a request in the Support forum.
     
    Scott Eric Catalano and dcsun like this.
  6. dcsun

    dcsun TrainBoard Member

    23
    16
    2
    Thanks Paul. Setting up the second/main track was on my list of things to try at some point and see what happens. I was under the impression I should sort out any decoder issues on the programming track before using them on the main one as there's less chance of frying stuff on the programming track. Does anyone know if that's true of the DCC++ system or just some of the off the shelf DCC ones? Also a more general question, should I be able to actually move trains on the programming track, or does that only allow reading and setting of decoder values? In any case it seems like I have some issue there somewhere because I can't read any decoder info through the system.

    Dave
     
    Scott Eric Catalano likes this.
  7. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Gregg/Dave
    Gregg, I'm with you ...... I think that Dave is just running ED to JMRI thru the USB connection not thru the WiFi shield & Base Station. If not, I am anxious for clarification from either of you. Thanks
    Steve
     
    Scott Eric Catalano likes this.
  8. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    see post below
     
    Scott Eric Catalano likes this.
  9. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12

    Gregg,

    I'm Still looking for a Access Point Ethernet Shield component.

    This is not a shield but I believe it is close to what were looking for in size and functionality.
    Reliable and Secure compact Wireless AP.

    A Nano Wireless router TL-WR702n model without an external USB port. abt $16.95
    http://www.tp-link.com/lk/products/details/cat-9_TL-WR702N.html

    external usb port version:
    http://wiki.openwrt.org/toh/tp-link/tl-wr703n

    It could be a proven dedicated nano wireless router for layouts, ETC.

    If an AP Ethernet shield doesn't show up maybe we could use this or something like it as a base option.

    Heck maybe Jason could just pop the TL-WR702N out of the container and secure it to a blank shield, tie in serial to TP in, TP Out and 5vdc, Gnd and were good to go. hooza.

    TL-WR702N board connections. click on image twice to see large image;
    https://wiki.openwrt.org/toh/tp-link/tl-wr702n

    Set up AP w/ security.
    http://www.tp-link.com/resources/document/TL-WR702N_V1_QIG_7106504353.pdf

    Your thoughts?

    Kevin
     
    Last edited: Jan 19, 2016
    Scott Eric Catalano likes this.
  10. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    This is a good point. I think having two busses makes the most sense. We're essentially borrowing the same scheme from NCE and Digitrax, since this is exactly what they do. However, in our case, it's open standard and simple to the point. Anyone can build hardware to add-on to the DCC++ system.
     
    Scott Eric Catalano likes this.
  11. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Gregg et al
    Some thoughts on Base station WiFi issue...... connecting Base Station Ethernet card to a router port via cable seems impractical ....home network router probably is not near train room (where Base Station must be)etc etc .... so a wireless connection from Base Station to router should be considered necessary.
    Throttle (or Engine Driver etc) would then connect to Base Staion over the WiFi network.
    I thought that the original idea was a less expensive and compact DCC system to rival existing commercial equipment ..... adding an AP for stand alone operation adds an additional burden to both objectives as well as complexity to what started out as a very simple, compact and unique adaptation of the Arduino to DCC........ club layout and train show applications do not have to be as concerned with either objective and so the expense of a wireless router would be a benefit. Just my two cents.......
    Steve
     
    DJ79 and Scott Eric Catalano like this.
  12. HVT

    HVT TrainBoard Member

    74
    93
    15
    Gregg,
    Thank you for your effort in this direction. Though I am not yet ready to connect them all I expect to use nine Megas when complete, plus two AR blocks. I can do some testing on slaves if and when you need. No rush!!!!


    Jason,
    I'm wondering how your RS485 bus concept compares/relates to I2C running the TWI library that Gregg is working on?

    Thanks,
    Dave
     
    Scott Eric Catalano likes this.
  13. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    I2C and SPI are meant to be interfaces between the microprocessor and a device IC. Examples would be memory, modem IC's, LCD's, ect. Basically they are simplified methods of communicating with these devices over as few data lines as possible and as a fast as possible. Since they do run fast, noise on the lines becomes a very big problem when the lines are longer than needed. They can actually act as antennas, picking up the noise and causing errors in the data. SPI and I2C are meant to be on a PCB within inches or less of the processor. Think of it as a data bus like on a computer's motherboard. They are there to transport data back and fourth with the various components.

    A good example of how SPI or I2C are used is with an LCD display. Traditionally, an LCD would have a read/write register line, enable line, data/instruction line and depending on how it's configured, up to EIGHT MORE lines for data. That's eleven lines between the processor and the LCD, just for the LCD control. With SPI or I2C, that can be knocked down to MOSI, MISO, SCLK and Ground. Four lines to control the module, replacing the eleven in the conventional method. Thus releasing precious pins on the microprocessor to connect to more things.

    So how does that differ with RS485? RS485 is a bi-directional protocol designed to be robust and fast. It's also designed to be ran long distances. Not in inches, but feet. This is what makes it a perfect candidate for a data buss like I'm proposing. It works, Digitrax and NCE are using it. Alternatives would be RS-422 and similar protocols. RS232, which is standard serial data that you used to find on every computer is similar, but cannot be run as far and is not as robust.

    Hopefully that helps explain!
     
    KC Smith, HVT and Scott Eric Catalano like this.
  14. HVT

    HVT TrainBoard Member

    74
    93
    15
    Thanks Jason.
     
    Last edited: Jan 19, 2016
    Scott Eric Catalano likes this.
  15. HVT

    HVT TrainBoard Member

    74
    93
    15
    Jason, I am wondering why you selected 12v for your HHT when the Arduino and accessories have 5v readily available?
    Dave
     
    Scott Eric Catalano likes this.
  16. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    I think if we take a step back, (one of) the real goal(s) here is to come up with a system that is configurable and adaptable to each user's individual needs. Adding WiFi support, or even going so far as integrating an AP into the Base Station does no harm, so long as such add-ons don't end up being REQUIRED for the system to function.

    As far as I know we've been pretty successful with that so far... one can have a basic system with an Arduino, a Motor Shield, and a PC running Controller or JMRI. Another person might add Jason's RS485-based hand held throttles, or perhaps another throttle solution based on XBee or something. Yet another person might come up with a LocoNet or NCE Cab Bus adaptor to use Digitrax or NCE throttles with it.

    Still someone else might find having a WiThrottle server on the Base Station, whether it is (a) wired to a Router, (b) running as a WiFi client to a router, or (c) serving as a WiFi AP itself.

    It's all Win-Win as long as we keep the flexibility as a goal.
     
  17. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Well said!
    Steve
     
  18. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    That is meant to be a general use buss voltage available to all devices on the buss. The individual device would have it's own regulator on-board. Such as my HHT has an internal +5VDC regulator. The +12VDC will carry the long distance better than the regulated +5VDC and the command station. Voltage drop would be too much.
     
    HVT and Scott Eric Catalano like this.
  19. ISCOLD

    ISCOLD TrainBoard Member

    36
    38
    3
    Friends,
    I try JMRI. I get message "Press F8 to dissable logixs". ???????? and nothing else. Someone could help me. Sorry.
     
    Scott Eric Catalano likes this.
  20. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    So... it just hangs at the "splash" screen with the "Press F8" message?

    What version of JMRI?
    PC / Mac / Linux?

    Connecting to your Base Station via serial?

    Did you have it configured and working before, and it just broke, or is this your first time trying to set it up?
     
    Scott Eric Catalano likes this.

Share This Page