Skip to main content

Thank you Stan. I checked them out on utube and they came out fine.

 

By the way, since someone asked about flashing the 154 crossing signal, I have a suggestion and a question.

 

First the suggestion: Someone in one of the forums suggested using an automotive flasher--so I ordered one. It is an EF30WWk from Memotronics, LLC (made by CED Industries). Fairly inexpensive, works well (albeit a little noisy), and you could operate many 154's at the same time.

 

The Questions: There have been a number of suggestions leading to circuits that will only drive LED's. With the closing of Radio Shack, I availed myself of all the LED's in stock (at 80% off). I know there are LED versions of the 154 available, but I would like to use the original, but with LED's and the LED flashing circuits readily available. So my question is---are there any LED holders you can buy that screw into the 154 light bulb sockets?? I have searched the web without success.

 

Ken

Last edited by ken's trains

Some of the older automotive "thermal" flashers required a substantial load to properly activate the on-off cycling.  But if that's been solved, then that's certainly another option.  I see the EF30WWK runs $9.99 plus shipping on Amazon

 

http://www.amazon.com/CEC-Indu...nating/dp/B00JXLHFAA

 

I agree with a 14 Amp rating, you'll be able to drive many 154's at the same time

 

I was fooling with yet another eBay module based on the popular NE555 timer IC.  This is about $1.60 (free shipping) and was functional as-received unlike the previous module I showed (which required modification of the circuit).

 

http://www.ebay.com/itm/121461...=STRK%3AMEBIDX%3AIT#

 

 

ogr ebay module DC crossing flasher 1

Earlier in this thread, GRJ found a link to a crossing flasher circuit using the NE555 timer IC.

 

http://modeltrainadvisors.com/...ing-ledprojects.html

 

The eBay module essentially has the NE555 circuit in the above link as shown below...including screwdriver-adjustment trimmer resistors to set the frequency and on-time ratio of the two lights.  For a crossing flasher presumably you'd want equal on-times so each LED is on the same amount of time.

 

ogr ebay module DC crossing flasher 2

In addition to the module, 2 external resistors are required and of course 2 external red LEDs.  The choice of resistor depends on the voltage you're running at.  Due to a quirk in how the NE555 chip operates, if you choose equal value resistors, the lower LED (CR2) in the diagram will be slightly dimmer than the upper LED (CR1).  You might not notice the brightness difference but if so use a slightly lower value resistor going to CR2.  At 5V use, say, 150 instead of 220.  At 12V use, say, 390 instead of 470.  1/4 Watt resistors are fine.

 

Note that within the crossing flasher, the 2 LEDs do not share a common polarity.  So the "-" of the upper LED is connected to the "+" of the lower LED...and it is this connection that is "driven" by the OUTput of the eBay module.

 

Here it is in operation. 

 

The youtube link if you can't view this here: https://youtu.be/co-ai1karCg

 

 

Attachments

Images (2)
  • ogr ebay module DC crossing flasher 1
  • ogr ebay module DC crossing flasher 2
Videos (1)
ogr ne555 crossing flasher
Originally Posted by ken's trains:
I know there are LED versions of the 154 available, but I would like to use the original, but with LED's and the LED flashing circuits readily available. So my question is---are there any LED holders you can buy that screw into the 154 light bulb sockets?? I have searched the web without success.

I don't know about LED-bulb adapters that fit a 154, but if you do switch to LEDs note that most signal-flashers have 3-wires going to them...a common, and 1 wire each to the 2 lamps.  Some LED circuits are configured to drive common-anode, others common-cathode, and others (like one I show in above posting) mixed anode-cathode common.  If this is a DIY conversion for use with your own circuit I suppose it doesn't matter, but there may be some value to seeing how the 154 LED version assigns the common and follow that.

 

Separately, I'd think some of the plug-and-play circuits implement the brightness fading/decay associated with filament bulbs.  If this is something you'd like in the long run, now's the time to plan for it as it obviously affects selection of DIY circuit and/or LED common wiring.

Hi Stan,

 

I was able to find some LED holders after much searching, but dummy me, I didn't even think about google-ing LEDs with a bayonet or screw base. There are lots of those available on ebay. Couldn't I get around the 3-wire issue by just toggling a relay with a NO & a NC & a common output?

 

