Jump to content
 

Club layout - partial automation using *both* DC and DCC


Skinnylinny
 Share

Recommended Posts

Well, this is the first time I've poked my head into this part of the forum, and I hope I'm in the right place!
 

I'm a bit out of my depth, as I'm a dyed-in-the-wool analogue user, but my club (the Edinburgh and Lothians MRC) has decided on the next layout in the queue to be built, and there are some interesting challenges to overcome. The layout will be a model of Edinburgh Haymarket station, with a continuous run, and will be replacing our existing roundy-roundy. As such, it will need to be able to run in either analogue or digital modes to allow for test running of stock. This much is (relatively) easy to arrange (with lots of relays to switch on all the isolating sections when in digital mode). However!
 

Our previous roundy-roundy ("Newcastleton") ran strictly on analogue, and had a fiddle yard with 12 tracks (6 in each direction), each of which could hold two trains. Using IR detection and isolating sections, when one train left a fiddle yard road, there was a delay of a few seconds, then the next train would "move up" to the "front" of the road and be ready to depart next, clearing a space at the "back" of the road for the train that was going around the scenic side of the layout.

 

Given the length of the Haymarket plan, it has been suggested that it would be nice to have a similar "move-up" system in the fiddle yard. However, we would need this to work both with analogue and digital operations. Indeed, given the track layout of Haymarket, the layout could be split into two double-track loops, completely electrically separated from each other, so that half of the layout could be digital and half analogue at the same time, which would be especially helpful on clubroom nights.

We'd like (at least) DC stock to be able to run on the layout without any modification, and ideally minimal cost to modifying DCC stock.

 

So far we've looked at, and discounted:

