Layouts and layout building

Benchwork, scenery, track, and more.

Last post 12-08-2006 7:54 AM by claymore1977. 17 replies.
Rate:
Sort Posts:
Page 1 of 2 (18 items) 1 2 Next >
12-05-2006 8:29 AM
Offline claymore1977
Not Ranked
Joined on 12-01-2006
White Marsh, MD
Posts 419

Need some advice (DCC)

Morning all, I need to pick the brain of a DCC expert or two.

I am jumping back in to Model Railroading after about a 10 year hiatus due to being active duty Navy.  I was an electrician and studied solid state electronics so i understand the communications aspect of DCC in pretty good detail, but I have been trying to research what brand to buy that will meet my needs and haven't came up with much.

I am looking for a system that can be 100% controlled from a computer if need be, aka, completely automated operations.  I can take care of blockocc and such, but I am having issues determining which DCC manufacturers offer either RS-232/485 or USB interfaces.  Lenz has a USB interface, but I cannot find any documentation on how to write software for this protocol... an API would be great.  Digitracks also has a USB and a RS232/485 interfaces, but the digitracks website states its for monitoring only.

Anyone ever attempt something along these lines?

12-05-2006 8:35 AM In reply to
Offline scole100
Not Ranked
Joined on 01-09-2001
US
Posts 134

Re: Need some advice (DCC)

I have never used any computer automation, but on the Tony's Train Exchange website I have seen several automation items listed.  They are also very helpful.  I would call them and ask.
12-05-2006 8:40 AM In reply to
Offline simon1966
Top 50 Contributor
Joined on 07-07-2003
Metro East St. Louis
Posts 3,822

Re: Need some advice (DCC)

Quite a bit has been done with regard to automation and full PC contol.  Digitrax, Lenz and NCE are the 3 most likely systems due to availability of PC interface.  I would suggest you take a look at the JMRI suite of open source software at http://www.decoderpro.com/ many of the software tools to program the things you want to do are there.  Digitrax has quite an array of detection and signalling products that connect to the loconet and can all be monitored/controlled by the JMRI suite.  http://www.digitrax.com/menu_detectionsignaling.php  Finally, if you really want to get your juices flowing with what can be done go to

http://www.thetrainshow.com:80/screening_room2.htm

look at the videos on the McKinley RR.  While this is a UK prototype it has some really excellent explanation of a fantastic implementation of PC control with a Digitrax system.

12-05-2006 8:47 AM In reply to
Offline caellis
Not Ranked
Joined on 05-04-2005
Mesa, AZ
Posts 303

Re: Need some advice (DCC)

USB ports use a unique user VID for identification.  You would need to know that ID to 'talk' to the USB device.

The Lenz DCC cab bus is open and should be available for programming.

I believe the protocol is RS 485 or 486.

I would try contacting Lenz North America at

http://www.lenz.com/

 

12-05-2006 10:31 AM In reply to
Offline Stevert
Top 500 Contributor
Joined on 12-21-2001
Posts 676

Re: Need some advice (DCC)

Here in the US, the "big three" that have a PC interface available are Digitrax, Lenz, and NCE.  There are others, but these three have the largest market share and widest support.

  For complete Layout  Automation, I would have to argue that Digitrax would be your best bet.  It has the largest compliment of available components, both Digitrax-brand and aftermarket.  Plus, it has the distinct advantages that come with LocoNet. 


   The Digitrax interface is into the Loconet itself and supports sending commands as well as monitoring.  Since LocoNet is event-driven and not polled, and is very much like Ethernet, it is very robust. And since your computer is interfacing directly with the command buss, you have access to ALL of the system's traffic.  This could well come into play when it comes to automation.  The LocoBuffer USB (available here) is a better interface device than the Digitrax MS100, sort of the same way an ethernet switch is better than a hub when it comes to collision avoidance.   

  NCE has a command station with an RS-232 port, but that port does NOT echo all the command buss communication.  They have also announced an interface for their smaller PowerCab system, but it is still unavailable so it's abilities remain to be seen.

  Also, as you mentioned, Lenz has a USB interface, but again, I don't believe it echos all of the command buss traffic. 

  All three of these interfaces, as wll as many others, are supported by JMRI so your automation could be done with Jython scripts.  However, if you prefer to "roll your own", the Loconet Personal Edition doc is available here.

HTH,

Steve

12-05-2006 5:19 PM In reply to
Offline aluesch
Not Ranked
Joined on 05-10-2003
CA
Posts 104

Re: Need some advice (DCC)

You may want to check out ZIMO/STP. A system made exactly for what you have in mind. While ZIMO supports the RS232 interface for layout control, it is much faster using its own CAN bus when using the STP software. I use this system on my own layout for more than 15 years now with 45 trains controlled by the PC and any number of trains operated manually at the same time, without informing the PC about it first. The MX1 command station manual has many pages of RS232 information if that's the way you choose to go. You can download the manual here: http://www.mrsonline.net/html/manuals.html A ZIMO catalog is also available here: http://w3.zimo.at/web2003/pdf/ZIMO_Systempr_DCC_2006_E.pdf Regards, Art ZIMO Agency of North America www.mrsonline.net
12-05-2006 7:58 PM In reply to
Offline claymore1977
Not Ranked
Joined on 12-01-2006
White Marsh, MD
Posts 419

