Skip to main content

If any of you old timers remember Don Grabski aka Daylight Don,  he was a layout builder and had come up with the following circuit.  I believe he had boards made and he was selling them and he listed the parts and where to get them if you wanted to build your own.  He hasn't posted since 2014 so  don't know if he still has his boards available.   JPPB150169PB150170

Attachments

Images (2)
  • PB150169
  • PB150170

OK well I figured out how to do it with just adding two diodes. So my theory is correct. However when the board is turned off it resets to CH 1. It does this due to the nature of the connection of the commons. But it still works. This leaves the others to be able to be used in the same manner or for other needs..

https://youtu.be/8CDMtGwLcZA

Attachments

Images (1)
  • mceclip0
Last edited by Mr. Mouthpear

Curious as to your statement that it resets to CH 1 (as opposed to indeterminate).  It appears to be the classic RS NAND latch with the added cross-coupled diodes to provide 2-input triggers on each channel (either input LOW triggers the channel).  Isn't this the equivalent "race" condition where either side can win on power-up?

Untitled

In any case, all these volatile methods that "lose" the latch state on power loss are not an issue with the AIU in the overwhelming majority of cases.  As you noted, you are not a train guy...but train guys that use the AIU to drive Tortoise turnouts can run what amounts to a script which automatically steps thru channel-by-channel to set up the layout's turnouts to a known configuration.

Attachments

Images (1)
  • Untitled
@stan2004 posted:

Curious as to your statement that it resets to CH 1 (as opposed to indeterminate).  It appears to be the classic RS NAND latch with the added cross-coupled diodes to provide 2-input triggers on each channel (either input LOW triggers the channel).  Isn't this the equivalent "race" condition where either side can win on power-up?

Untitled

In any case, all these volatile methods that "lose" the latch state on power loss are not an issue with the AIU in the overwhelming majority of cases.  As you noted, you are not a train guy...but train guys that use the AIU to drive Tortoise turnouts can run what amounts to a script which automatically steps thru channel-by-channel to set up the layout's turnouts to a known configuration.

It's more of an SR NOR latch but it is really not. Reason is the diodes are only there to prevent the sorting of the circuit. I say it's more like an NOR only because you are drawing 12v- from either the AIU trigger OR whatever relay common has the 12v- at the time. The diodes prevent a short from happening in the split second it takes the relays to reverse the polarity.  Here is a video of a VERY simplified example of how it works on this board. But yes I do think it's a race.

Sorry. i forgot to record the cursor to show what buttons are being pressed so I redid the video and here it is..

https://youtu.be/RoFMVQF4i9Q

Last edited by Mr. Mouthpear
@stan2004 posted:

That's an pretty wild simulation.  Very impressive.

But I still want to understand what you mean by the latching relay resetting the CH1.  As I see it, the 2 relays are symmetrical.  In fact it's arbitrary as to why one is called CH1 and the other CH2.  Why is one channel "favored"?

I go out of frame when I turn the power off and when I turn it back on it goes right back to CH1. I would assume if I had a second set up motor that it would go to CH3. So both the CH 1 & 3 would be the ones that would be on when the power is cycled.   I do notice that when the relay board is turned off, the CH1 LED flashes. It does that with or without any of the relays being on.

@stan2004 posted:

Curious as to your statement that it resets to CH 1 (as opposed to indeterminate).  It appears to be the classic RS NAND latch with the added cross-coupled diodes to provide 2-input triggers on each channel (either input LOW triggers the channel).  Isn't this the equivalent "race" condition where either side can win on power-up?

Untitled

In any case, all these volatile methods that "lose" the latch state on power loss are not an issue with the AIU in the overwhelming majority of cases.  As you noted, you are not a train guy...but train guys that use the AIU to drive Tortoise turnouts can run what amounts to a script which automatically steps thru channel-by-channel to set up the layout's turnouts to a known configuration.

As far as the AIU, I KNEW there had to be some sort of programmable default presets that are implemented. TY for confirming that.

@stan2004 posted:

That's an pretty wild simulation.  Very impressive.

But I still want to understand what you mean by the latching relay resetting the CH1.  As I see it, the 2 relays are symmetrical.  In fact it's arbitrary as to why one is called CH1 and the other CH2.  Why is one channel "favored"?

I just moved everything from CH 1 & 2 over to 3 & 4. Confirmed, when cycling the power on and off to the system CH 3 is the one that turns on. I even flip flopped the wires. So what was on relay 1 is now on relay 4. same for 2 & 3.

Before posting this comment is tried one more thing.  I move it all to CH 2 & 3. Same thing. CH2 is the one that turns on when power is cycled.

LOL.  You'll rue the day that you stumbled onto the OGR forum...like falling into the proverbial Alice in Wonderland rabbit hole.  O-gauge with its AC track power and 3-rails is a quirky wonderland of circuit conundrums.  The voltages involved are just wrong-enough that it's a challenge to employ generic 5V, 12V or standard voltage modules, relays, whatever.

Anyway, thank you for contributing your expertise to our little corner of the world.

@stan2004 posted:

That's an pretty wild simulation.  Very impressive.

But I still want to understand what you mean by the latching relay resetting the CH1.  As I see it, the 2 relays are symmetrical.  In fact it's arbitrary as to why one is called CH1 and the other CH2.  Why is one channel "favored"?

Sorry guys I wasn't happy with the first two videos with the simulator so I did a third. Still not the best but it is way better.



https://youtu.be/RoFMVQF4i9Q

