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

Gregg Aug 25, 2015

  1. Shaydriver

    Shaydriver TrainBoard Member

    18
    14
    5
    Thanks Jimbo for the instructive explanation! So, if I understand it right, the driver board senses current, and distributes it to an ADC pin
    with the scaling you describe; and this is already in place with the piggyback solution we use.
    BUT, is there something else I need to do to activate this function ?
    I could try and find the CS/ADC pin, it would obviously be one of the connecting pins between MEGA and motor driver board, if that pin
    is dead I guess I have a defective motor board (or, less likely a shorted ADC pin on my MEGA ?).

    Till next question I'll quote Geoff Bunza: Have fun !
    Regards
    Peter
     
    Scott Eric Catalano likes this.
  2. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    There are 2 current sense connections; one for the programming track (A1) and one for the main track (A0).


    I don't know what motor driver shield you are using, but there seems to be a lot of different ones out there, and some of them apparently don't have current sense capabilities. Do you have any info on your shield?

    There is an undocumented command <c> which returns the current sense reading (on the Main track only). I have just tried it on my layout and it does work.

    So with a serial monitor (EG in the Arduino) running and connected to the DCC++ Basestation;
    Turn the power on <1>
    send <c>
    With nothing on the track mine returns <a1> (I guess a bit of noise on the line!) I put a 100 ohm resistor across the track and sent <c> again. It returned <a29>

    With the calculations in my previous post this equates to 2.95 x 29 = 86 mA

    My track voltage supply is only 9V (Its a small n-gauge Inglenook siding, so no high speeds wanted!) The 100 ohm resistor on 9V would draw 90mA, so the reading of 29 I get is pretty close..

    Jim
     
    Scott Eric Catalano likes this.
  3. Shaydriver

    Shaydriver TrainBoard Member

    18
    14
    5
    Hello Jim,
    Just logged in to reply with some good news - Case Closed ! I have an Arduino motor shield, and on the back there are Two solder jumpers SNS0 and SNS1 which disable current sensing when cut. You can guess their status!. Somehow I must have misunderstood instructions when doing the first tests; must admit though this hardware is VERY straightforward. When I checked Around, following your information I found reference to the jumpers. Now my base station cuts power just like it should when a shortcut occurs.

    On to the next adjustment then; my Bodnar throttle turns on track power as soon as I issue a Run command, I'd rather reactivate it with a switch, and have an LED showing track power status. Should be doable....

    Anyway, I much appreciate the good advice that's available in the forum, thanks !
    Peter
     
    Scott Eric Catalano likes this.
  4. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi Peter,
    Thanks for the update. Good to know the problem wasn't too serious!

    Jim
     
    Scott Eric Catalano likes this.
  5. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    Is or can the base controller with the wireless adurino throttles be stand alone or does it all still need to be plugged into a lap top.
     
    Scott Eric Catalano likes this.
  6. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    The reason I ask is my wife and I have to share the laptop. So if like to be able to control my logos without the laptop.
     
    Scott Eric Catalano likes this.
  7. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    You can indeed run the layout standalone with just the wifi throttle, thats how I use mine.

    However, you will need the laptop (or Mac or raspi) computer system if you need to (re)program any of the DCC++ settings or Loco address or CV settings etc.
    Jim
     
    Scott Eric Catalano likes this.
  8. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    I'm an old electronics techonligist. I have been out of electronics since 2003.
    I have zero experience with the adurino. My programming experience is very limited.
    Here's my next question. Should I just jump in and get my feet wet building the dcc ++ controller? Or should I get an adurino starter set and program some simple projects frist?
    I am really looking forward to the dcc ++ builds. Throttles and all.
     
    Scott Eric Catalano likes this.
  9. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi, I too am a retired electronics engineer, (though I only retired in 2013).

    I would definitely recommend that you get an Arduino starter set - even a very basic one, and get to know how they work and how to program them, and prove that your programming software works etc.

    Doing this will help you enormously when you come to build your DCC++ controller. I'm glad that's what I did. It helped me to get the DCC++ system working a lot quicker.

    I still use my Uno starter set to test out ideas for other projects, so it was well worth buying.

    Jim
     
    Scott Eric Catalano likes this.
  10. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    Thanks for the tip Jim. Actually I'm a disabled tech. I use to work for airport systems doing avionics. Then I had a bout with Gullian barre syndrome. Its a lot like MS but I'm getting. Better every year.
    I just ordered the adurino mega. I have an old electronic experment kit from back when I was in college.
    I spent several hours last night watching dcc plus videos and adurino videos.
    DCC++ put out some excellence. Videos explaining the adurino architecture.
    There is all so some excellence videos on writing programs and for the adurino that I have been watching.
    I got the mega for 12 bucks shipped, from reprap champion It's probably a clone and in hoping the quality is there.We'll see.
     
    Scott Eric Catalano likes this.
  11. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    This is the video series I am studying now.
     
    paulie77 and Scott Eric Catalano like this.
  12. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    This video part goes more into writing a program.
    I can't wait to get my adurino. I also need to get that serial display

     
    Scott Eric Catalano likes this.
  13. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    Scott Eric Catalano likes this.
  14. Dan Worth

    Dan Worth TrainBoard Member

    26
    36
    2
    I have created a version of DCC++ that works on the NodeMCU and the ESP-01. I created it mostly so I could have distributed sensor inputs without stringing a bunch of wires. Of course there is no DCC drive but it does appear to work with JMRI. I could post the sketch somewhere if there is interest and I have Gregg's permission (I based it on his sketch).
     
    Scott Eric Catalano likes this.
  15. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Yes, very interested.
    I have my DCC++ and several esp-01's.

    Just to let you know I use the ESP-01's in my animated Christmas Lights Display. On the forums it has been discovered there are esp-01's that do not work. some on the indicators are no "Ai-Cloud Inside" marking, has a chip marked "FUYA". The "Fuya" chip has a problem retaining the code upon a reset.
    Just be careful who you buy your esp-01 from, ask them about the above first.
     
    Scott Eric Catalano likes this.
  16. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    I only normally use one throttle, and it is true WiFi rather than using the HC12 serial wireless modules that Dave Bodnar uses on the webpage you have linked to.

    The reason I've used WiFi, is that for the functionality I require, I need 2 way comunications with the DCC++ BaseStation, so that the handheld throttle can show parameters such as points (turnout) settings on it's display.

    I have operated two of my prototype throttles simultaneously (but only as an experiment), and they appear to work without any problems, as can be seen in the video on my post here:
    http://www.trainboard.com/highball/...troller-on-an-esp8266-07.111489/#post-1033213

    I believe several forum members here have successfully got 2 wired throttles working, though the DCC++ code would have to be modified to enable a second serial port.

    Jim
     
    Scott Eric Catalano likes this.
  17. Dan Worth

    Dan Worth TrainBoard Member

    26
    36
    2
    I guess that I lucked out and got ones with the "AI-Cloud inside" label.

    I was doing a little more testing and found that I couldn't delete a sensor once it was defined using JMRI. I thought I had that working a few months ago.
     
    Scott Eric Catalano likes this.
  18. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Just noticed a typo on my part on the ESP-01 bad chip indicator. The chip will have "PUYA" and not "FUYA"
     
    Scott Eric Catalano likes this.
  19. SKMoss

    SKMoss New Member

    8
    5
    16
    Not sure if this has been asked. I noticed on Git that the last commit was 2+ years ago, and Gregg hasn't posted here in close to a year. Has the DCC++ project been abandoned?

    I'm new to the whole Arduino thing but having fun with it. Starting a new home layout and was thinking about going with DCC++. But if it's not being maintained I'll probably just stick with JMRI. I'd really like to go with the DCC++ and build a .net based user interface with the ability to graphically manage the track and trains, rather than having it all buried in the code.

    Thanks,
    Steve
     
    Scott Eric Catalano likes this.
  20. SP_fan_1951

    SP_fan_1951 TrainBoard Member

    93
    86
    6
    Check out the thread: http://www.trainboard.com/highball/index.php?threads/new-library-dccpp.113093/
    While Gregg is not currently active, there are a lot of other folks working on and with DCC++.
     
    Scott Eric Catalano likes this.

Share This Page