Also, the other thing that is very important to me is to be able to replace all of the 022 switch bulbs with LED's (I will be using about 30 switches on my layout). That will save dramatically on power consumption & heat. Since there are LED bulb-replacements available (and I have ordered some), the only other issue that remains (and again I plead ignorance) Is, if I power the LED using the constant voltage pin and a DC power supply, will I have a problem using the same ground as the AC supply?

 

Ken

Originally Posted by ken's trains:
...Couldn't I get around the 3-wire issue by just toggling a relay with a NO & a NC & a common output?

Yes.  .

...if I power the LED using the constant voltage pin and a DC power supply, will I have a problem using the same ground as the AC supply?

Yes...for example if you derive the DC LED supply voltage from the AC switch voltage using an eBay voltage regulator module that uses a bridge rectifier for AC-to-DC conversion.  In such a case, the "-" output of the regulator module will NOT be the same as AC-common.  This will generate magic smoke.

 

So if using the AC-to-DC voltage regulator module, use a spare AC transformer (isolated common) to power the AC-to-DC regulator module.  Or use an AC-adapter (wall-wart) with a regulated DC output voltage (about $2 on eBay).  Or use an AC-adapter with an unregulated DC output voltage followed by an eBay DC-DC regulator module set to the desired DC voltage (about $1 on eBay).  Then, you can tie the "-" output of the regulated DC voltage to the AC common.

Stan,

 

