Skip to main content

Good Afternoon,

     I purchase several of these impressively cheap Signal lights.  They do however like so many LED's use a 3-12v DC power supply which I already have running under the table.  My question is how to wire in some relays to activate these from segmented *isolated* track, I am looking for a rather cheap option as items such as ross DZ-1008A run about $18 each.  https://www.ebay.com/itm/1-lot...9:g:Y6EAAOSwRqldy8Sd.

I have a ZW-L power supply on Ross Track

 

Thanks,

Alex

 

Last edited by TACOROG
Original Post

Replies sorted oldest to newest

Alex: You are new to the forum and may not have seen the relay modules that are much less expensive. Since you're no stranger to eBay, try the following number in the search box:

183776948137

Make these your starting point. The relays are rated for 10 amps; perfect for running O-gauge model trains. They will certainly work to fuel your crossing signals.

They do take a bit longer to arrive since they come from overseas. But you can find US sellers on eBay as well with the price a little higher.

Attachments

Images (1)
  • mceclip0

Segmented?  As in isolated rail triggers?.A relay's coil and it's points seldom share terminals.  So you wire the points side like a switch (that has a motor 😜)

"how to" depends on some more variables and with the info listed, seems almost vague...like you already know how but want to doublecheck...but managed to leave something out...I just don't see where you.are.stumped.

Now the motor half is just two wires, one goes to the inside rail, the other goes to the isolated rail. Wheels then complete the circuit giving the isolated rail a connection to the outer rail via the wheels/axles

