I’m looking to build a few whistling accessories in the Post War style that respond to the classic whistle activation DC offset.  In place of the usual whistle tender relay, I’d like to build a discrete circuit.

After some thought and doing a little research (in threads such as this one), my thought is that perhaps this is as simple as a suitably-tuned RC low-pass filter that leads to a DC relay, which in turn controls the power to the whistle.  My question is: is it as simple as this?

If so, in looking at the ERR diagram in the thread above I wonder:

• What is the purpose of diode D1 if the filter is going to attenuate the AC anyway?  Or is this to ensure only one DC polarity (whistle vs. bell) gets through?
• What is the value of the optoisolator (?!?)  in place of a simple DC relay?
Original Post

Presuming ERR has done all the engineering correctly, their bill of materials should be just fine:

JP1, JP2 2 pin connector 277-1273-ND
RL1 Relay 425-1210-5-ND
T1 Transistor (NPN) 2N3904FS-ND
C1 Cap 0.1uf / 50v radial
R1 100k / .25w film resistor
R2 1k / .25w film resistor

The optoisolator is rated for a switched load of 3 amps. You may be able to find other optoisolators in the same family that have a higher switched current that may work for you if needed (but may have a different footprint).

Not as simple as just an RC filter driving a typical DC-relay.  Note the filter time-constant R1 x C1 = 22k x 10 uF = 220 milliseconds.  As you say this is suitably-tuned to filter the 16 millisecond AC (60 Hz) cycle...that is, on the order of 10 times what you're trying to reject is a good starting point.  But now you have a (large) 22k resistor in the path to the DC-relay coil so there's not suitable current to drive a relay coil.  Hence the circuit employs transistor T1.

A transistor switches/blocks DC.  D1 and C2 insure this by creating a positive-only voltage - albeit unregulated with ripple.

Note that RL1 is more than just an opto-isolator; it has the load switching triac.  Together this is commonly called a Solid-State-Relay (SSR).

The practical reality is most hobbyists have a stash of unused electro-mechanical relays which are arguably easier to apply than a SSR.  While an SSR will generally be smaller with no-moving parts, they are typically several times the price for the same load switching capability.  And there are some gotcha electrical design considerations that can make your head spin.  Traditional relays are relatively easy to understand and there is something comforting if not visceral about hearing that "click"!

bmoran4 posted:

Presuming ERR has done all the engineering correctly, their bill of materials should be just fine:

RL1 Relay 425-1210-5-ND

Digikey doesn't stock the solid state relay.

#### Attachments

Images (1)

You may be able to use something like this but it is a tad pricey - with a little exploring around the suppliers sites, you may be able to fond other options that may be cheaper, or maybe someone on this forum knows of alternatives.

http://www.mouser.com/ProductDetail/Panasonic-Industrial-Devices/AQZ202/

The 4Amp is actually much more cost effective:

http://www.mouser.com/ProductD...ed-Circuits/CPC1706Y

These seem like these should work, but I would hope someone else could concur before you spend your money.

Last edited by bmoran4

I think I posted too early in the morning - I mistook the R2/C2 part of the circuit for the "RC filter" part.  When I was writing my post I kept wondering why the R and C were backwards in the filter but chalked that up to only one cup of coffee at that point - doh!  Everything makes much more sense now...my thanks to everyone who posted!  I've got an order accumulating for DK so will add a couple of the less common parts to it and then breadboard up a sample to see how things go.

Last edited by JTrains
bmoran4 posted:
...

The 4Amp is actually much more cost effective:

http://www.mouser.com/ProductD...ed-Circuits/CPC1706Y

These seem like these should work, but I would hope someone else could concur before you spend your money.

Yes, it's "only" \$3.49 (vs. \$11.49)...but only switches DC loads whilst the more expensive part switches AC or DC (like a traditional relay).  One of those considerations for Solid-State-Relays.

BTW, I seem to recall a thread about how-to-build a track-powered battery-replacement circuit for the 1.5V D-cell (?) in some kind of horn circuit.  If that's the case here, perhaps there would be some way to combine circuits functions...

LOL.  They aren't "my" relay modules but I do recommend the \$1 (or so, free shipping) eBay relay modules that even include the opto-isolator function:

But in this case, since there are some half-dozen components that must be hand-assembled anyway, I'd just go with wiring in a bare relay itself...adding whatever few components are needed to provide a suitable relay coil voltage when the +DC detector triggers the transistor.  That's assuming the OP wants to pursue the traditional relay approach.