Thank you. The problem then lies in the fact that the ground return for the light bulb in the 022 switches is the frame which is tied to AC ground. So, it seems to me that whatever I use to derive my DC voltage, I am stuck with the lamp frame in the switch being hard-connected to the switch frame and thus AC ground. Maybe I am still confused, but it seems like an LED lamp will therefore, not work in the 022 switches unless I can insulate the bulb case from the frame (I haven't looked closely, but don't think it's doable).

 

Ken

Stan,

 

It's the pest again. I just received 4 of the cycle-timer modules you showed in your February 28 post (the one's with the 4-segment digital displays. I powered them with my DC supply and only one segment lites up on "0". I pushed all the combinations of buttons with no change (couldn't get anything to cycle). There is a 3rd input marked CH1. I looked it up on ebay and said it was the trigger. So I applied 12vdc to it and pushed all the buttons with no result. What do I need to do to get the dumb thing to start cycling? Also, I only have one LED lit and it is red (comes on when I apply power to the module).

 

Ken

Last edited by ken's trains
Originally Posted by ken's trains:

Stan,

 

Thank you. The problem then lies in the fact that the ground return for the light bulb in the 022 switches is the frame which is tied to AC ground. So, it seems to me that whatever I use to derive my DC voltage, I am stuck with the lamp frame in the switch being hard-connected to the switch frame and thus AC ground. Maybe I am still confused, but it seems like an LED lamp will therefore, not work in the 022 switches unless I can insulate the bulb case from the frame (I haven't looked closely, but don't think it's doable).

 

Ken

https://ogrforum.ogaugerr.com/t...direct-fit-led-bulbs

 

Per above recent thread, there apparently are AC LED bulbs that fit O22 switches.

 

If above is a red herring, I suppose if the switches have ability to be powered from their own external DC supply it could be done with the isolated DC "-" tied to track common.

 

Originally Posted by ken's trains:

Stan,

 

It's the pest again. I just received 4 of the cycle-timer modules you showed in your February 28 post (the one's with the 4-segment digital displays. I powered them with my DC supply and only one segment lites up on "0". I pushed all the combinations of buttons with no change (couldn't get anything to cycle). There is a 3rd input marked CH1. I looked it up on ebay and said it was the trigger. So I applied 12vdc to it and pushed all the buttons with no result. What do I need to do to get the dumb thing to start cycling? Also, I only have one LED lit and it is red (comes on when I apply power to the module).

 

Ken

https://ogrforum.ogaugerr.com/t...41#39722751973169341

 

I can't remember what the module does when you first get it (before you "program" it) but in above thread hokie71 reports the same behavior (showing 0).  I believe his power supply was not regulated or something like that. 

 

Per above thread there are better instructions here than what some of the eBay listings provide:

 

https://thingiverse-production...M01__User_Manual.pdf

 

You definitely have to "program" the module to get it to cycle automatically at a suitable rate for a crossing flasher. I'll review what I did and provide additional details.

Here's a video showing the FRM01 timer module set to Mode=05, T1=0100, T2=0100, NX=0000.

 

When "clean" DC power is applied to DC+ and DC- the module immediately starts cycling.  Briefly pressing the leftmost SET button turns the display on and off.  When the display is on, hold down the SET button for several seconds to enter the programming mode.  When in programming mode, the blue LEDs to the right of the numeric display shows what parameter you are changing (either MD, T1, T2, or NX).  Unfortunately these blue LEDs are blurry in the video.

 

When entering programming mode, it starts with MD (Mode).  It was already in Mode 05, but I show how you use the SW1 button (to change digit) and the NUM+ and NUM- buttons to alter the value of the selected digit.

 

Advance to the next parameter by briefly pressing the leftmost SET button.

 

As shown I had set T1 and T2 to 0100 and 0100 which are equivalent to 1.00 seconds ON, and 1.00 seconds OFF.  Parameter NX was set to 0000 which is the timebase for the T1 and T2 parameters.  With NX=0000, each count of T1 and T2 equals 0.01 seconds....so a count of 0100 is 1.00 seconds.

 

Exit the programming mode to return to "normal" operation by holding down the SET button.

 

 

Youtube version of video: http://youtu.be/QoNEQPitpVM

 

Attachments

Videos (1)
ogr frm01 timer in crossing flasher mode 5
Last edited by stan2004

Stan,

 

The time base selection is dependent on the mode you are in (or so the manual says). I want to use mode 16 to operate my 154 crossing signal. The manual states that in that mode T1/T2 can be adjusted from 0.1 to -270 hours. First, what is -270 hours?. Next, if I read about NX, for mode 16 and several others, there doesn't seem to be a way to program for less than 1 sec. intervals, so how do I go <1 sec.?

 

What am I missing.

 

Ken

Last edited by ken's trains

I think they mean 270 hours.  Per instructions, for Function 1-6 and 11-16 the parameter NX is the timebase or "multiplier" for T1 and T2.  The left 2-digits of NX are the T1 timebase in seconds, the right 2-digits are the T2 timebase in seconds.  00-99 is the range.  For the unique case of a timebase of 00, this is interpreted as a timebase of 0.01 seconds.

 

So the max time for T1 and T2 occur if you set the timebase to 99 (seconds).  Then by setting T1 or T2 to 9999, you get a delay of 9999 x 99 = 989,901 seconds or about 270 hours.

 

And the min time for T1 and T2 are for a timebase of 00 (special case of 0.01 seconds).  So the min time is by setting T1 or T2 to 0001 in which case the time delay will be only 0001 x 0.01 = 0.01 seconds.  The relay will buzz as the contacts slam back and forth trying to go this fast.  As I show in the video, with a T1 or T2 delay of 0100, the delay is 0100 x 0.01 = 1.00 seconds.  So to answer your question, you get delays of less than 1 second by setting the timebase to 00 which makes each count of T1 or T2 worth only 0.01 seconds.

Stan, again thank you so much. I wish I could say that's all, but after playing with that module for some time, I came up with the following:

 

1) As you showed me (and I have purchased and have it working), I wish to use an IR detection circuit to detect train crossing and operate crossing accessories.

2) The cycle module I have been playing with (and you have so well explained above) seems to have a limitation. I tried most of the cycling modes and could not find one where the cycling would stop once the trigger (I guess that figures by the name) is removed. So once it's triggered it runs till you kill power. Is there a mode that cycles only when a constant voltage is on CH1?

3) Also, the IR detection circuitry requires 5vdc, but the cycle module requires 12vdc. So now I need 2 separate power supplies.

4) Also, since AC power to the 154 is applied to the common on the module relay, one light will always be on unless I disconnect AC power.

5) Therefore, it seems I need to power the 154 through a 2nd relay that is triggered at the same time a 3rd relay is triggered to supply power to the cycle module and the trigger also applied simultaneously to CH1 on the module.

 

I'm getting dizzy. Have I completely misunderstood how all this should work, and if so, how to make it less complicated.

 

