Reversin loop automation

Erik84750 May 17, 2017

  1. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    I thought it was clear all the time. In my sketches it is clear and I wrote it too.
     
  2. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Sorry, this was six months ago, I will reread.
     
  3. Hardcoaler

    Hardcoaler TrainBoard Member

    10,783
    45,627
    142
    Not to derail the thread, but perhaps someone can help me with a future reverse loop wiring situation.

    I'm building a modest N Scale DC railroad and am adding a simple DPDT switch to toggle the railroad over to DCC operation if I wish to do so someday. (the toggle will have one pair of wires to the track and two inputs, DC and DCC).

    The railroad will have a manually operated reverse loop. I'm well versed in wiring DC reverse loops, but would like to know how to wire my loop for both DC and DCC.

    If I understand what I read, DCC will need the polarity changed the same way as with DC in the gapped section, but with DCC I won't need to move the direction switch on the controller. Is this correct?

    If that's the case, wiring the reverse loop for both DC and DCC should be pretty easy. Thanks for any thoughts you have.
     
  4. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    That is correct: in DCC the direction is coded in the PWM signal on the tracks and is polarity independent. For example when you pick up a locomotive traveling forward on a DCC track and place it 180° reversed it will still travel forward.
     
  5. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Just thoughts
    DC <-> DCC switching with the same main bus. It depends on presence of boosters, accessory decoders, reversers.
    Personally I believe that it needs two buses, but I would asked more experienced people on this.

    DC - DCC single loop. I think there isn't a problem, as Erik said, when the polarity is reversed within the loop.
    Also I think the best solution on DC with 1 loco running is to reverse the polarity out of the loop, but for DCC is the opposite.
    http://www.azatrax.com/model-railroad-reverse-loop.html
     
  6. Hardcoaler

    Hardcoaler TrainBoard Member

    10,783
    45,627
    142
    Thanks for your replies. (y) I'm glad that there will be no conflicts. I'm usually able to figure out electrical matters, but DCC is a realm that I'm not well schooled in. N Scale Magazine is starting a new series on DCC basics and I'm finding it very interesting.
     
  7. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Hi Vasilis, I hope you are still there? My apologies for being absent the whole year; but while summer has gone by there is time again for this hobby.
    I had been thinking about the drawback of train detection with light sensors, not being accurate when a gap between wagons stops above a sensor. Would a AND function of two sensors instead of just one not be an improvement? The risk of two gaps simultaneously being present above 2 linked sensors would be next to impossible I think?

    Also your thougths on current detection (block detection) are very valid, thank you.
     
  8. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Hi Erik, still here. You are not alone, I have no time for the hobby too and I'm watching the forums only. The case with the gap over the sensor is real and the twice detection obviously is a good answer. I'm looking forward about your progress.
    BTW the build of a low cost reverser based on a short circuit detection can be done based on Dave Bodnar's high power booster, current measurement and reversing the pwm to the motor driver from arduino with 2 xor gates. I mentioned it only to intrigue you, keep going in your project :).
     
    Erik84750 likes this.
  9. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Hi Vasilis, nice to read you!
    I am designing a smd version of my board; when returned from the fab I will keep you posted here on the results (will be after New Year, too much food and drink meanwhile).
    And yes, that hint about this David Bodnar booster idea intrigues me, good idea except again using short circuit detection.
    Grts,
    Erik
     
    vasilis likes this.
  10. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Hi Vasilis,
    below is my schematic for a 2-channel optical detector, with the option to combine 2 LDR's on an AND gate.
    The MOSFET outputs will short to ground (allowing a load to be powered at the output).
    The AND output also shorts to ground only when both LDR's are being covered.
    A reference LDR is used calibrate the circuit for changing environmental light intensities (as in my previous pcb version).

    Grts,
    Erik

    upload_2019-12-18_16-36-11.png
     
  11. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Hi, Eriko_O:confused::rolleyes: you are killing me. I don't remember if I allready posted this link https://model-railroad-hobbyist.com/node/26133.
    I think it does do the job and is simpler. The only modification you need is to connect the P1 and P2 outputs so when either one of the 2 sensors is covered the output is high.
    If the sensors are close and imho they have to be, then you can omitt the T2 (PT19) reference sensor with the R5 and connect together the comparator's pins 2 and 6. Do you have any problem with the linked circuit? Why you would want a delay? I think the problem we have to solve is the immediate detection of the rolling stock with two adjacent sensors to eliminate the implication of the rolling stock gaps. Then the detection is understand as the train's intention to pass the polarity border. During the movement the eventual sensor's blinking (covering uncovering) and the finish of the passing over the polarity border can be handled in arduino code.
    Maybe I'm missing something and have no intention to change your mind.:)
     
  12. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Erik I apologise, the output goes low when the sensor is covered. To have the output high when the sensor is covered you have to reverse the connections to the comparator.
     
    Erik84750 likes this.
  13. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    I already found that out: see below.

    With due respect for Geoff Bunza, but my circuit is more sensitive and discriminates better between true and false detections due to a double staged amplifier. I will post my design with Geoff on his blog for his review.

    I prefer hardware delay over software: it is faster, and software can be used for more sequential tasks; matter of preference.

    Edit: I want to upload .sch .brd and .lbr files (Eagle) but can't, sad..

    upload_2019-12-18_22-24-54.png
     
    Last edited: Dec 18, 2019
  14. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Edit on my previous post: second schematic will have the LED's light up when detection occurs. Then also the MOSFET's will be gated high hence conducting; the purpose is to allow current through a load connected to the MOSFET drain.
     
  15. Erik84750

    Erik84750 TrainBoard Member

    349
    140
    12
    Edit on my previous post: forgot to add that the detector gives an active low on the ouput, i.e. when a detection occurs.
    And here is an interface to JMRI (using an Arduino Mega 2560 for up to 68 inputs): https://model-railroad-hobbyist.com/node/34392
     
    Last edited: Dec 20, 2019

Share This Page