DCC++EX & reverse loops

Clifford Aug 18, 2022

Tags:
  1. Sumner

    Sumner TrainBoard Member

    1,861
    2,732
    48
    Thanks for the additional info.

    I haven't and not sure if I will. I'll have the option to run continuously on the upper or lower level of the layout so the plan now would be to maybe have a train running on both unattended and I'd be working with another one. I look forward to actually working with it and throwing turnouts and such as if I was crew on the train.

    Now if the track elevator works well enough to run unattended I might be interested in something automated to deal with it and a train running unattended on the lower level to the elevator. Go up and off and around the upper level and back to the elevator. Back down to the lower level and around it and stopping or making another lap. I though I'd use an Arduino, occupancy sensors, and relays to turn track power on/off and to run the elevator up and down. Long was to go before I'm ready to try that and if I do I'll look a lot harder at EX Rail.

    Good luck on the move, eventually everything is in the new place,

    Sumner
     
  2. Mark Ricci

    Mark Ricci TrainBoard Member

    394
    375
    8
    Thank you. Trying to execute a dual close of the recent craziness in the real estate market has been challenging to say the least. And, for all the insights and support.

    As you know, fairly new to the hobby but over time seems that locos always run better after wheel cleaning but even better after some running time immediately following. Don't know if anyone else experiences this and performs a post cleaning run?? I used to manually run immediately after cleaning forward and backwards at various speeds.

    At anyrate, I'm attaching a file myAutomation.txt renamed due to Trainboard extension limitations. if you like the idea of an automated post cleaning run... It essentially turns on headlight, Moves loco forward at Speed Steps 7 32 63 94 63 32 7 at various durations for each speed change. Loco Stops for 5 seconds. Moves in reverse at the same speed steps each at various durations and stops. Repeats the forward speed steps sequence again then stops and turns off headlight as the final step. About 21 mins to complete.

    Assuming you installed DCC EX via Arduino IDE, the default location of the CommandStation-EX folder is inside the Arduino folder which is inside the Documents folder on PC. Since Trainboard does not allow .h extension for an attachment, Just change the extension from txt to h after download. Copy the myAutomation.h file into the CommandStation-EX folder. Unless you have created one, by default also, the myAutomation.h file does not exist so you will not be overwriting anything. Also, sometimes Windows hides extensions when showing filenames so be careful when changing extension so you don't end up with myAutomation.h.txt

    1-Start IDE, verify(always do), save and upload.

    2-Start ED and go to throttle after Mega reboots from upload.

    3-Acquire loco.

    4-Go to Routes on ED, and you should see " AUTO:21Min PostCleanRun‐Select Loco " Touch the button and away you go.
    The automation does not pre-acquire loco by design since I wanted to use for any loco.

    Speed Steps and durations can be easily changed by going into IDE and editing the myAutomation.h Verify, save and upload.

    Or if for some reason you no longer want any of this, go to the CommandStation-EX folder, move the myAutomation.h file out of there, Verify, save and upload.

    Thanks again.

    PS. There are more efficient ways to do this automation but I'm not a coder.
     

    Attached Files:

    Sumner likes this.
  3. Mark Ricci

    Mark Ricci TrainBoard Member

    394
    375
    8
    If you like, Have never researched or have need for reversal but if time permits...And if the following or some similar experiment can simulate what needs to be tested..

    Say we have 2 separate 15-18" track segments,
    1-Take the A channel (Main) OPS output and connect to segment on the left.
    2-Set the B channel to DCC and connect the B channel to the segment on the right maintaining same wiring scheme to respective rails (wht outside rail, blue inside)
    3-Turn on and run loco from left segment to right segment.
    4-Rotate right segment, say 30 degs.
    5-Set some sort of "reversal" mode on B channel
    6-Complete Rotating Right segment to 180 deg.s from start
    7-Attempt to run loco back to left segment???
     
    Sumner likes this.
  4. Sumner

    Sumner TrainBoard Member

    1,861
    2,732
    48
    Thanks I'll save that and give it ago later when I'm not in carpenter mode. Also the reversing scheme looks doable. I guess for test purposes I could use...



    ... the turnout tester I build and isolate one leg from the turnout from the other leg/legs and purposely wire it backwards. Run from the main route to the divergent reversed wired one and test the auto-reverser.

    Sumner
     
    Mark Ricci likes this.
  5. Mark Ricci

    Mark Ricci TrainBoard Member

    394
    375
    8
    Wow, that turnout tester is incredible. Very cool way to test... I have limited track , and no experience with reversers but trying to help.

    There is a new release candidate 4.2.2 rc1, have not tested, but should be good if you want to run DC Loco.. The link below

    https://github.com/DCC-EX/CommandStation-EX/tree/PORTX_HAL

    A few suggestions and how I work with this...
    1-Make sure IDE is not running...
    2-Assuming you are using the same pc for other installs...Rename the existing command station folder, CommandStation-EX , inside the Arduino folder which is inside Documents, so that it remains untouched, typically I'll add a date code in front say 220823 Command Station EX or some other added hint.
    3-UnZip the Github download called CommandStation-EX-PORTX_HAL , rename the un-zipped folder to Command Station EX and placed inside the Arduino folder. The folder name for DCC EX to work must be CommandStation-EX
    4-Start IDE. You should see tabs with various dcc ex files along the top. All the way to the right is a down arrow, click and select new tab.
    5-Name tab mySetup.h
    6-Add the following lines

    SETUP("<1>"); //Turns on Track Power
    SETUP("<=A DC xyx>"); //Places A channel in DC mode and pushes xyz or change to whatever road number you want to push to ED

    Verify, save and Upload. The A channel is now set to run DC loco xyz on the track.

    While I have a lot of faith in this, don't have many locos so as a precautionary measure.. Without actually placing a loco on the track, acquire loco number on ED, checked DC Voltage across rails, it should be somewhat linear as throttle is increased or decreased. measured at 50% throttle- 8.2 V dc across rails, 100%-10.8 VDC. The first time also checked with LED and current limiting resistor. :)

    or just...

    Go to ED, acquire loco xyz and away the DC loco goes (or should go).

    Assuming you had a previous CommandStation-EX and if you want to go back to the pre DC setup...
    1-Quit IDE
    2-Move the CommandStation-EX (and/or rename the DC version to trash or different place on HD to eg. use another time, build on)
    3-Delete the date code and other hint in the original CommandStation-EX folder to restore name to CommandStation-EX
    4-Start IDE
    5-Verify, save and upload.

    I use this procedure a bit since experimenting with different EX versions, a few Arduinos and 3 pcs.

    Have only 1 DC loco to test, but know there are others who have fairly large inventory of DC locos.....
     
    Sumner likes this.
  6. Sumner

    Sumner TrainBoard Member

    1,861
    2,732
    48
    Thanks I see CommandStation-EX.ino at the link but not CommandStation-EX-PORTX_HAL. I'm not to familiar with GitHub. Used it loading the old DCC++ but now have been taking the easy way and using the auto-installer on the site when I've changed versions with DCC++EX. I know from writing my turntable code how to use the Arduino IDE to some degree but that is about it.

    Sumner
     

Share This Page