Ken

Originally Posted by ken's trains:

1) As you showed me (and I have purchased and have it working), I wish to use an IR detection circuit to detect train crossing and operate crossing accessories.

Ahh, we're back to IR detection (the good stuff!).  Just to be clear, you have the following 5V module? 

 

s-l1600 1

Have you settled on the "reflective" mode getting a reflection from a passing consist, or the "transmissive" mode where the consist blocks the beam?  In the latter case you'd need to separate the clear transmitter LED or dark receiver phototransistor from the circuit board and run a pair of wires.  I think you mentioned doing this...

 

s-l1600

2) The cycle module I have been playing with (and you have so well explained above) seems to have a limitation. I tried most of the cycling modes and could not find one where the cycling would stop once the trigger (I guess that figures by the name) is removed. So once it's triggered it runs till you kill power. Is there a mode that cycles only when a constant voltage is on CH1?

I don't see a Function where the trigger gates the cycling.  But as you note below, I'm not sure this would help since crossing flashers use both sides of the SPDT relay output so even if the cycling could be started/stopped with a control signal, one of the lamps would be ON all the time.

3) Also, the IR detection circuitry requires 5vdc, but the cycle module requires 12vdc. So now I need 2 separate power supplies.

A 99 cent (free shipping) eBay LM2596 DC-DC step-down converter module should do the trick.  Yes, you could wire up a 7805 5V regulator IC but for the cost why not splurge.  If you haven't given up on tinkering with electronic components, you'll want a few of these converters in your parts stash for future projects.

 

http://www.ebay.com/itm/1-Pcs-...;hash=item4ada8a76da

4) Also, since AC power to the 154 is applied to the common on the module relay, one light will always be on unless I disconnect AC power.

Will 154 bulbs at 12V DC work?  If so, as shown in the earlier video, perhaps you can power the cycle-timer and the 154 at the same time with 12V DC.  I don't have the 154 but even if you can't find LED drop-in/screw-in replacements for the bulbs, it seems it shouldn't be hard to wire in two 10 cent Red LEDs with 2 external resistors (yes, nothing is so easy as the job you imagine someone else doing).

5) Therefore, it seems I need to power the 154 through a 2nd relay that is triggered at the same time a 3rd relay is triggered to supply power to the cycle module and the trigger also applied simultaneously to CH1 on the module.

Well, it may be more complicated than that!  How about that time-delay after the train clears the IR sensor?  As shown earlier, you may want to add a few components to add a 5-10 second (or whatever) time delay.  It depends on how you want to activate your accessory - such as from both directions or if a short train (like a hand-car) can stop between the sensors. 

I'm getting dizzy. Have I completely misunderstood how all this should work, and if so, how to make it less complicated.

I hear you.  And I think you "get it".  But this aspect of assembling a custom IR occupancy detector suitable for your unique layout is part of the fun of the hobby...rather than buying an off-the-shelf system.  Well, that's my opinion of course.  There are (at least) 2 things that have changed in this tiny sliver of the hobby. 

 

1) Insanely priced eBay modules which allow you to assemble unique customized functions without sniffing too many solder fumes.  And we haven't discussed the next step of programmable Arduino-like controller modules.

 

2) Online forums like OGR where you can get timely technical advice. Think of the old days when you'd get a magazine with a DIY circuit to build something like this from the component level.  You were on your own.  Then trudging to Radio Shack to buy parts and hoping the guy behind the counter knew which end of the soldering iron to hold.

 

Attachments

Images (2)
  • s-l1600 1
  • s-l1600

Hi Stan,

 

Yes that is the IR detector module(s) I have and yes I will eventually separate them to go across the track(s). I thank you for confirming my suspicions regarding the 'cycle module' (which is still a pretty neat device for the price).

 