Relays have two value sets listed; You want a relay that uses low amps @ the track/constant voltage or varible( e.g. 0.25a @ 3v-12v means the relay triggers with as little as 3v thru 12v max(I'd look for one handling a 24vac max.

The point count, action type, and strength(amp/volt max) should handle the max load you use. They follow the labeling style of a a switch and may be momentary, latching, etc, or have multi poles or throws etc. (spst, spdt,etc)

If the 3-12V DC supply which you "already have running under the table" comes from a wall-wart, then you don't need a relay to use the insulated-rail method.

ogr crossing dc

That is, if the DC supply is indeed isolated (i.e., comes from a separate transformer as a wall-wart would) from your ZW AC track voltage, then you can tie the DC and AC grounds together.  Your crossing signal's DC+ would connect to the DC+ supply and the crossing signal's DC- would come from the insulated track section when occupied.

Attachments

Images (1)
  • ogr crossing dc
Last edited by stan2004

Stan: Something I've puzzled over is why a wall-wart is okay to use in this situation as opposed to other methods that convert AC to DC; like the bridge rectifier on the AC/DC buck converters. I understand that the bridge rectifier creates a separate ground that differs from the transformer ground.

But what does a wall-wart do to make their DC ground compatible? I'm guessing that they use a single diode to produce half wave DC as you have pointed out previously. Then they are simply passing the AC ground through which makes it common with the AC ground from the transformer.

And what about DC from an old computer power supply? Is that not compatible? And how is it that you know this stuff?

You may want to look into optocouplers/optoisolators. 

All you need is a bi-directional optocoupler. I used LTV-844 optocouplers which have 4 channels per chip. It is called an optocoupler because the two leads that connect to the sensing side (insulated rail setup) illuminate a small LED. The illumination of that LED then closes a separate circuit comprised of a photosensor. Below is the break out of the LTV-844:

 

 

Image result for LTV 844

 

Pin 1 would go to the insulated rail, pin 2 to a fixed AC voltage source (or center rail) through a current limiting resistor. When pins 1 and 2 make up a closed circuit via metal axles, the LED is illuminated (for the astute, you will see that this selected optocoupler has two leds in reverse polarity so that they will work off of the AC voltage of the track). The light from the LEDs active the photosensor between pins 16 and 15, closing a digital circuit that can be connected to the low voltage logic of Chinese relay boards. When the block is occupied, pin 15 will read a digital 1 at VCC, and when not occupied, a digital 0 (again, pull down resistor recommended).

This also enables complete isolation of the AC track and the DC accessories so there is no concerns if you derive your DC from an isolated or unisolated transformer/power source.

Last edited by bmoran4
Consolidated Leo posted:

Stan: Something I've puzzled over is why a wall-wart is okay to use in this situation as opposed to other methods that convert AC to DC; like the bridge rectifier on the AC/DC buck converters. I understand that the bridge rectifier creates a separate ground that differs from the transformer ground.

Exactly!  It's just that when using a bridge rectifier in the AC/DC buck converters the new/separate DC ground output was derived from the AC ground input and hence has a blood-line relationship.  You cannot then marry the two ground signals as that would be electrically incestuous.   Not trying to be clever with the geneaology metaphor; it's just that I've previously tried to explain the technically precise requirement of galvanic isolation but doesn't seem to get the point across.  

But what does a wall-wart do to make their DC ground compatible? I'm guessing that they use a single diode to produce half wave DC as you have pointed out previously. Then they are simply passing the AC ground through which makes it common with the AC ground from the transformer.

A wall-wart has an internal transformer which means its AC output has no blood-line relationship to the train transformer's AC output.  So now, even if the wall-wart internally spawns a DC ground using a bridge rectifier, the wall wart's DC ground output still has no blood-line relationship to the AC ground of the train transformer.  Hence the two signals can tie the knot and live happily thereafter.  Note that you cannot access the internal AC ground of a wall-wart.

And what about DC from an old computer power supply? Is that not compatible? And how is it that you know this stuff?

A computer power supply has an internal transformer so it is like a wall-wart.

 

bmoran4 posted:

You may want to look into optocouplers/optoisolators. 

...

Indeed.  It's just that every time I look on eBay I can only find pre-assembled modules for DC-to-DC applications (rather than AC to DC).  Maybe one of the guys messing around with DIY circuit board design could be coaxed into designing such a module.  I really like the no-soldering, screw-terminal convenience.  And the eBay/Asia price is less than you'd pay for shipping from DigiKey! 

4 channel dc optocoupler

Attachments

Images (1)
  • 4 channel dc optocoupler

Well, the module claims amps, but I find that around 300-350ma is about the limit, that's likely partially due to the size of my input filter caps.  I have actually laid out another board with 680uf of capacitance instead of 300uf to increase the potential current output, but I haven't actually needed the additional capability yet.

Truthfully, I make these as small as possible as I am usually trying to cram them into something with wheels.   For accessories, I'd buy one of the larger buck DC-DC modules and just tailor an add-on PCB with the AC/DC components.  For higher currents, you'll likely want even more bulk capacitance, so there's no reason to limit the size based on this particular design.

Attachments

Images (1)
  • mceclip0

Well of course! Galvanic Isolation! Why didn't I think of that? I must have used that term NEVER in my programming career!

Anyway, Stan, I think I understand the concept at a basic level. The AC from the internal transformers (through inductance) create an independent source that can be run through a bridge rectifier without causing any problems when mixing AC and DC through the same conductor. That's a good thing to know. Thanks!

stan2004 posted:

Indeed.  It's just that every time I look on eBay I can only find pre-assembled modules for DC-to-DC applications (rather than AC to DC).  Maybe one of the guys messing around with DIY circuit board design could be coaxed into designing such a module.  I really like the no-soldering, screw-terminal convenience.  And the eBay/Asia price is less than you'd pay for shipping from DigiKey! 

To preserve the forks in the family trees, I've saved a picture of the module. If I can figure out what all they have on their PCB, I'll try to duplicate it for another one that accepts AC or DC inputs. Beating their prices might be a bit difficult though!

Last edited by rtr12

Stan, thinking I would try to duplicate the board shown above... I'm stuck trying to trace out the wiring of the example board above. Found a better picture here. It has a magnified view for close ups and appears to be the same board.

The problem is in following the board's traces to the components? The pinouts of the LTV-8141 and PC817 appear to be the same from their data sheets. So here's what it looks like to me so far, but it also doesn't look to be correct either? I think the whole thing is in need of a few corrections. My PCB tracing is about on the same level as my circuit designs, both still needing a lot more work!

AC-DC 4 Opto-Iso PCB-1 SM

 

Attachments

Images (1)
  • AC-DC 4 Opto-Iso PCB-1 SM

Your schematic looks correct.  But if thinking of a new PCB, best to confirm there is any interest from anyone who might actually build it!  As I see it, the application is for those guys that want to use AC Accessory Voltage from an existing train transformer to fire relays triggered by insulated-rail sections.  In other words it would be inconvenient or impractical to add a wall-powered DC-output power supply.  I just don't know how many guys are in this situation.  That is, low-voltage DC power supplies for driving accessories can be had for pennies per Watt as documented in dozens of OGR threads.  OTOH low-voltage AC power for driving accessories runs about 50 cents to $1 per Watt...and for virtually all train transformers any Accessory AC power takes away available motive power to drive trains.

In any case, sticking with DC power derived from an existing Accessory AC, I'm imagining something like this:

insulated rail trigger with separate ac dc grounds

So in words, ACCessory voltage (e.g., 14-16V AC) would power an AC-to-DC power regulator module (~$3 on eBay, free shipping from Asia).  The regulator would be set to 12V DC output.  The 12V DC would power a multi-channel (1, 2, 4, 8, etc.) relay module (~$1/relay, free shipping from Asia).  The "mythical" optoisolator/optocoupler module would allow the AC insulated-rail sections (i.e., AC ground on the outer rail) to trigger the DC relays.

Let's just say this is the matter at hand.

I agree that a $2 all-in cost target is a pipe dream.  To that end, for the determined DIY'er perhaps the closest exit is to simply buy the $2 DC-to-DC optocoupler module on eBay and extract the DC-input PC817 optocouplers.  Then insert AC-input optocouplers as the pinout of the two types are the same.  The PS2505-1 is ~25 cents a piece on eBay (free shipping from Asia).

ps2505 ac optocoupler

If someone is considering doing this, I'd suggest adding a capacitor across the output to demote relay chatter from intermittent axle contact.  Also, depending on what DC output you're driving note that the AC-input optocoupler actually generates a pulsed-DC output or what amounts to 120 pulses per second which can bother some circuits - a capacitor smooths the ripple.

OTOH, if someone wants to undertake a new PCB design using DipTrace or whatever. 

1) I'd place the 4 optocouplers in a DIP-16 footprint.  You should be able to "stack" four DIP-4 packages into a DIP-16 footprint.  This way you can install a 4-channel DIP-16 component...or 4 separate 1-channel DIP-4 components using the same board.  Heck, you could even mix and match so 2 channels are DC input and 2 channels are AC input.

2) I'd lose that 2-pin programming jumper that ties the input ground to the output ground on each channel...and use the space to provision for a capacitor to demote relay chatter or buzzing.

