Jump to content
 

DCC reversing loop - how easy, how costly


Harry2013
 Share

Recommended Posts

Yes!

 

Dutch Master has shown the ultimate way to wire things if you are likely to run an incorrectly set point, but there is no real need to do that unless you have dead sections on the frogs of all your other points too. If you study Dutch Master's diagram you will see that the brown wire and the blue wire are always the same polarity so the lower pole of the switch is unnecessary, and if you wire the inner rail of the loop all the way to the frog with no insulated joiners eliminating the dead sections the third pole down is not required either.

 

Suzie x

Thank you! What a clear explanation. I studied Dutch Master's diagram in detail now and with his and your help it all cleared up for me.

 

Meanwhile this morning I did the test with a DPDT switch throwing phases around (ie switching rail connections to the booster) on the fly and what my seem like common sense to you was a revelation for me: loco keeps moving in the same direction whatever the phases connected between booster and rails.

 

So this morning too I decided to solve the loop control with a little controller, three photoresistor cells and a DPDT or if using Dutch Master advice 4PDT relay:

 

One cell on each leg of the loop after the switch but before any gap (photocells A and B) and one cell inside of the loop (photocell number 1). When cell A detects a loco the loop track power is alligned to that of the A part (left and right tracks are electrically alligned). When cell A is cleared again the polarity gets reversed. Photocell 1 detects the loco and prevents cell B (when the loco exits the loop) from switching again. Cell B is cleared after the loco exits the loop and leaves further down the track. The software routine is ready to start over again, from either side.

 

One ATtiny85 (EUR1 delivered home from AliExpress), 3 photoresistors (EUR1 for ten pcs), and a 5V powered 10A DPDT relay (EUR1), and half an hour of programming and testing. Could be done with an Arduino or Pro Mini too but they are a bit overkill here.

 

I posted the same question on two French fora and one American forum: the French either did not really understand what it was about, talked a lot but I could not get working answers and the American forum used the purchasing option for commercial products.

I still have to find a Belgian forum :sungum:

 

Thanks a lot everyone for your help!

Erik

Edited by Erik84750
Link to post
Share on other sites

If using the photocell approach it is often best to link the polarity switching to the point, and use the photocells to switch the point to align it with the oncoming train.

Hi Suzie, can you plse explain what you mean by "polarity switch"? Do you mean a switch (for example DPDT) that is connected to the switch activation?

 

And if I understand you correctly you mean to use the photocells to allign the switch for the outgoing loco? If so, I would have to insert an "or" function if I also want to allign the switch manually for incoming loco's?

Edited by Erik84750
Link to post
Share on other sites

For example if you have a solenoid point motor you can connect a twin coil DPDT latching relay in parallel with the solenoid coils to provide the DPDT polarity switching, or use a Peco PL15 auxilliary switch. As for the photocell activation you can use something that works in parallel with the solenoid activation pushbuttons to provide a wired OR function.

 

Suzie x

Link to post
Share on other sites

  • RMweb Premium

I looked at the Tam website http://www.tamvalleydepot.com/products/dccfrogjuicers.html and since nobody has mentioned it, I see that certain types of DCC are not compatible with frog juicers due to threshold values

Frog Juicers change polarity when faced with a short circuit caused by running through such things as a reverse loop. Some DCC systems do not like this and will trip before the Juicer has done it's job.

There are non shorting reversers available of which I have the LDT product.

It carries out the reversing by detection tracks, which has the disadvantage that you need to put extra breaks in the track:

https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:ksm-sg

 

Works well if you have a largish loop.

 

Keith

Link to post
Share on other sites

Frog Juicers change polarity when faced with a short circuit caused by running through such things as a reverse loop. Some DCC systems do not like this and will trip before the Juicer has done it's job.

There are non shorting reversers available of which I have the LDT product.

It carries out the reversing by detection tracks, which has the disadvantage that you need to put extra breaks in the track:

https://www.ldt-infocenter.com/dokuwiki/doku.php?id=en:ksm-sg

 

Works well if you have a largish loop.

 

Keith

If I understand the Tam Valley website correctly, it is saying that certain sound systems will restart rather than continue running, when approaching a frog juicer, due to current dropping below a threshold value.

 

My MMI 2-8-2 locos are at EDM Models are at EDM Models for DCC conversion, and Paul Martin advised fitting a "stay alive" for this sort of reason

Link to post
Share on other sites

  • RMweb Premium

If I understand the Tam Valley website correctly, it is saying that certain sound systems will restart rather than continue running, when approaching a frog juicer, due to current dropping below a threshold value.

 