It just depends on the OP's requirements - cost, size/space, ease-of-assembly, etc.

Just my 2 cents, but what makes a whistle-detection circuit "interesting" is if you can integrate the DC detection function with the load circuit to leverage the somewhat tedious assembly task.  That's why I ponder about combining this with a horn battery-replacement circuit (if applicable).  For example, not quite apples-to-apples but here's a hand-built circuit which has the same DC-offset detector circuit (that big cap on the bottom is the bi-polar) and a toggling circuit to drive 2 ditch-light LEDs.  Track voltage comes in on the left.  So when the Horn button is pressed, the ditch lights flash/alternate.  Size was an issue.  The point being by knowing what is being activated by the DC detector circuit, I did not have to use a large relay or expensive SSR.

#### Attachments

Images (2)

The part's not available for the ERR design, so we have to pick an alternate.  Then we'd obviously have to do a test of it to make sure it's a functional design.

Another cool idea would be to have both on one board, you could stuff the components for one or both.

gunrunnerjohn posted:

Time for a compact design that we could commit to OSH Park PCB fabrication.

That sounds like a great idea, the more the merrier. And as PLCProf said above, you and Stan are an awfully good project design team with threads/posts to follow along with the development of the projects.

gunrunnerjohn posted:

Time for a compact design that we could commit to OSH Park PCB fabrication.

I did that for my TrackBat - It is a C or D Cell drop in replacement that uses track AC power to provide low voltage DC for the postwar horn. I thought about putting circuitry similar to the above to also act as the DC Relay, but ran out of space to fit within the confines of the battery adapters I was using.

LM-317 Voltage Regulator

3A Diode

330uf Filter Capacitor

2 resistors to properly adjust the voltage regulator

The magic was arranging it so it would fit on a circuit board like this:

that fits within this and connecting the leads to the top and bottom:

And before everyone offers improvements let me remind you of the following:

• I am using components I have on hand left over from various other projects
• I'm not an expert at circuitboard design - I just tinker
• It works well enough to satisfy me - I'm happy!

#### Attachments

Images (2)
Last edited by bmoran4
bmoran4 posted:

Presuming ERR has done all the engineering correctly, their bill of materials should be just fine:

JP1, JP2 2 pin connector 277-1273-ND
RL1 Relay 425-1210-5-ND
T1 Transistor (NPN) 2N3904FS-ND
C1 Cap 0.1uf / 50v radial
R1 100k / .25w film resistor
R2 1k / .25w film resistor

The optoisolator is rated for a switched load of 3 amps. You may be able to find other optoisolators in the same family that have a higher switched current that may work for you if needed (but may have a different footprint).

There may be different conversations going on, but in looking at the ERR Hobby Corner page shown below, the above parts list is for the Post War Whistle Controller which does NOT have the DC detector circuit.

The DC whistle/horn detector circuit (referenced by the OP) is in the Solid State Post War Relay Replacement which has a different parts list.

#### Attachments

Images (1)
Last edited by stan2004
stan2004 posted:
bmoran4 posted:

Presuming ERR has done all the engineering correctly, their bill of materials should be just fine:

JP1, JP2 2 pin connector 277-1273-ND
RL1 Relay 425-1210-5-ND
T1 Transistor (NPN) 2N3904FS-ND
C1 Cap 0.1uf / 50v radial
R1 100k / .25w film resistor
R2 1k / .25w film resistor

The optoisolator is rated for a switched load of 3 amps. You may be able to find other optoisolators in the same family that have a higher switched current that may work for you if needed (but may have a different footprint).

There may be different conversations going on, but in looking at the ERR Hobby Corner page shown below, the above parts list is for the Post War Whistle Controller which does NOT have the DC detector circuit.

The DC whistle/horn detector circuit (referenced by the OP) is in the Solid State Post War Relay Replacement which has a different parts list.

Whopsies! I had the wrong parts list in the computer clipboard! I'm glad you caught that! This is the correct parts list I believe - note the Bi-Polar capacitor:

JP1, JP2 2 pin connector 277-1273-ND
RL1 Relay 425-1210-5-ND
T1 Transistor (NPN) 2N3904FS-ND
D1 1N4004 1 Amp diode
C1 Cap 10uf / 35v BP 6mm diameter, 2.54 mm leads, Bi-Polar!!
R1 22k / .25w film resistor
R2 820 / .25w film resistor
R3 10k / .25w film resistor