But to repeat, I'd be curious to hear real-world applications!  I do recall a recent thread about someone trying to implement a fault detector for 4 AC brick power supplies.  That is, if any of the bricks tripped its internal breaker, then this was to trigger a global action like killing power to all tracks.  As I recall, my suggestion was to use a 4-channel AC optocoupler to monitor each AC brick voltage.  The optocoupler outputs would be wired into the logical "AND" configuration so if any input dropped out, a DC relay with high power contacts would also open and kill power.  But this was a one-off and presumably simpler to solder the handful of components rather than fabricate a custom PCB.

 

Attachments

Images (2)
  • ps2505 ac optocoupler
  • insulated rail trigger with separate ac dc grounds
Last edited by stan2004

Thanks for the assistance. I like the added capacitor idea and removing that jumper. I didn't realize a cap was needed? But that jumper was sure throwing me a curve. One of the reasons I thought my tracing of the example was not correct. 

Probably should have asked this before, but I have a couple more questions about the circuit.  1. - What would one be programming with that jumper?  2. - Does the 3k resistor have something to do with the programming, and is it (or any other value resistor) really needed in the output section? I didn't understand the purpose of the resistor either?

I started out with the LTV-8141. I wasn't aware of the PS2505s? They look to be similar and have the same pinouts. I had also given some thought to the 8441 (or now 4 PS2505-1s or PS2505-4) so I'll change that and try to use the 16-DIP size. I suppose one could then use the same PCB for a 1, 2, 3, or 4 input/output version. 

Earlier I was thinking about 1, 2 and 4 in/out versions on separate PCBs. Reason being, I did some fiddling with a through-hole PCB for the 4 in/out version and thought it may have been a bit large for OSHPark. Prices go up quick after a certain size of somewhere around 1 square inch, maybe a bit more. My thinking was the 1 or 2 I/O versions might be small enough for more economical pricing from OSHP. But, I haven't actually priced anything, just guessing so far. 

For the final PCB(s) my thoughts were to make a post about it and add it to the 'Projects' list. It would be just another option for anyone that has an interest. Hopefully there would be some interest? Now I'm thinking I should probably get a sample of the boards made first, just to be sure they work properly before someone else (if anyone) tries them out. Wouldn't want them to get something that didn't work. 

I also like the idea for the power shut down function. This might also be appealing to some folks here. Might be in for trying that one myself. Regardless of project interest, I do enjoy all this, always learn something along the way, get a new circuit design and have something new to fiddle with after samples are assembled. As an added bonus, if they don't work the first time, I get to try it a second time.   

 

If you want the 4-channel model, you can get ten of them for $4.80 shipped from AliExpress.

You can probably get away with a smaller cap on the output if you want to make it a bit smaller.  I use a 10uf tantalum cap on the Super-Chuffer for the filtering, it works just fine.  Of course, I was going for size, so I wanted the smallest cap that would do the job at 60hz.  Also, the smoke power and TMCC headlight is coming in half-wave format, so I'd need much more capacitance than you would with full-wave power.

Attachments

Images (1)
  • mceclip0

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.
×
×