My MMI 2-8-2 locos are at EDM Models are at EDM Models for DCC conversion, and Paul Martin advised fitting a "stay alive" for this sort of reason

Wouldn't be problem with the LDT devices as the track voltage never changes. (apart from reversing to suit the direction of travel.)

 

Keith

Link to post
Share on other sites

  • RMweb Gold

Ravensclyffe fiddle yards are huge multitrack balloon loops either end of a double track mainline. I have them arranged with a polarity change section on the approach road. A track circuit detects a train about to enter the fiddle yard and throws relays that control polarity on a section of track long enough to hold the longest train the layout can handle. A second relay switches the next track section behind the polarity change zone into a high impedance state so if a following train runs past the protecting signal it will stop without causing a short but is still read by the track circuits

 

Once the trigger track circuit clears then the system resets ready for the next train.

 

The polarity change does not necessarily need to be where logic would suggest

 

Andi

Link to post
Share on other sites

Andrew, that applies if you just have a simple balloon loop but a reverse loop can be formed in other track layouts where the distance is way over the train length.

 

If you read the context to which I replied, "Only a problem if running long trains through a short loop", all will be clear.

Link to post
Share on other sites

For example if you have a solenoid point motor you can connect a twin coil DPDT latching relay in parallel with the solenoid coils to provide the DPDT polarity switching, or use a Peco PL15 auxilliary switch. As for the photocell activation you can use something that works in parallel with the solenoid activation pushbuttons to provide a wired OR function.

 

Suzie x

Right!

 

You are very smart! Thks,

Erik

Link to post
Share on other sites

Hi,

 

after a few days of testing I want to present to you my version of a full automatic bi-directional auto-reverser. The drawing is based on a drawing by Dutch-Master who of course is given due credit in the attached drawing.

The drawing I made with Adobe Illustrator, I am not too proficient with that program, it took me 6 hours to have it done.

 

I decided not to include frog powering (see Dutch-Master diagram above) because that is part of the switch command hardware.

 

Design constraints:

 

1. create a full automatic autoreversing controller

2. for bi-directional use

3. with no stopping of the loco/train

4. without use of short-circuit detection (IMO this is a rather crude way of automating a project). But if you definitely want to use short-circuit detection then this is also allowed, just make sure that proper HIGH or LOW signals are given.

5. with the use of any type of sensor (optical, inductive, capacitive, reed-relay, .. just anything that 100% reliably detects a loco above or underneath it), with preferably (but not necessarily: I just need to change the code a bit) a LOW signal when nothing is detected and a HIGH signal when detection occurs