Call me a dog with a bone but I couldn't let go of why what should be a coin-toss always turned up heads!  Trick coin?  Here's my conclusion:

4 channel relay module smart vs dumb

The 4 channel relay module in your photos appears to be one of those "smart" microcontroller-based widgets.  You just happen to (as clearly noted in your diagram and write-up) have it set to dumb (TR or trigger) mode.  In TR mode, the input state should be immediately sent on to the relay as in a "dumb" relay module.

HOWEVER, I believe the microcontroller is still in the signal path and is sequentially "scanning" the 4 trigger inputs, one at a time, and echoing the state of the trigger to the corresponding relay.  If I am correct, it's reasonable to assume the code was written scan channel 1, then channel 2, then channel 3, then channel 4 in that order.  Hence, this will favor the lower channel number.  And this is why, in your various combinations, the lower channel number always wins the race!

If I thought anyone here on OGR was actually interested in implementing this I could try the 2-diode method on a dumb relay module which I have to see if it really is a coin toss.  But as I noted earlier, the eyes of anyone stumbling across this thread have already glazed over, and an order was placed for a ready-to-go genuine latching relay module!

Attachments

Images (1)
  • 4 channel relay module smart vs dumb
@stan2004 posted:

Call me a dog with a bone but I couldn't let go of why what should be a coin-toss always turned up heads!  Trick coin?  Here's my conclusion:

4 channel relay module smart vs dumb

The 4 channel relay module in your photos appears to be one of those "smart" microcontroller-based widgets.  You just happen to (as clearly noted in your diagram and write-up) have it set to dumb (TR or trigger) mode.  In TR mode, the input state should be immediately sent on to the relay as in a "dumb" relay module.

HOWEVER, I believe the microcontroller is still in the signal path and is sequentially "scanning" the 4 trigger inputs, one at a time, and echoing the state of the trigger to the corresponding relay.  If I am correct, it's reasonable to assume the code was written scan channel 1, then channel 2, then channel 3, then channel 4 in that order.  Hence, this will favor the lower channel number.  And this is why, in your various combinations, the lower channel number always wins the race!

If I thought anyone here on OGR was actually interested in implementing this I could try the 2-diode method on a dumb relay module which I have to see if it really is a coin toss.  But as I noted earlier, the eyes of anyone stumbling across this thread have already glazed over, and an order was placed for a ready-to-go genuine latching relay module!

Well It isn't a race with regular relays as you suspect. My suspicions were that they would bounce until either or was selected. And it does. It does in the simulator and actual practice. I recorded this video shortly after my last comment. I wanted to know.  In short I will have to side with it being an SR NOR race within the controller chip.



https://youtu.be/H2uQ1CMHXGQ

@stan2004 posted:

Call me a dog with a bone but I couldn't let go of why what should be a coin-toss always turned up heads!  Trick coin?  Here's my conclusion:

4 channel relay module smart vs dumb

The 4 channel relay module in your photos appears to be one of those "smart" microcontroller-based widgets.  You just happen to (as clearly noted in your diagram and write-up) have it set to dumb (TR or trigger) mode.  In TR mode, the input state should be immediately sent on to the relay as in a "dumb" relay module.

HOWEVER, I believe the microcontroller is still in the signal path and is sequentially "scanning" the 4 trigger inputs, one at a time, and echoing the state of the trigger to the corresponding relay.  If I am correct, it's reasonable to assume the code was written scan channel 1, then channel 2, then channel 3, then channel 4 in that order.  Hence, this will favor the lower channel number.  And this is why, in your various combinations, the lower channel number always wins the race!

If I thought anyone here on OGR was actually interested in implementing this I could try the 2-diode method on a dumb relay module which I have to see if it really is a coin toss.  But as I noted earlier, the eyes of anyone stumbling across this thread have already glazed over, and an order was placed for a ready-to-go genuine latching relay module!

Tested it on a "dumb" relay board. This one bounces sometimes like I mentioned before, But eventually it ends up on CH1. CH1 everytime. You can see CH2 want take hold for a split second but then CH1 takes over. Then it works as it should.

https://youtu.be/PtcaU11Q8-U

For the dumb relay board I'm thinking there are variables in the path from input trigger to relay contact that might favor CH1 in your particular board.  There is an opto-coupler which have notorious part-to-part CTR variations.  This then cascades into the relay coil drive current which depends on the beta of the NPN buffer.  Then the part-to-part variation in the electro-mechanical response times in contact release/close.  I'd guess this latter is the dominant thumb-on-the-scale; in other words if just the blue cube relays were swapped between CH1 and CH2, then CH2 would "take over."

I'd also think since the trigger currents in these dumb modules are about 1 mA, that a 5-cent R-C filter could be installed on one feedback path to handicap the race.  I'm just gabbing in the spirit of a discussion forum.  In the real world of OGR, just the pair of 1-cent diodes can be a show-stopper!

Last edited by stan2004
@stan2004 posted:

A 1 uF cap to ground on the input terminal of the desired startup channel seems to work on a dumb module ... sample of 1.  The cap simulates a momentary button press on power up.

I was thinking about that and tested. However it took at least a 30uF cap to stabilize the connection. However I thought why not add LEDs. It works and they serve as indicators of what direction they are set to. It always favors the least amount of resistance. When it does the opposite LED lights up. So it serves a double purpose. If it is not correct the simply switch wires going to motor



Attachments

Images (2)
  • mceclip1
  • mceclip2
Last edited by Mr. Mouthpear

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×