# DCC Computer Control



## MechE-83 (Nov 15, 2019)

Hey all, looking for a little advice.

Just getting started in the hobby, and trying to not spend too much money.

Towards that end, I know I'm going to want to be able to program my trains to run automatically at some point. So I'd rather head in that direction from the start.

Was hoping that people might weigh in on what computer throttles have worked for them, and what hardware pairs well. (Power supplies, boosters, sensors, ect)


Thanks All!!!


----------



## MichaelE (Mar 7, 2018)

Running trains automatically requires computer control. I'm unaware of any DCC system that allows automatic operation of trains.

Major layouts mostly all use computer control. Smaller layouts can take advantage of it, but for me it's not worth it.


----------



## JerryH (Nov 18, 2012)

Planning on PC control should be done with research and planning before spending any money. How much is automated from a little to anything goes, will dictate what would be required in hardware and software. Wasted money on buying things only to replace it later when it doesn't work as envisioned is the pits. You might want to look this long thread over as it will cover from planning to a fully automated and many issues in between.

https://www.modeltrainforum.com/showthread.php?t=14852


----------



## Severn (May 13, 2016)

A start would he dcc++ and jmri. In fact if you just want to automate you probably can just go straight to the dcc++ interface which is a simple text protocol. But jmri will help with familiarization, basic operations and programmings CVs and all that.
You might want to check out mark divechios web page for related work but for mth dcs

http://www.silogic.com/trains/RTC_Running.html

https://github.com/DccPlusPlus/BaseStation/wiki/What-is-DCC--Plus-Plus

https://www.jmri.org/


----------



## wvgca (Jan 21, 2013)

if it matters , jmri is free and the DCC++ system [in it' 2 amp state] can be built for roughly 60-80 dollars.. 

So a low cost entry level system ... block control and signalling will add quite a bit more , both in cost and control ..


----------



## Severn (May 13, 2016)

I used the pololu motor driver combination, an option for dcc++. the pololu web entry for it says it "can" deliver 3 amps continuous per channel (2). well that's good for many scales maybe but larger scale stuff maybe not so much. now pololu has many similar drivers for higher amp needs. but you'd of course have to get the original code ported or retrofitted yourself to new hardware. so that's a possibility if you need it but probably way more effort than anyone would have the interested in at the get go.


----------



## 65446 (Sep 22, 2018)

Obviously an irrelevant post. Removed...
Admin welcome to delete this...


----------



## gregc (Apr 25, 2015)

MechE-83 said:


> Towards that end, I know I'm going to want to be able to program my trains to run automatically at some point. So I'd rather head in that direction from the start.


while having software able to control a train is certainly needed, detecting the location of trains is also required.

on the layout i'm familiar with, there might be a detector for a block, but a separate detector near the end(s) where a train may need to stop. Software would stop the train when it enters those end blocks.

of course, the controller needs to know either turnout position or signal indication at junctions which require a train to be stopped.


----------



## MechE-83 (Nov 15, 2019)

Thanks all!!
For my first layout I'm just looking to do a small loop around my Christmas tree. My hope was that I could set it up to run around the loop a couple times then sit either at a station, or in a tunnel. then repeat the process, maybe have it run once or twice an hour type of thing.

I had come across JMRI, as well as CTI trainbrain, and traincontroller by Freiwald.

CTI seems to be pretty much a whole package, PS, sensors, and freeware computer software, but the others are just the software, and I'd have to figure out what hardware works best with it.
I was sort of hoping that someone with experience may be able to point me towards a good program/hardware set. 

Thanks again!!!


----------



## Shdwdrgn (Dec 23, 2014)

wvgca said:


> ... the DCC++ system [in it' 2 amp state] can be built for roughly 60-80 dollars.


That is only if you're using the expensive arduino and shields. I built the ESP32 version (which includes wifi control) and a 43amp bridge for less than $30, but everything is hand-wired.




gregc said:


> while having software able to control a train is certainly needed, detecting the location of trains is also required.


My understanding is that DCC++ can also read an S88 bus and show those values on the telnet port along with the DCC commands. The ESP32 version of this code is currently working on adding LCC functionality into the code, but LCC can also be set up separately with an arduino acting as a repeater to put the information out on telnet. Once you have access to that information, you can write your own script to manage the layout.


----------



## Tom_C (Jan 8, 2016)

For sensors, Azatrax IR detectors are bullet proof.

Also Tamvalleydepot has a good reputation. I use one of their train shuttles to automatically control a back and forth DCC railbus for my holiday layout. Unfortunately, they discontinued it. There is also a shuttle unit by a UK company blocksignaling.co.uk. I have tried it, but it's got a small power capability, so recommended only for HO and smaller. I used it with On30, and it worked but sometimes would overload and shutoff. But, the operation worked well.

Z-Stuff for trains has some IR sensors, and while they work when I added a bunch of fake snow to my layout they lost their mind because of all the light bouncing around. I switched to Azatrax which can be installed using reflective mounting of the LEDs... it shines an IR beam up and it bounces off the bottom of the rail cars back into a detector. As I said, it's bullet proof. Highly recommended.

I also will recommend the Powercab starter kit, going for around $175 nowadays. There are other controllers, but I have no experience with them. I use a bachmann ez-command controller for running the trains and the powercab to program. The bachmann unit is very limited, but it's easy to use and anyone can run a train with it with no experience.


----------



## gregc (Apr 25, 2015)

Shdwdrgn said:


> My understanding is that DCC++ can also read an S88 bus and show those values on the telnet port along with the DCC commands. The ESP32 version of this code is currently working on adding LCC functionality into the code, but LCC can also be set up separately with an arduino acting as a repeater to put the information out on telnet. Once you have access to that information, you can write your own script to manage the layout.


bear in mind that the NMRA's support for LCC, supports separating control of locomotives from other I/O (e.g. detection, turnouts, signals).

so an automated train control system 1) interfaces to something like LCC or CMRI to align turnouts to establish routes and determine train location, and 2) interfaces to a DCC system (e.g. NCE, Digitrax, DCC++) to control trains.