That's a battery holder for three AA cells and has the form factor of the larger D battery.  You find them in many LED flashlights.

gunrunnerjohn posted:

That's a battery holder for three AA cells and has the form factor of the larger D battery.  You find them in many LED flashlights.

Actually, the one pictured is 4 AAA in to 1 C Form Factor - I also have the one that takes three AA cells to a D form factor.

OK, three or four, what's the difference.   In any case, that's where you find them, they're common in consumer goods.  For a battery replacement for O-gauge, why didn't you use the D form factor?

JTrains posted:

I’m looking to build a few whistling accessories in the Post War style that respond to the classic whistle activation DC offset.  In place of the usual whistle tender relay, I’d like to build a discrete circuit.

...

Well, before releasing Gerbers I think it prudent to define the goal.  As I understand the OP, the idea is to replace the obsolete and somewhat finicky Post War relay with a solid-state equivalent...just as the ERR Hobby Corner page describes.  So is that it?  Is the objective just to convert this to an OSH Park ready design to get the bare boards for \$2 (free shipping)?

Or is it to identify exactly what these "whistling accessories" are and potentially integrate those circuits...or perhaps realize that the accessory is a DC device (like a 1.5V DC horn circuit) and use the DC detector to trigger a 50 cent power transistor/FET rather than a spendy SSR or bulky relay?

I found C and D size battery holders as illustrated earlier on eBay:

If one of the "whistling accessories" is indeed a 1.5V horn battery circuit, that might be a fun project.  I don't have such an accessory myself but I suppose there might be some benefit to cramming the DC offset detector and battery-replacement within the confines of a D holder(?).

#### Attachments

Images (1)

I can't believe you couldn't get most of that into a D-cell form-factor, as you say, defining the actual goal is the first step.

stan2004 posted:
JTrains posted:

I’m looking to build a few whistling accessories in the Post War style that respond to the classic whistle activation DC offset.  In place of the usual whistle tender relay, I’d like to build a discrete circuit.

...

Well, before releasing Gerbers I think it prudent to define the goal.  As I understand the OP, the idea is to replace the obsolete and somewhat finicky Post War relay with a solid-state equivalent...just as the ERR Hobby Corner page describes.  So is that it?  Is the objective just to convert this to an OSH Park ready design to get the bare boards for \$2 (free shipping)?

If one of the "whistling accessories" is indeed a 1.5V horn battery circuit, that might be a fun project.  I don't have such an accessory myself but I suppose there might be some benefit to cramming the DC offset detector and battery-replacement within the confines of a D holder(?).

Hehe...wow, did this thread blow up (in a good way) while I was in client meetings this afternoon!  My original vision was trying to actuate old PW, high (relatively speaking) amperage AC whistle units - not a 1.5V DC PW horn.  That being said...having the ability to optionally power a PW DC horn would be pretty sweet.  I had not heard of the TrackBat before this - but that was also on my long list of things-to-try-and-build for a couple of diesels I have that don't have horns.  And adding in capability to alternatively sound a bell with reversed polarity input would be icing on the cake.

And making this an easily-order-able PCB would IMHO be a great thing - I was trying to find something like that I could build before posting the question.  I'm just a tinkerer - but if the group wants to take it to another level, my guess is that others would really benefit as well.

Last edited by JTrains

And forgive me for thread-necro (hides evil looking book).

I noticed that it does only DC load switching. This is going on a Pulmor powered whistle tender.

Also I am curious if anyone has built this with the replacement and does it work well at lower voltages.

I think the original that we're trying to replace was triac based.  Personally, I think I'd just use a small relay, there are very inexpensive choices that would solve the problem for any kind of power.  I'd probably stick something like the TE Connectivity Potter & Brumfield Relays 9-1462038-9 on the board.  It has 5A contacts and is pretty compact.

#### Attachments

Images (1)

I bought enough material to make 10. Yes, that many. One to make sure I did it right, the rest in case I goof up.

Yes. Came in the mail last night and I spent a good few hours building. Sadly, something's not right. I'm going to have to build another, but not quite so permanent.

I hate it when that happens, and it happens to most of us at times.   For a quantity of the same item, I lay out a little PCB and make the build much easier and less error prone.

Last edited by gunrunnerjohn

My (first) failing this time was that I didnt build the circuit on a reusable socket board.

Also, I see why you recommended the photo-transistor version versus the triac of the relay. Pulmors dont seem to care if run DC or AC.