6. cheap (I used for testing a ATtiny85 (1.5EUR), and 3 LDR's (1EUR for 20) and a 1EUR DPDT relay (4-pole must be used if the optional tracks are cut): total cost less then 5EUR in hardware.

7. reliable: it all depends on the sensors used; the software is foolproof and thoroughly tested.

8. any type of Atmega controller can be used: Arduino, Pro-Mini, ATtinyxx, etc..

9. 5V power supply for relay, sensors, controller

10. Must be able to be used for nested reversing loops, sequenced reversing loop, multiple reversing loops, etc..

 

If needed I can program the controller for you, just send me 2 units: one for return programmed and one to cover postage; just pm me.

 

The ATtiny I used has following connections (see also the code):

PB0 = LDR1 (the one inside the loop)

PB1 = LDRa

PB2 = LDRb

PB3 = Relay output (EDIT: beware: a controller supplies a max of about 10 to 20mA safely per output: use a high impedance relay http:// https://www.aliexpress.com/item/Smart-Electronics-5V-1-One-Channel-Relay-Module-Low-level-for-SCM-Household-Appliance-Control-For/32707870640.html?spm=2114.01010208.3.15.PhUyWN&ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_436_10136_10137_10157_10060_10138_10155_10062_10156_10154_10056_10055_10054_10059_10099_10103_10102_10096_10147_10052_10053_10142_10107_10050_10051_10084_10083_10080_10082_10081_10177_10110_10111_10112_10113_10114_10181_10037_10183_10182_10032_10078_10079_10077_10073_10070_10123,searchweb201603_2,ppcSwitch_5&btsid=e12d5bc7-2fcb-4393-a7f1-962add4c8dd9&algo_expid=80f49ff8-c3f2-46e0-b17d-58936f8fd807-2&algo_pvid=80f49ff8-c3f2-46e0-b17d-58936f8fd807  which in turn drives the power relay).

 

Make sure you cut the trace to the LED connected to PB1 or the voltage divider used for the LDR will not work properly. But best of all is to use an LDR driving a comparator, no need for calibration.

 

This is the controller I use: https://www.aliexpress.com/item/Free-shipping-GY-Digispark-kickstarter-miniature-minimal-development-board-TINY85-module-for-Arduino-usb/2053597206.html?spm=2114.01010208.3.230.SkLJ9m&ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_436_10136_10137_10157_10060_10138_10155_10062_10156_10154_10056_10055_10054_10059_10099_10103_10102_10096_10147_10052_10053_10142_10107_10050_10051_10084_10083_10080_10082_10081_10177_10110_10111_10112_10113_10114_10181_10037_10183_10182_10032_10078_10079_10077_10073_10070_10123,searchweb201603_2,ppcSwitch_5&btsid=f75f8d6b-a1bc-412f-bc15-ba5dbc74f73a&algo_expid=544ddd38-f756-42e3-8ad3-7dd445f0e91d-29&algo_pvid=544ddd38-f756-42e3-8ad3-7dd445f0e91d

 

Sensors of any shape, type, price can be found on that site. So far I have ordered 450+ items from them and just a few never arrived for which I got my money back.

 

My code (actually the code has just 4 read lines and 4 command lines, so fairly easy to read):

const byte Relay = 3;
const byte LDRa = 1;
const byte LDRb = 2;
const byte LDR1 = 0;
boolean A = LOW;
void setup() {
  pinMode(Relay, OUTPUT); //setting the pin mode to Output
  digitalWrite(Relay, LOW);
}

void loop() {
  int stateLDRa = digitalRead(LDRa);
  int stateLDRb = digitalRead(LDRb);
  int stateLDR1 = digitalRead(LDR1);
  int stateRelay = digitalRead(Relay);
  if (stateLDRa == HIGH && stateLDR1 == LOW && stateLDRb == LOW)  //condition 1; clockwise
  { digitalWrite(Relay, HIGH);
    A = HIGH;
  }
  if (stateLDRa == LOW && stateLDR1 == HIGH && stateLDRb == LOW && A == HIGH) //condition 2; clockwise
  { digitalWrite(Relay, LOW);
  }
  if (stateLDRa == LOW && stateLDR1 == LOW && stateLDRb == HIGH) //condition 3; clockwise and counterclockwise: set relay low
  { digitalWrite(Relay, LOW);
    A = LOW;
  }
  if (stateLDRa == LOW && stateLDR1 == HIGH && stateLDRb == LOW && A == LOW)  //condition 4; counterclockwise: set relay high
  { digitalWrite(Relay, HIGH);
  }
}

Any feedback is more than welcome!

Rgds,

Erik

post-31782-0-05708800-1493909763_thumb.jpg

Edited by Erik84750
Link to post
Share on other sites

  • 4 months later...
  • RMweb Gold

Hi everyone,

 

I don't understand why a simple Auto-Reverser alone, such as the AR1, would not do the job that the OP asked for (assuming that his layout needs one), whether the points are manually or electrically operated. I.e., with no extra switching, detecting, software or relays.

 

The simplest case would be a set of "electrofrog" points feeding a reversing loop (e.g. Peco Streamline code 75 straight out of the packaging): Allow the point blades to provide power+signal to the frog, insert double insulating joints to the outgoing tracks and connect the AR1 to feed power+signal to the isolated section of the reversing loop.

  • As a loco (or any powered vehicle) enters the reversing loop the AR will set the "polarity" of the isolated section correctly to prevent shorts and allow the loco to continue running.
  • While the loco is running round the reversing loop the operator can switch the points without interrupting or affecting the power to the reversing loop.
  • When the loco leaves the loop the AR will again set the "polarity" of the isolated section to match the outgoing track.

Why wouldn't that work?

 

BTW: My understanding is that both an AR module and DCC controller detect short circuits by testing if current flow is above a threshold value. An AR must have a lower threshold than the controller so that it switches polarity before the controller shuts down. "Starter" controllers tend to be lower power devices with lower thresholds before they shutdown and that's why the AR1 is not suitable for use with "Starter" controllers - their thresholds are too close to the AR1 threshold and thus may cut out before the AR1 has been able to switch "polarity".

 

Phil

Edited by Harlequin
Link to post
Share on other sites

  • RMweb Gold

The AR1 can be used, but a latching relay is a cheaper and more reliable solution when the track layout is simple and solenoid operated point has been used.

 

OK but, as you say, a relay won't work for manually operated points and won't a relay be slower to switch the power than an electronic Auto-Reverser, so causing a glitch in running?

 

Phil

Link to post
Share on other sites

Modern relays are very fast so there will be no noticeable glitch, on the other hand there will be a noticeable glitch when the short circuit occurs with a traditional autoreverser when it is triggered.

 

Some times the traditional auto reverser is the easiest solution - but this is not very often.

Link to post
Share on other sites

  • RMweb Gold

Modern relays are very fast so there will be no noticeable glitch, on the other hand there will be a noticeable glitch when the short circuit occurs with a traditional autoreverser when it is triggered.

 

Some times the traditional auto reverser is the easiest solution - but this is not very often.

 

I have to say I'm surprised at that. I would have thought that a purely electronic AR would always switch faster than a relay and furthermore that any device that caused a visible glitch or stutter in the running of a loco is basically not fit for purpose.

 

I've searched YouTube for videos of ARs in use but since YouTube videos are so glitchy anyway it's hard to really see what's going on.

 

You can tell that I haven't yet seen an AR in the real world, can't you. Maybe I should buy one and set up a test track to understand this!

 

Phil

Edited by Harlequin
Link to post
Share on other sites

  • RMweb Gold

I'm afraid you're going to be very disappointed by any solution then. Because what you want, implicitly, is technically impossible. When a DCC decoder detects a polarity change in the DCC packet stream, it needs some time to establish what's actually happening and execute code to deal with that. That will cause a (noticeable) stutter. My original diagram (IIRC it's on page 1, still) was more or less designed to deal with that, be it inadvertently, by having the train stopped in a stop section before changing the polarity by changing the switch position. An electronic reverser may switch fast(er), but it still depends on a short and a quick evaluation whether said short is caused by a train bridging the gap or an actual short because the train has derailed :rolleyes:  And no matter how quick it switches, the short means an automatic disruption to the DCC packet stream but more importantly, power to the decoder, so it simply cannot feed the motor the power it needs to continue, as there is nothing on the track! :no:

 

So, if you want an "uninterrupted" system, use external sensors, like reed contacts, Hall-sensors or IR sensors, or any combination, to switch a relay. But then you still get the aforementioned issue of packet disruption.... :P

Thanks for these insights. Lots of food for thought there!

 

I hoped that a decoder would avoid a stutter by retaining enough "keep-alive" power (capacitor?) and continuing to honour the last commands it received for a few milliseconds - just enough to span the time of the short+detection+switch (or any other typical DCC power+signal glitch).

 

Phil

Link to post
Share on other sites

Thanks for these insights. Lots of food for thought there!

 

I hoped that a decoder would avoid a stutter by retaining enough "keep-alive" power (capacitor?) and continuing to honour the last commands it received for a few milliseconds - just enough to span the time of the short+detection+switch (or any other typical DCC power+signal glitch).

 

Phil

 

I use a Lenz LK200 auto-reverser for a reversing loop on an HOe layout and it reacts instantly not causing any shorts or stuttering of the locos - and they are not large being essentially just n-gauge chassis with bigger tops on them :)

 