By the way, I just received 2 LED lamps for test purposes. I took a break from writing, went upstairs and put an LED in the 022 switch (replacing the lamp). I hooked my full-wave rectifier & voltage regulator module (adjusted to 12vdc) to my AC transformer. I took the 12vdc output from the volt reg. and applied it to the 022 constant voltage pin. I turned on the AC and then connected (actually just tapped) the ground side of the volt reg. to AC ground. Hey, and lo and behold, I didn't just get magic smoke--the full-wave bridge started on fire. So maybe I need a bigger bridge (just kidding) or it was defective (still kidding). I know, but the bridge/volt reg. were inexpensive and I just had to try it. Someone suggested putting a diode in the LED path and suggested a capacitor to compensate for the volt drop across the diode. What they didn't mention was where the diode had to be placed--will it protect everything if I put it on the + or input side? If not, and it had to go on the ground side, that won't work since I cannot separate the bulb socket ground from AC return.

Here's a recycled diagram from another thread. If you start with a train transformer AC output and derive DC voltage thru a bridge rectifier, the DC- is NOT at the same potential (voltage) as the AC ground going in. Bad things will happen - you're essentially shorting 2-pins of the bridge rectifier.

 

ogr isolated rail a not equal b

As shown, you can use an isolated (different) AC transformer that does not share a common ground with the traction AC transformer.  Or you can use an AC-to-DC wall-wart adapter.  Then you can tie the DC- to the track AC ground.

 

I'm not sure what the suggestion about diodes and capacitors is all about but I think that's a separate issue about managing LED polarity.  The issue at hand is managing common grounds in your layout.  If using track AC or accessory AC to generate DC voltage through a bridge rectifier, do NOT connect the DC- output to AC common feeding the bridge rectifier.  A potential gotcha is some/most multiple output transformers share a common ground between outputs.

 

Attachments

Images (1)
  • ogr isolated rail a not equal b

Kris, the resistor value depends on the voltage you run the module.  The higher the voltage, the higher the resistor so as to limit the current into the LEDs.  1/4 Watt resistors or 1/2 Watt resistors are suitable.

 

If running at 5V, the resistor should be about 220 ohms.  If running at 12V, 470 ohms.

 

Presumably you are not fabricating your own crossing signal pole/structure so the LED size depends on how much space you have to work with.  Red LEDs are a few pennies each on eBay - just punch "5mm Red LED" or "3mm Red LED" in eBay for thousands of choices.  Or, Radio Shack sells Red LEDs too so I suppose you can single-handedly try to rescue them from bankruptcy

 

I suggest an eBay resistor assortments on eBay where you get an assortment of values.  For example, here's a 1/4 Watt assortment for 1/2 cent per resistor:

 

http://www.ebay.com/itm/Kinds-...;hash=item2ecd21d3e8

Hi Stan,

 

Well I finally have it all working--not without a lot of stupid mistakes (getting too old). The first thing I forgot is that you can't just apply DC to the constant voltage pin on the 022 switch since that power runs the switch in addition to powering the lamp. However, there is a separate wire from that pin to the lamp that can be un-soldered and connected to DC power. Did that, powered the switch via constant voltage pin/AC, used a separate DC power supply (per your suggestion), and was able to use track return as a ground return (DC-) to the DC power supply. Switch worked on all functions and LED looked great.

 

Thank you so much.

 

Ken

If now ready to start fiddling with the IR part of the project, here's a simple tool that might come in handy.  Using just a battery, an IR phototransistor, and a Red LED as an indicator, you can build an IR detector to confirm the IR LEDs are indeed transmitting.  Some will suggest using a digital camera which renders IR energy as a blue-ish or purple-ish glow.  I think Radio Shack used to sell a credit-card like detector that would glow when hit by IR energy.

 

ogr 3mm IR led thru digital camera

A 3V, or 2 x 1.5V , or 9V battery will work.  The IR phototransistor which will be the detector is the same eBay 3mm NPN detector shown earlier (about 20 cents).  The Red LED is any Red LED.  I used a 9V clip so the "circuit" can snap on and off a 9V battery.

 

ir detector cheap

When the phototransistor detects IR energy, it turns on and current flows thru the Red LED turning it on - proportionally bright to the amount of IR detected.  The current levels are low enough that resistors or other limiting circuitry is not required.  If stored in a dark-place, the current draw is negligible so an on-off switch is not needed but of course it can just be popped off the battery.  I put a piece of black heat shrink tubing on the detector to focus/narrow the detection window.

 