Next problem. This second temporary build works flawlessly with my Modern CW-80, but refuses to operate on my Type 4090.

Reversed contacts on the 4090 by making U to center and B to outside and it triggers. This now makes it trigger with "Bell" on the CW-80.

Working backwards would "seem" to indicate the transformer or whistle controller connections are reversed.

It would be pretty easy to recreate that PCB and make assembling these easy.

Stone Rhino posted:

My (first) failing this time was that I didnt build the circuit on a reusable socket board.

Also, I see why you recommended the photo-transistor version versus the triac of the relay. Pulmors dont seem to care if run DC or AC.

Next problem. This second temporary build works flawlessly with my Modern CW-80, but refuses to operate on my Type 4090.

Reversed contacts on the 4090 by making U to center and B to outside and it triggers. This now makes it trigger with "Bell" on the CW-80.

A few relevant notes that explain your observations:

• Most single train transformers swap the common terminal and variable terminals from the multi-train transformers. The postwar multi train transformers traditionally have U as common, whereas the single train utilize U as the variable voltage. I'm not sure what traditions the CW and 4090 follow. Regardless of transformer, this is remedied by ensuring the common (regardless of lettering convention) is wired to the outside rail, and the variable voltage to the center rail.
• The Whistle and Bell work off of a DC offset layered on the AC current. The polarity of this offset determines articulation of the Bell or Whistle. Swapping the terminals swaps the polarity. Note that the postwar whistle/horn relays work regardless of the polarity.
Last edited by bmoran4

Second build seems to be functioning properly.

bmoran4 posted:

A few relevant notes that explain your observations:

• Most single train transformers swap the common terminal and variable terminals from the multi-train transformers. The postwar multi train transformers traditionally have U as common, whereas the single train utilize U as the variable voltage. I'm not sure what traditions the CW and 4090 follow. Regardless of transformer, this is remedied by ensuring the common (regardless of lettering convention) is wired to the outside rail, and the variable voltage to the center rail.
• The Whistle and Bell work off of a DC offset layered on the AC current. The polarity of this offset determines articulation of the Bell or Whistle. Swapping the terminals swaps the polarity. Note that the postwar whistle/horn relays work regardless of the polarity.

So what you're saying is that I'm doing it right; It's the transformer to blame.

The 4090 has four posts. U-A-B-C. It has two handles. One is Direction/Whistle, the other is Power

• A-U = 5-14v
• B-U = 0-11v (This pair is great for Marx stuff as they need next to no voltage to fly off the track  )
• A-B = 5v
• B-C = 11v
• A-C = 16v

The logic you've specified seems to make sense as the U post is the only true variable output.

Last edited by Stone Rhino
Stone Rhino posted:

Second build seems to be functioning properly.

bmoran4 posted:

A few relevant notes that explain your observations:

• Most single train transformers swap the common terminal and variable terminals from the multi-train transformers. The postwar multi train transformers traditionally have U as common, whereas the single train utilize U as the variable voltage. I'm not sure what traditions the CW and 4090 follow. Regardless of transformer, this is remedied by ensuring the common (regardless of lettering convention) is wired to the outside rail, and the variable voltage to the center rail.
• The Whistle and Bell work off of a DC offset layered on the AC current. The polarity of this offset determines articulation of the Bell or Whistle. Swapping the terminals swaps the polarity. Note that the postwar whistle/horn relays work regardless of the polarity.

So what you're saying is that I'm doing it right; It's the transformer to blame.

The 4090 has four posts. U-A-B-C. It has two handles. One is Direction/Whistle, the other is Power

• A-U = 5-14v
• B-U = 0-11v (This pair is great for Marx stuff as they need next to no voltage to fly off the track  )
• A-B = 5v
• B-C = 11v
• A-C = 16v

The logic you've specified seems to make sense as the U post is the only true variable output.

If you have wired your circuit properly, and have common on the outside rail and variable on the center rail, your circuit should activate with the whistle controller. If instead, you desire it to activate with the bell button, I would reverse the leads from the trucks to your circuit, or alternatively, reverse the direction of the diode. Hope this gets you going! Just don't ask why Lionel was inconsistent with their transformer post designation....

Last edited by bmoran4

Everything seems to be working quite well! Thank you all for your help.

bmoran4 posted:

The magic was arranging it so it would fit on a circuit board like this:

A schematic would have been useful.

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
330-757-3020

www.ogaugerr.com
×
×
×
×