- IR detection alone (no use for DCC as it doesn't identify the address of the train passing over it)
- Commercially-available DCC track occupancy sensors (no use for DC)

- Current draw detection (would require the fitting of resistive wheelsets to any train to operate on the layout).

 

One combination that appealed was using both IR and RFID detection (to identify the DCC-fitted trains as they pass the reader, and IR to detect the position of the front of the train), as this would require no modification of analogue stock, and suitable RFID tags are cheap enough that there's not really a price barrier to their use. However, we'd probably need to wire everything to a computer of sorts (most likely a Raspberry Pi) and write custom software, which is getting rather involved.

 

Are we missing any obvious solutions? Indeed, has anyone built anything similar?

Many thanks in advance!

Link to post
Share on other sites

An interesting challenge that is a bit more complex under the surface than it might appear on the top.

 

I agree that the use of RFID is possibly the only solution that will answer the DC and DCC identification though it does then beg the question of what software you will be using for the automation as that software will need to be able to use the RFID tag information to either display the tag ID or better, to read the tag ID and then use that in a lookup to display the actual train name on the output device(s).  It may also be useful to display the decoder ID for the DCC system. DC might want to use some other form of ID.

 

Train Positioning can be done reasonably accurately in DCC, with the appropriate software, to certainly +/- 10mm and decent software will allow you to adjust the tag position on the loco relative to the front and back of the loco. You may also be able to use the tag for ID of the wagons which is what McKinley does. 

 

On the software from there are open source programs - JMRI and Rocrail as the main contenders that will work for DCC, and commercially iTrain and TrainController. but the RFID integration is, for me, an unknown presently, though iTRain is considering it as a potential for iTrain v6.x and I think JMRI is also considering it. These will not work with DC - unless you are using Dinamo from VPEB, but that is far from cheap!

 

For positioning I suggest you also consider Light Dependent Resistors (LDR) which can be bought as complete boards ready for use from China for 70-90p per board - and the light sensitivity is adjustable on them. 

Link to post
Share on other sites

49 minutes ago, WIMorrison said:

An interesting challenge that is a bit more complex under the surface than it might appear on the top.

 

I agree that the use of RFID is possibly the only solution that will answer the DC and DCC identification though it does then beg the question of what software you will be using for the automation as that software will need to be able to use the RFID tag information to either display the tag ID or better, to read the tag ID and then use that in a lookup to display the actual train name on the output device(s).  It may also be useful to display the decoder ID for the DCC system. DC might want to use some other form of ID.

 

Train Positioning can be done reasonably accurately in DCC, with the appropriate software, to certainly +/- 10mm and decent software will allow you to adjust the tag position on the loco relative to the front and back of the loco. You may also be able to use the tag for ID of the wagons which is what McKinley does. 

 

On the software from there are open source programs - JMRI and Rocrail as the main contenders that will work for DCC, and commercially iTrain and TrainController. but the RFID integration is, for me, an unknown presently, though iTRain is considering it as a potential for iTrain v6.x and I think JMRI is also considering it. These will not work with DC - unless you are using Dinamo from VPEB, but that is far from cheap!

 

For positioning I suggest you also consider Light Dependent Resistors (LDR) which can be bought as complete boards ready for use from China for 70-90p per board - and the light sensitivity is adjustable on them. 

This is quite simple to solve for a competent Arduino programmer. There are several good Arduino RFID libraries and compatible RFID readers available. There are also libraries to construct and send Loconet transponding messages which TrainlController, iTrain, JMRI  et. al can understand.

 

With a little bit of protocol conversion code on the Arduino detection messages which your train control software of choice can understand can be sent.

 

Example libraries - others are available:

Arduino - RFID/NFC | Arduino Tutorial (arduinogetstarted.com)

An Introduction to RFID with Arduino — Maker Portal (makersportal.com)

LocoNet - Arduino Reference ( https://www.arduino.cc/reference/en/libraries/loconet/ )

 

Cheers

Dave

 

Link to post
Share on other sites

There is RFID support in JMRI, and has been for quite a few years.   Supports a number of formats/connections.     
 

In addition to Dave's list above, there's also sending in messages using MQTT over WiFi as an alternative to cabled networks.  (We're doing that on Burntisland-1883 with RailCom reports, but our detectors might as well be RFID, happy to discuss code/approach if relevant, and we're "local".  ).

 

 

One extremely radical approach for control might be DCC+Ex - that now supports many "motor shields" (aka "boosters), and setting the output of a given "booster" to Analogue (PWM) or Digital.  This can be swapped "on the fly", so in principle different parts of a layout could be analogue and others digital (I'd suggest that's going to lead to tears, so don't do it on a layout!).   
With Analogue, there are issues around crossing PWM boundaries between different "boosters" which will lead to short circuits unless handled carefully (the most recent IoTT video on YouTube discusses this). 

 

 

My recommendation - take a step back and ask "is this a model making project" or "is this an IT project".   Because it sounds like it might be an IT project. 

 

 

- Nigel 

  • Like 1
Link to post
Share on other sites

2 hours ago, WIMorrison said:

An interesting challenge that is a bit more complex under the surface than it might appear on the top.

 

18 minutes ago, Nigelcliffe said:

My recommendation - take a step back and ask "is this a model making project" or "is this an IT project".   Because it sounds like it might be an IT project. 

 

It's a problem of scope creep.

 

To date all of the club layouts are analogue and the start point was the decision that our next layout should be DCC (as a few of our newer members are users).  However, as we'll be scrapping our only continuous run DC layout to make space in the clubroom, it was felt that we should try to accommodate some form of DC running (to keep non DCC users happy).  I originally assumed we'd just go with a couple of switchable loops, so we could accommodate DC test runs in the club room but nothing more.  However, the design brief has since expanded to the idea that the layout should be fully operational using either DCC or DC (partly because there is an aspiration that the fiddle yard could be used for another DC layout in the future).  Again, if there is no automation, I think it's still achievable.

 

However, Haymarket has four through platforms, which means that we need to have quite an intensive service. We can't have one train per loop, we'll need several trains in each loop, which is where the need for automation arises and the problems start. I suspect that half our members don't yet fully appreciate how difficult this is going to be.

 

3 hours ago, WIMorrison said:

it does then beg the question of what software you will be using for the automation as that software will need to be able to use the RFID tag information to either display the tag ID or better, to read the tag ID and then use that in a lookup to display the actual train name on the output device(s). 

 

At the moment, we have a blank canvas.  There is no legacy DCC equipment in the club so we'll be buying from scratch.  All that we need is a detector system, control software and a command station that we can get to work together.  We'll need to do a lot of research to ensure that what we go with will deliver what we want, and we'll probably need to build a small test circuit, but we're certainly not experts in this field.  I certainly don't want this to become an IT project.

Link to post
Share on other sites

Clearly a layout of this type will have some compromises to be able to accommodate both DC and DCC. The big question is which way the compromises go - and how much of an I.T. project you want to make it.

 

It sounds like you already have a good system to manage queuing in the fiddle yard, so why not just enable DC running on the DCC stock to facilitate using the DC queuing system where DCC trains are stopped by the driver when they enter the fiddle yard, the points are changed to the next clear road and relays switch over to DC - the reverse happens when leaving.

 

I suspect it might be a lot easier and cheaper for the club to pay for DCC fitting of DC members' stock (£25 per loco - you can probably fit forty or so locos for what the DC wiring is going to cost) to just make the layout full DCC and a lot easier to wire - but you have the brief you are given!

 

  • Agree 1
Link to post
Share on other sites

Yes, a small test circuit would be very useful to test out the concepts. You would probably be breaking new ground with some of the features you are envisaging.

 

Rocrail has an autostaging (auto shuffle up) feature built in (for DCC).

An autostaging feature for DC can be done using relays to do the logic.

RFID cannot tell what a loco's ID is until it goes over a reader.

Railcom can tell the ID of a loco within a Railcom track section but it is DCC only and not all DCC decoders have Railcom (I have that problem on the DCC club layout I help with). Not all DCC command stations are Railcom compatible.

JMRI is probably best if there becomes a need to add features as it has extensive scripting capabilities.

 

It might be worth your most electronics savvy member joining MERG to ask for advice (especially if keeping club costs down is important).

There is the JMRI users group online.

 

Regards

 

Nik

Link to post
Share on other sites

Thanks all for the advice and thoughts. As Dungrange has explained, the problem here is really scope creep (as always, with the best of intentions!). 

The idea of paying to convert all the members' DC stock to DCC is sadly unlikely to be viable, because of the sheer volume of stock owned by club members who might want to run it on this layout (or at least this fiddle yard) at a club night rather than at an exhibition. Despite the layout being Haymarket in the modern day, I strongly suspect the layout will see everything from Rocket to American steam to Pacers to maybe a Japanese Shinkansen on club nights. 

It may be the case that we have to limit fiddle yard use to "one train per road" when in DC mode - if that's the case, it's not the end of the world! 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...