If you're a tinkerer, you can enhance performance by adding a 5 cents transistor with a switch to select a low-gain, hi-gain mode to indicate even lower levels of IR.  And of course you can "tap" into the circuit with any multimeter in DC-current mode to measure the micro-amps or milli-amps of current that flow in these phototransistors when used for train-detection applications.

 

Here's a short video showing the detector in action.  Watch the red LED as it detects IR from an incandescent bulb, from a 3mm IR LED, from a white-LED flashlight (not much IR), and from a IR TV remote control.

 

Youtube version of above: http://youtu.be/kAprGnfLPpU

Attachments

Images (2)
  • ogr 3mm IR led thru digital camera
  • ir detector cheap
Videos (1)
ir detector cheap

Thank you also Stan. I'm going to modify one of the IR detection modules to try it across track. I'll let you know how it works.

 

By the way, if anyone needs a much improved manual for that cycle-timer module some of us have been battling with, I will post it. A very nice gentlemen by the name of Russ emailed a copy to me. It's a .pdf file.

 

Ken

So here's a basic IR-triggered crossing flasher using low-cost eBay modules and components.  This uses the transmissive method (break-the-beam to activate) with an IR LED emitter on one side of the track and an IR photo-transistor detector on the other side of the track.  This requires 5V DC only and is based on the LED crossing flasher shown earlier, combined with the 5V DC relay module shown earlier, plus an 3mm IR LED, 3mm IR photo-transistor, and a 100 ohm resistor.

 

ogr simple 5v itad crossing flasher

The LED crossing flasher operation was described earlier.  The idea is how to trigger the flasher using IR occupancy detection.  An IR detection module as discussed earlier can be used, but for a simple break-the-beam application it's arguably worth the extra wiring/soldering to roll-your-own IR circuit.  The IR LED emitter requires a resistor to limit the current from the 5V DC supply.  The IR photo-transistor can be hookup up directly to the relay module since the module supplies bias current (as shown in the schematic earlier in the thread).

 

In this case the photo-transistor is normally "on" when no train is present.  The train breaks the beam to turn "off" the photo-transistor.  So the relay module is triggered when no train is present so the Normally Closed (NC) contact is used to supply 5V DC power to the crossing flasher circuit.

 

ogr simple 5v itad crossing flasher hookup

And here's a video in action.

 

Youtube version: http://youtu.be/OmW33xxFlOA

 

Attachments

Images (2)
  • ogr simple 5v itad crossing flasher hookup
  • ogr simple 5v itad crossing flasher
Videos (1)
basic itad like crossing flasher 5vdc
Originally Posted by nvocc5:

I would like to see the wiring diagram for the timer module and SPDT rely, please.

Which version are you interested in: 

 

1. Timer module activating the relay module.  For example, to alternate hi-currents to incandescent bulbs or whatever.

 

2. Relay module activating Timer module.  For example, to switch power to the timer module which directly drives low-current LEDs  The same switched power could also activate a low-cost eBay sound module with signal crossing sounds.

If you buy into the DIY roll-your-own approach to O Gauge accessories here's a twist to the signal crossing flasher.  Everyone knows about MP3 iPod-like music players that drive earbuds.  For less than $7 (free shipping of course) on eBay from Asia, you get an MP3 player with built-in audio amp and speaker with room-filling volume (a few Watts audio power).  There are many versions but here's one:

 

http://www.ebay.com/itm/Portab...;hash=item418bcdd068

 

ogr td-v26

Perhaps common knowledge, but MP3 files don't have to be "music".  So I downloaded a signal crossing sound for free and stored it as an MP3 file.  I put the MP3 file onto a Micro SD memory card (you probably have one lying around from an old camera, cellphone, whatever) and plugged the memory card into the player.

 

I hacked apart the MP3 player to get to just the electronics and speaker.  The player is typically powered by 5V DC from a mini-USB cable but as shown I just have 5V DC going straight in.  The 5V is switched from the relay module that previous powered the 5V DC crossing flasher module.  

 

 

ogr signal crossing flasher with sound module

I wired it up so when 5V DC is applied to the MP3 player, it loads the MP3 file from the sound card and starts playing.  It seems to have a 2 second or so "boot" time so the crossing lights start flashing a bit before the sound starts.  Of course if this bothers you please just buy an assembled plug-and-play system.

 