I don't have any capacitors or keep alive modules fitted to the locos.

  • Like 2
Link to post
Share on other sites

  • RMweb Gold

I'm afraid you're going to be very disappointed by any solution then. Because what you want, implicitly, is technically impossible. When a DCC decoder detects a polarity change in the DCC packet stream, it needs some time to establish what's actually happening and execute code to deal with that. That will cause a (noticeable) stutter. My original diagram (IIRC it's on page 1, still) was more or less designed to deal with that, be it inadvertently, by having the train stopped in a stop section before changing the polarity by changing the switch position. An electronic reverser may switch fast(er), but it still depends on a short and a quick evaluation whether said short is caused by a train bridging the gap or an actual short because the train has derailed :rolleyes:  And no matter how quick it switches, the short means an automatic disruption to the DCC packet stream but more importantly, power to the decoder, so it simply cannot feed the motor the power it needs to continue, as there is nothing on the track! :no:

 

So, if you want an "uninterrupted" system, use external sensors, like reed contacts, Hall-sensors or IR sensors, or any combination, to switch a relay. But then you still get the aforementioned issue of packet disruption.... :P

Sorry, not true. Decoders will continue to run for a certain period without valid instructions, If not they couldn't cope with instructions for points, or other decoders, or track dirt. I have three reversing sections on Ravensclyffe and I've never seen any loco stutter at all as the polarity changes.

 

Decoders don't read polarity as such, they read edges where the polarity changes, the packet where the rail polarity change occurs will just be discarded as an invalid packet and the decoder will continue to obey the last valid packet received

 

Andi

  • Like 1
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...