----------



## J.Albert1949 (Feb 3, 2018)

If all you're looking for is a "loop around a Christmas tree", just run it using regular DC.

If you want the train to stop now and then, stop it yourself. Then start it again.

I ran the big railroad locomotives for 32 years. Frankly, I can't understand why anyone would _want_ an engine that "runs itself" -- I wouldn't have had a job!


----------



## DonR (Oct 18, 2012)

There are products on the market that will
permit your train to approach a station, stop, then
continue on.

Here is one: (scroll down)

https://www.ncedcc.com/online-store/Bach-Dsl-replacement-decoder-for-Bachmann-p38322131

Don


----------



## MechE-83 (Nov 15, 2019)

Thanks for all the advice everyone!!!

So far JMRI seems to be the way to go as far as programming.
Also, I think I have figured out the NEC components I would need to do a small setup, without having to by a starter kit.

Last thing for me to research is DCC++!!!

Thanks again everyone!!!
I'll make sure to post an update when I get something running!


----------



## MechE-83 (Nov 15, 2019)

Shdwdrgn,

Thanks for the input!! 
I'm still learning, but I've got no problem hand wiring my own stuff. 

For now I built a basic base station with an uno and a motor shield. 

I know I'm getting ~16v to the tracks, but I'm still getting a 308 error out of JMRI.
In the process of googling that now, but if anyone has any advice I'd love to here it.


Thanks again all!!!


----------



## wvgca (Jan 21, 2013)

MechE-83 said:


> but I'm still getting a 308 error out of JMRI.


308 just means it's not getting a current draw reading back ...
incompatible motor driver, sense signal on different port, using the main rather than programming track, could be just about anything ...
does it program okay ??


----------



## MechE-83 (Nov 15, 2019)

I'm guessing it has to do with inconsistent power.

I got the train to run, using address 03, but it was not smooth. Got power, lost power, etc.
Track power is consistent, and the train is an old one that I updated, so I'm guessing the fault lies somewhere in the locomotive. (or my wiring!)

I did not try programming it on the programming track though, just on the main. I had figured that more power would be better, but I can try using the programming track tomorrow.

Thanks again, I'll keep everyone updated with my progress. 
Thanks to everyone who's helped get me this far!!!


----------



## wvgca (Jan 21, 2013)

if you are using DCC++ then you must program on the program track pair, and run on the main pair ... 

don't know of any way to get around this, i -mostly- use the program pair to enter new data into a loco, and read back what works on the main layout after wards [with a MRC setup] ..


----------



## Severn (May 13, 2016)

I also had some problems with the programming track vs the operational track, although some manufacturers seem to allow both. It's possible this is a DCC++ thing. Jmri seemed to improve a little over the course of a couple of versions I tried. As of say 2 weeks ago I was using the most recent beta version. But mixed into this was a bad board from soundtraxx, which they replaced on their nickle -- no complaints.


----------



## Shdwdrgn (Dec 23, 2014)

wvgca said:


> if you are using DCC++ then you must program on the program track pair, and run on the main pair ...


Really? I don't have a programming track, I write all of my CV values on the main track. The only limitation is that I can't read back values. I can't imagine NOT being able to do programming on the mainline since I'll change values as a new loco is running to fine-tune the speeds (like changing CV2 to get speed setting 1 to move at a steady crawl).


----------



## MechE-83 (Nov 15, 2019)

Hey everyone,

Thanks again for all the help.
I've definitely made progress, but not quite there yet!!

I've got my base station all setup, and I've got the decoder installed in my old train.
I've even had some success programming and short bouts of running.

But I seem to have intermittent connections.
I almost always get headlights, but I often still get a 308 error when using decoder pro. Also, when I try to run using JMRI's throttle in Panel Pro I often get either jolting motion, or it'll stop altogether and seemingly loose connection.

Once again, any thoughts or tips would be much appreciated!!!
Thank you all!


----------