And here it is in action.  Waving my hand in front of the IR phototransistor on the lower left blocks the light from a lamp; this triggers the 5V relay module which applies 5V DC to both the LED signal flasher module and the MP3 player.

 

Edit:  forgot youtube link for above video: https://youtu.be/sOVaV1UEJMw

Attachments

Images (2)
  • ogr td-v26
  • ogr signal crossing flasher with sound module
Videos (1)
ogr signal crossing flasher with sound module
Last edited by stan2004
Originally Posted by gunrunnerjohn:

Another option is the BigDAWGS Sound Chips.  Not as loud, but then it's likely you don't need great volume for a crossing signal.  I know after the 20th trip around the club layout, I want to go unplug all the various signals on each crossing module!

 

Yes, there are several suppliers of programmable sound chips and modules also for under $10.  However, I'm not aware of any that provide MP3 quality sound.  This is my opinion only, but one reason you don't see high power audio output from those greeting-card type sound-chips and modules (vs. MP3 players) is the sound quality is so poor that you wouldn't want to amplify it!

Originally Posted by nvocc5:

Both if you do not mind, please.

In first case, oscillator module drives relay module.  When 5V DC is applied to circuit, the relay turns on and off at the frequency set by the oscillator module.  By applying +5V to the COM(mon) relay contact, +5V then alternates between the NC and NO contacts.  This can be useful for driving, say, signal crossing LEDs.

 

ogr ne555 drives relay module

In second case, relay module applies power to the oscillator module when a trigger signal is present.  5V DC is always applied to the relay module.  The trigger signal activates the relay; if +5V DC is applied to the relay COM(mon), +5V is applied to the oscillator module via the NO relay contact.  If you want the oscillator to be active in the absence of trigger, then power the oscillator from the relay NC contact.

 

ogr relay module drive ne555

Attachments

Images (2)
  • ogr ne555 drives relay module
  • ogr relay module drive ne555

Getting back to the mainline of roll-your-own IR sensing, I'd think the next step is dual-sensing for bi-directional operation...  so a train approaching from either direction can trigger the crossing signal.  Well, an IR photo-transistor detector is essentially a switch (albeit low-current) that turns on when it detects IR energy from the IR LED emitter beam, and turns off if a train blocks the beam.

 

ogr DUAL simple 5v itad crossing flasher

By putting two IR detectors "in series", breaking either beam activates the accessory.  The effect is like wiring two ITAD outputs in parallel (either or both activates the accessory).  The rub is the additional cost in the DIY approach is only about 50 cents whereas an ITAD can run $30 or more.  In the diagram below, the additional components are another IR LED, another IR photo-transistor, and another 100 ohm resistor.

 

ogr DUAL simple 5v itad crossing flasher hookup

And here it is in action:

 

Youtube version of above video: https://youtu.be/7x5370Yi7xM

 

So a limitation of the IR beam approach (single-beam or multi-beam) is if a train is short enough that the engine does not trip the last detector before the caboose clears the first detector.  As I understand it, a work-around provided by off-the-shelf ITAD-like devices is a time-delay that holds the accessory active for some number of seconds after the trigger is lost.  That's next. 

Attachments

Images (2)
  • ogr DUAL simple 5v itad crossing flasher hookup
  • ogr DUAL simple 5v itad crossing flasher
Videos (1)
ogr dual simple itad like crossing flasher
Originally Posted by nvocc5:

What about placing a third IR circuit in the middle? This so much fun...

Now that's the spirit!

 

A 3rd circuit should work fine.  Here's the deal.  In break-the-beam application like train occupancy detection, IR photo-transistors are being used as on-off switches.  An ideal switch of course is 0-ohms when "on" or closed and infinite ohms when "off" or open.  IR photo-transistors are not ideal switches.  For typical IR train applications, when "on" the resistance will be, say, a few hundreds of ohms.  When "off" they will be, say, a million ohms.  The stronger the IR energy hitting the detector, the lower the "on" resistance.  The darker the detector when the beam is interrupted, the higher the "off" resistance.

 

So stacking multiple detectors "in series" has its limitations because the on-resistances add up (being in series) and at some point the sum of resistances will be too high to effectively act as a closed (low-resistance) switch.  So you need to start diving into the datasheets which gets tedious.

 