Re: Need some advice (DCC)

Thanks for the info guys, good stuff.  In case anyone is interested, I am drafting up plans that use a hybrid DCC / Homebrew electronics for total automation.  Cheap current detectors monitoring 8-16" lengths of track for block occ, and RFID readers at various points throughout the layout (Each rolling unit will have an RFID tag in/on it somewhere.  Since both of those elements will be linked to a computer via USB, all rolling stock can be automatically tracked via using a database on the computer and since the computer will have control over the DCC system, it can control the individual engines and know (approximately) where they are on the layout... well, at least the last RFID checkpoint they passed then logically assuming location by tracking the block occ signals.

With this system in place, it would be very easy to use either the DCC controllers or make my own and feed the signal into the PC.  This should allow nearly perfect automatic ops with the ability to 'take over' any engine anywhere and the system would adapt to it.

I found these awesome little toys called phidgets (http://www.phidgetsusa.com) that allow nearly dirt cheap I/O to a computer via USB.  The killer part is they offer a completely free API for writing software in VBScript, VBA, VB6, and VB.net.  This means you can theoretically use something like Microsoft Access as an inventory control & tracking/layout control system.  Or setup Microsoft's free version of SQL server, script an applet and plug in your favorite wireless game controller! :)  There are enough things at the phidgets website to spark lots of ideas. 

Some of the ideas I have had:

-Use 4 digital outs to simulate a DCC control bus.

-Make a computer controlled conventional DC control system by using 8 digital outs and run them through a Digital to Analog Converter (DAC), then the output of the DAC through an amplifier of sorts.

-Wire the output of a current style block occ sensor directly in to the digital inputs.

-Servos (or something like it) for turnout control and other animated objects like moving crossbucks, cranes, drawbridges, etc.

-Use a photocell wired into the an analog input to monitor the current light level in the room and turn on street lights, marquee signs & car's headlights at various light levels.

-If you are running DCC, make a custom power supply for a wireless webcam so it can take power straight off the tracks and find away to mount the camera to a flatcar or something :)

-Use some of the RFID kits for what I mentioned above about tracking and inventory.  Additionally, if my engines end up with a sound system onboard, I can set trip points based on a RFID sensor or block occ sensor and make the computer send signals on the DCC system to make the engines sound off accordingly, say, as the approach a railroad crossing or residential area.

 

These are just some of the ideas that went through my head, I have had so many I am forgetting them (should probably write them down) but if anyone is inspired the way I was, I would love to see any ideas that you come up with!

 

12-07-2006 12:13 PM In reply to
Offline claymore1977
Not Ranked
Joined on 12-01-2006
White Marsh, MD
Posts 419

Re: Need some advice (DCC)

No takers on that last post eh?  Well thats kinda disappointing...

 Anyways, I have researched the major 4 DCC manufacturers and I can say, that from a computer interface perspective, Easy DCC wins hands down.  All of them are compatable with several commercial software packages out there, but only Easy DCC actually has some of the API documented for those of us who think that the existing commercial software isn't all that great.  JMRI seems like a great idea, but just isn't getting the dev time it needs.

Does anyone have any info on programming in VB6/VBA as it pertains to linking a PC to LocoNet, eXpressNET, etc?

12-07-2006 1:18 PM In reply to
Offline caellis
Not Ranked
Joined on 05-04-2005
Mesa, AZ
Posts 303

Re: Need some advice (DCC)

You may find what you need to use VB with USB port communications here:

http://www.intel.com/intelpress/usb/examples/vboverview.htm

I was a Software Developer for 42 years and had used VB for at least 10 years before retiring two years ago.

Since retiring, I only a computer user... no more programming! 

 

12-07-2006 1:26 PM In reply to
Offline claymore1977
Not Ranked
Joined on 12-01-2006
White Marsh, MD
Posts 419

Re: Need some advice (DCC)

The whole USB thing is more of a nice-ity as serial comms with a command station/ command cab is perfectly fine.  What I am looking for is a list of commands for each of the platforms so I can make a quickie API in VBA and start coding.

After looking over some code snippets that work with the EasyDCC rs-232 connection, it almost looks as if you use telnet to issue commands:


Dim MyString As String, MyMsg As String

    mdiSOCS.MSComm1.PortOpen = True             ' Open the COM port
   
    mdiSOCS.MSComm1.InBufferCount = 0           ' Empty the input buffer
   
    ' Request the Version Number
    Screen.MousePointer = vbHourglass           ' Set cursor to hourglass
    mdiSOCS.MSComm1.Output = "V" & Chr$(13)     ' Send "V" (request version number)
    WaitPort (12)
    MyString = mdiSOCS.MSComm1.Input            ' Return string
    Screen.MousePointer = vbDefault             ' Reset cursor to default
    MyMsg = "The Command Station's version is: "
    MsgBox MyMsg & Chr$(13) & "'" & MyString & "'", vbInformation, "Version"
       
    mdiSOCS.MSComm1.PortOpen = False             ' Close the COM port

The bold faced line has my interest.  Does one know if/where there is a set of standardized commands for DCC? or is there a standard when it comes to the control cab?

12-07-2006 2:09 PM In reply to
Offline rrinker
Top 50 Contributor
Joined on 02-14-2002
Reading, PA
Posts 5,638

Re: Need some advice (DCC)