Skip to main content

I am designing a layout and am interested in what computer programs can be used monitor and control a layout.  I want to make sure the layout wiring is designed for monitoring and control.  I have the all of Barry's DCS books and a Legacy book.  What are the available programs and a links for information on each?  Thanks, Carl

Original Post

Replies sorted oldest to newest

Marty is right.  With Dave's help, my layout is capable of computer controlled operation and it is quite fascinating to watch.  Dave is also a forum sponsor and is the most knowledgeable guy on the planet when it comes to the inner workings of DCS.  Also, he is a great guy and extremely helpful.  I also think his pricing is quite reasonable.

It is not clear exactly how much computer control you are after.

DCS and Lionels digital control systems are computer control but you decide what it does in real time. DCS offers a "Record" mode where you record your every command and the layout reproduces it every time the same way (Must start all trains in same place on layout every time).

Then there is total automation. Start and let the trains control themselves. That would take tons of programing and an unknown to me link between a computer and the MTH or Lionel digital control system. Another approach is to use bunch of uComputers (think Arduino) with sensors to tell the computer where trains are so the system can "think" and respond accordingly. I'd be interested to know about any existing application programs that allow a computer to control either DCS or the Lionel digital control systems and through which port on the train control device form MTH or Lionel.

As an aside I have a HO trolley layout along the wall with a loop at the end. It has three station stops. I designed a control system for it that makes random stops at the three station for random times and reverses directions at the end stations after a random stop delay at the end stations. Every startup rings a digital trolley bell. I also made a digital throttle for the DC operation using pulse width modulation for speed control including two choices for inertia for startups and stops. It took several Arduinos to get the job done and about six month to figure out how to do it, implement it, and program it. The layout once started initiates itself and runs forever or until I tire of watching it. I'd probably not do it again and I have no interest in revealing my method because it would be too hard to trouble shoot remotely.

LDBennett

 

 

JMRI has the interface setup for TMCC control of layouts and trains. It works quite well and has a wonderful interface setup for control panels and what not. The reason I dropped it was it was far too complicated for a layman to load up and run. You can also use the hardware from CMRI interfaced with the JMRI software. I was using other stuff for turnout and train control but it does work quit ewell and is designed for this exact application. The software is free too

I am building a computer controlled layout,using C/MRI and JMRI. C/MRI stands for Computer Model Railroad Interface, and is the hardware portion of the solution. JMRI stands for Java Model Railroad Interface, and is the software portion of the solution.

When complete, the computer will control three basic functions of the layout: turnouts, signals and detection. JMRI software will provide a dispatcher's panel and display all of these functions on one screen. Mouse clicks will select routes and throw turnouts. Because TMCC and Legacy are directly supported by JMRI, it will be possible to have the computer run trains automatically.

I do not have DCS on my layout, because its proprietary codes will not allow for real time control. Preprogrammed movements are not the same as live action control.

As others have said, how far do you want to take this? There are many levels of complexity to be explored in this project.

That's sound great.  It wasn't clear from the website that JMRI supported the full legacy command set.  It says or I thought it said:  "TMCC through a serial interface to the base" -- TMCC is a subset.

I imagine it wouldn't too terribly hard to go through the lcs wifi instead and then "get" all the other legacy commands... but someone would have to do it ... or perhaps it's already done.

MTH DCS is a closed system.  Except that Mark Divecchio's RTC will send DCS remote commands from a computer to the TIU and then onto the items on the track.

I feel certain that could be retrofitted into the JMRI architecture... but no one has tried it that I'm aware of...

Once again this is in the "free" side of things -- not counting the hardware, the trains, the track and any "interface modules" such as the LCS items.

