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

Gregg Aug 25, 2015

  1. Peter Unger

    Peter Unger TrainBoard Member

    14
    7
    2
    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
     
  2. Jimbo20

    Jimbo20 TrainBoard Member

    104
    94
    5
    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
     
  3. Peter Unger

    Peter Unger TrainBoard Member

    14
    7
    2
    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
     
  4. Jimbo20

    Jimbo20 TrainBoard Member

    104
    94
    5
    Hi Peter,
    Thanks for the update. Good to know the problem wasn't too serious!

    Jim
     
  5. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    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.
     
  6. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    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.
     
  7. Jimbo20

    Jimbo20 TrainBoard Member

    104
    94
    5
    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
     
  8. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    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.
     
  9. Jimbo20

    Jimbo20 TrainBoard Member

    104
    94
    5
    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
     
  10. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    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.
     
  11. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    This is the video series I am studying now.
     
  12. Kerwin50

    Kerwin50 New Member

    7
    0
    1
    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

     
  13. Kerwin50

    Kerwin50 New Member

    7
    0
    1
  14. Dan Worth

    Dan Worth New Member

    1
    0
    1
    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).
     

Share This Page