But if messing with this stuff is what makes the hobby interesting/fun to you, something easy/cheap to try is increasing the amount of IR energy hitting the detector when "on".  One way to do this is to decrease the distance between IR LED and photo-transistor.  But this reduces the space over which a train is detected and you want to aim the beam diagonally across the track so that inter-car gaps are ignored.  Another approach is to use a stronger IR LED.  Yes, you can increase the current in the emitter LED but there are limits to how hard you can drive them.  

 

I've been showing 3mm IR LEDs.  Equally cheap are 5mm IR LEDs which is the size used in virtually all TV remote controls and IR illuminators for surveillance cameras.  In other words, there's been a lot of effort to make these 5mm IR LEDs as bright/efficient as possible. 

 

763802

So for fun, here's a video showing a 3mm and 5mm IR LED being driven at the same current (i.e., they are in-series).  Using the previously shown IR detector widget, note how at the same distance the red detector LED is brighter when aimed at the 5mm IR LED.  In fact, using a meter to measure actual detector current, the 5mm beam was over 2x stronger at the detector.  As to whether one has space on the layout to include and disguise larger or additional IR components is a consideration.

 

Edit: Youtube version of video: http://youtu.be/WcQKKKRfItA

 

And yes, I'm sure the isolated-rail block occupancy detector devotees are having a field day with this!

Attachments

Images (1)
  • 763802
Videos (1)
ogr 3mm vs 5mm ir led
Last edited by stan2004

And here's one way to add a time-delay as provided by most off-the-shelf ITADs.  This builds on the 25-cent time-delay modification to an eBay relay module shown earlier in this thread.  To recap, the idea was to push a button to activate an accessory via relay, but to have the relay stay closed for 5-10 seconds (or whatever) after releasing the button.  Pressing the button quickly charged a capacitor.  When the button is released, the capacitor slowly discharged holding the relay closed.  A transistor buffer reduced the capacitor discharge rate so that a reasonably-sized (and inexpensive) capacitor could be used. 

 

ogr dual beam itad with delay hookup

So the idea here is the replace the push-button with the IR detectors.  When both beams are detected (no train), the two IR photo-transistors are both "on" and point "A" in the diagram is held at ground.  If either IR beam is interrupted by a train, the capacitor charges up thru the 1N4003 diode and the relay module is triggered.  When the train is gone, the photo-transistors turn on again but because of the 1N4003 diode, the capacitor does not quickly discharge through the photo-transistors.  Rather the capacitors very slow discharge thru the transistor buffer so a reasonable time delay is effected with a relatively small capacitor.

 

 ogr ir dual trigger itad with delay

And here it is in action:

 

youtube version of video: https://youtu.be/1JR6prYd8yw

 

So if starting from the dual-beam IR circuit without delay, you need to assemble a handful of components that should cost about 50 cents on eBay:

 

2  10k 1/4W resistors - about 5 cents each

1  2N3904 NPN transistor - about 5 cents

1  1N4003 diode - about 5 cents

1  10uF/ 35V capacitor - about 10 cents

 

I tried to select readily-available generic parts.  Virtually any NPN general-purpose transistor will work.  Virtually any diode will work.  Adjust the capacitor value to change the time-delay (higher value in uF is a longer delay).  If you don't "do" eBay, DigiKey/Mouser have these components.

 

Note that this is a 5V DC circuit.  With slight modification in values, this can be implemented as a 12V DC circuit using a 12V DC eBay relay module.

Attachments

Images (2)
  • ogr ir dual trigger itad with delay
  • ogr dual beam itad with delay hookup
Videos (1)
ogr dual beam itad with delay

Dear Stan

 

This is really becoming a class in IR design thanks for the education in circuit design. A picture is worth a thousand words but your video on this subject very simple for the beginner to get the grasp of what you are saying. Thanks.

 

One quick question for the Professor. I understand the idea of increasing the IR signal from the 3MM to the 5 MM.  With the increase of the IR signal to the 5MM would interfere if had the same set up right next to it? IE if you had two loops next to each other and you had a RR crossing on each loop at the exact same place would the IR 5MM signal from one interfere with the other loops photo-transistor?

 

I think you have convert from the isolated-rail block occupancy detector camp.

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