Dave Hikel has a program that translates DCC commands (issued by Freiwald's Train Controller) to DCS commands, allowing that software to operate MTH or Lionel trains.  The Train Controller is incredibly sophisticated, I'm pretty sure it is the system behind the Miniature Wonderland In Hamburg, Germany.  It's definitely not free, but it handles detection, throws switches, and with Hikel's translation program, runs the trains very well.  It will run trains completely randomly, or can be programmed for very complex "schedules" utilizing many trains.  I typically have it run three trains on my two interconnected mainlines and it will stop and start trains to allow meets and crossovers.  It also runs trains through my two reversing loops, so it's always interesting when the computer is in control.  Built into the software is a network server, which allows display of the layout trackplan and shows the location and name of each train as well as the route reserved for it, on any device with a browser.  This also allows trains to be operated with the smart devices, with the display fully customizable.  Sadly, the throttle display isn't as nice as the MTH or Lionel apps.  I could write lots more about this incredible system, but I hope you get the idea.

Of course, you can still operate everything with the proprietary remotes or conventionally, too.

My layout is WAY too small for the Dave Hikel /Freiwald's Train Controller. But it is interesting to me the someone has gone to this extreme. I suppose it is necessary for a very large layout if you want one man control of several trains at once or need a repeatable demonstration session. Now, if someone would invent a program that made the trains autonomous (read thinking) and reacted by them selves to the train environment..WOW. Maybe the Dave Hikel /Freiwald's Train Controller is it????

It is possible with the MTH DCS TIU/AIU to record a series of commands (a session) while operating trains and playing it back for automatic operations of several trains. But to playback you have to start all trains in the recorded starting positions. I have used it a couple times to see how it works and it does works well. Apparently you can save up to three recorded session like this and if you stop the session with the engines exactly at their starting points you can make it run continuously by re-starting it at the end of each session. I have no idea how long the session can be (??) but at least 15 minutes or more in my testing. I suspect much longer (??).

My HO trolley layout Arduino controller has sensors on the track so it knows where the trolley is and goes through a random process at each of the three stops. The hardest part of the project was making a pulse width modulation digital throttle. It came out just OK, mostly because of the limitation of the Arduino or my programming capabilities, which are minimal at best. The biggest problem was minimum speed and the frequency limits of the digital throttle. It ended up in the audio range by necessity and can be heard as the trolley runs. It is subdued but present. I have no desire to do it again or continue to develop it. Programming is NOT my strong point whereas digital electronics use to be when I worked some 20+ years ago. It was a challenge to just get it to work and I got to there and am done with it.

 

LDBennett

I don't know enough about it.  I am aware there is that mode.  Is it a safe bet that a DCC controller is needed?  I also don't really know much about JMRI, for example -- what about switches? -- surely it must have a way to flip them... but maybe not.

Above:  it's funny you mention PWM.  (pulse width modulation)  I was just playing around with that and DC motors & a raspberry pi... got some to turn one way or the other, not particularly well.     If the freq is low enough you can hear the whine, that's true.

I found this PWM stuff to be easy to get basic result, hard to get good results.

 

On PWM: That is the way MTH DSC (and others??) control DC motors in engines. But they use a basic frequency (carrier, if you will) way above the audio range. The DCS uses the 18 volts AC, rectifies  and filters it to DC, chops the DC up with pulse width modulation controlled by the DCS commands coming down the track impressed on the AC track voltage. So low speeds give the DC motor a series of narrow pulses for low speeds and makes the pulse width at the same frequency wider to accommodate higher speeds, all the way to a DC level (100% pulse width).

When I tired to that with my digital throttle controller I kept running out of time for the program to minimize the narrowest pulse which limited the lowest speed attainable. As I reduced the basic pulse frequency (carrier frequency) I gained time for the Arduino to do its thing but I was down into the audio range. There are other programming techniques (I am told) that would be able to get to zero PW but I did not know them and they were beyond my comprehension of uComputer programming. So I was left with audible PWM signals to the motors which is barely audible but perceptible, none the less. As one of my favorite YouTubers says "Good enough for the girls I go out with".  :-)  :-)

 

LDBennett

On the PWM, you need something not under direct CPU control maybe.  I used the raspberry pi with a "slave" motor board for power -- the pwm comes from the pi but this is through a chip that provides it.  However even this is not enough because I also tried to do something back emf to calc rpm& it became clear I need a more dedicated but off CPU solution.   Technically I'm still working it but its been sitting for weeks now.

There are lots of motor boards out there ... the one I used was simplistic and drove from the PWM "chip" on the pi as I said an the motors have a big start up power spike so may not have supplied enough current ...

And only knowing enough to be dangerous doesn't help.

I over simplified my PWM digital throttle design in explaining it before. I actually had to use two Arduinos and a custom designed analog circuit to actually power the tracks. I have a hand controller with forward/reverse selection, throttle potentiometer, inertia selection (choice of two). I did my own digital to analog conversion in the Arduino. I built an amplifier to go from the digital D to A conversion low level signal to a power boosted three stage amplifier. I did all this a couple years back and have forgotten the details but I spent many hours getting the programming as good as I could. I did well considering the last circuits I designed or trivial programming I had done were done perhaps 30 years ago and I retired 20 years ago.

I also did the programming and design of still another Arduino for stopping and starting the trolley with a purchased relay board. The bottom line is it all works and took about a year to get it done.

LDBennett

That sounds interesting.  I am not an hw person, so I really don't know what I am doing.  I ran 2 DC motors off the raspberry pi as described earlier.  I used a "motor power board" for the actual power but the PWM comes off the pi.   I designed a circuit to read the power on the motor leads.   The circuit is a rectifier if memory serves but then after that chops it down to 0-5 volts or so -- is what i aimed for.  I hooked that up to an A&D chip and can sample the volts back on the pi.   When i run the motors, i stop them briefly (about 20ms) and read the A&D values.  The results seems noisy but I get values that make in aggregate to my eyeballs make sense.  I bought a cheap scope and think I see BEMF there, but it looks a bit tricky to design a proper control loop with what i've done. then again, i sort of stopped right to what i just described for now...   I could make a simpler solution with what I've done -- make the motors turn somewhat slow, medium, fast ... but was hoping for something more.

An alternate solution is to just buy a complete but independent of the CPU motor control board of which there seem to several options on the market place ... but where's the fun in that?

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×