Skip to main content

Replies sorted oldest to newest

Hi Ken, I just bought Azatrax detector Kit, it came with:

1 Detector, dual, turnout

1 Latching relay DPDT 12vac or dc

1Power supply 12vdc

 

Looks like it should work great for what I need it for. I also included 2 Dwarf signals O 2-led . all for $91.50 That was with shipping. Came in 2 days!

It comes down to whether working at the component-level is part of the fun of the hobby to you.  The Lionel 153IR or the MTH ITAD run in the $30-40 range.  They work, it's a name brand you can trust, it's plug-and-play, etc, etc.. 

 

But if you like fiddling with electronics and maybe want to learn a bit about IR techniques and such, then you can cobble together the functionality of a 153IR/ITAD for less than $5.  And by learning about what's going on under-the-hood, you can experiment and then make modifications or variations to the basic circuitry to provide additional functionality not provided by anything you can buy off-the-shelf.  Plus, there are enough people here on OGR that know enough about the nuts-and-volts of these things to make it practical.

Hi Stan,

 

Yes, as a retired EE, I like to fiddle. But I was not in design and it's been forever since I took a course in transistor electronics.

 

So, any help would be much appreciated. If someone could provide a basic schematic with component values, I will give it a try. Mostly want to detect train passing to operate gates, signals, etc..

 

Thanks for any help.

 

P.S.: I looked at the schematics at some of the sites provided and they have me somewhat started. I just know nothing about what to order for an IR emitter or detector.

Last edited by ken's trains
Originally Posted by ken's trains:
P.S.: I looked at the schematics at some of the sites provided and they have me somewhat started. I just know nothing about what to order for an IR emitter or detector.

Yes.  One downside of DIY projects based on web content is out-dated information especially with electronic components.  In the link mentioned above for example, he says,

 

"The DigiKey part numbers for suitable phototransistors are 365-1066-ND and PNA1801LS-ND."

 

Well, the first number is valid and looks fairly priced, but the 2nd part number is obsolete.

 

http://www.digikey.com/product...mp;keywords=365-1066

 

I make the "fairly priced" comment because hobbyists often use whatever part they have lying around, and then write it up with no regard to how easy/hard it is to buy that part.  An unsuspecting reader trying to replicate the exact parts list doesn't realize it is an obscure or obsolete part with an unreasonable price.

 

So if getting started with this IR stuff, I suppose it's not obvious that you probably want to start with an emitter (LED) that has similar packaging.  So on the DigiKey site you would search for "3mm Infrared LED".  Then you want the Infrared color (wavelength) to match the phototransistor so it's definitely not obvious that you want to choose 940nM.  And you might come up with:

 

http://www.digikey.com/product.../754-1600-ND/2769807

 

If ordering from DigiKey (I recommend them) or anywhere for that matter, obviously gather up a parts list to consolidate shipping.

 

An intermediate step between component-level DIY assembly and simply buying from Azatrax or whomever is something you don't see written about a lot (yet).  That's using low-cost electronic "modules" from Asian suppliers off eBay.  For example, in a recent thread I suggested one way to cobble together an IR detection system using eBay modules.  See the photo in this thread:

 

https://ogrforum.ogaugerr.com/topic/lionel-153ir

 

There's an IR module with an emitter and detector already installed for not much money.  I think it's safe to assume they matched the LED and phototransistor type.

 

And if you're willing to use low-cost Asia eBay sellers and live with waiting a couple weeks for stuff, you can find IR LED/phototransistor pairs attractively priced.  For example, here's 10 pairs for $2.99 (free shipping). 

 

http://www.ebay.com/itm/200981...e=STRK%3AMEBIDX%3AIT

 

Note that the one nice thing about DigiKey is their parts have datasheet links so you can get detailed technical info. 

 

 

Stan,

 

The links to DigiKey and your previous posts on the Asian products were great. I've ordered a bunch of the stuff from them (LED/sensor, power supply, volt reg, relay module). I ordered enough to make a lot of mistakes, so I will give it a try when they arrive in the next decade (kinda slow on shipping--must be by boat). This works just fine 'cause I'm currently letting my Homasote sheets air out in the garage. Great stuff, but a little stinky. I have many, many operating accessories (log, coal, culvert, etc.) that I want to put in a yard config. That will take up a lot of time figuring spacing, switch location, etc.

 

I have been wanting to do this for 30 yrs. Waited for my wife to retire to help with scenery design, but she passed away several years ago. So, put on hold again, and now I'm well into it. I joined a model railroad club several months ago, but they haven't been much help for layout design/electronic things.

 

Can't thank you enough for the help. And will probably get back to you when electronics arrives.

 

By the way, just a side non-related question for anyone 'listening'. I am putting the Homasote on top of plywood and then want to put cork roadbed under the track. I bought some straight cork roadbed, put what do all of you buy/use for the curved track.

 

Ken

Sorry to hear about your wife Ken, my condolences.

 

As far as curved cork, you use the straight stuff, you just curve it.  Also, when you're laying cork, stagger the two sides so the butt seams don't fall together.  You can pin it down in position while you wait for glue to dry.  I just run a bead of white glue along the outside edge, this allows you to reuse the cork if you decide you want to change some of the track.  Once the glue dries, you can remove the pins.

I'm thinking of the Midwest Products cork roadbed, it has tapered sides and is already split in half.  When you get it, you have to just pull the two halves apart, as the tapered cut is inside when shipped.

 

No "trick" to making the curves, you just lay it on the table and bend it into the proper shape.  It doesn't split.  Having the roadbed in two pieces makes it more flexible.

 

Here's what it looks like when it's split and the tapered sides are on the outside.

 

As an added note: IR sensors work fine for train detection and I have a large number of these in my layout. Another form of detection to consider is magnetic. A reed relay under the track or placed along side the track with a small magnet placed on the loco or a car will also work and doesn't have that ambient light issue. I've used this form also and it is virtually flawless.

Hi all. Back from the flu--great way to spend the holidays.

 

Well I have now received all of the parts from Stan's pictorial schematic referenced in the above post. I connected everything together with the exception of the relay. I tried out the detection circuit to that point monitoring the output of the IR Module and it works. I have not separated the emitter and sensor (to sit across the track from each other) yet, but first a question for Stan. I could drag out my old EE books(and probably still not get it right), but instead could you tell me where to put the capacitor in the relay circuit to provide a time delay for the relay opening. By the way, I did buy the parts from an Asian company, and although some of the deliveries took a while, the prices are great and everything seems to work.

 

Once I get it all together and working, I will take some pics and provide more detailed info on parts, suppliers, and connections for anyone else interested.

 

Again, Stan, thank you so much for steering me in the right direction, and for all of your help.

 

Ken

 

 

The flash rate is determined by the capacitors and the current rating of the bulbs.  You can change it by changing either parameter.

 

A 555 would work fine as well, but if you want incandescent bulbs, I'd be thinking of driver transistors for the bulbs.  Lots of examples on the web, here's one: http://modeltrainadvisors.com/...ing-ledprojects.html

 

thanks John , i have a wole book of just 555 timer circuits and there applications.

Boy isn't it amazing how useful the internet is i  finding anything! so whats up for the weekend? Want to come up sometime and see your guys layout!

 

Alan

Thanks for the boards, going to experiment and make my own test rig, i have spare motors and connector harnesses i found to power up the boards weather it be 5 volt board or 3 volt boards!

 

Originally Posted by ken's trains:
 I could drag out my old EE books(and probably still not get it right), but instead could you tell me where to put the capacitor in the relay circuit to provide a time delay for the relay opening.

Unfortunately there's no simple answer as it depends on which relay module you have.  The basic concept is the capacitor is charged quickly when the trigger signal is present...and then the capacitor slowly discharges holding the relay closed when the trigger signal is absent.  That's nothing new or profound.  What's new is these $1 eBay modules have a transistor driver so the current it takes to drive the relay is, say, 50 times less than if you drive the coil directly.  That means for the same capacitor you can hold the relay that much longer.  Without the transistor you'd see holding capacitors in the thousands or tens of thousands of microfarads to achieve a few seconds of hold time.  These capacitors were bulky and expensive.

 

So by have a DC power supply available to power the modules, the control signals to activate the relays in these eBay modules are now, say, 1 milliamp or even less rather than the tens of milliamps to directly drive relay coils.  This is techno-babble to the non-enthusiast but that's what's going on.

 

 

Originally Posted by ken's trains:
... have you come up with a circuit that will operate the 2-light flashing RR crossing signal.

I've got to believe there are many companies that sell circuits to drive a crossing flasher.  And GRJ gave some links to circuits if you want to build from the component level.  That said, here's one alternative not so much as a recommendation but as a way to approach the problem using these insanely priced eBay module.  A timer module (about $1.50 free shipping) generates a slow speed pulse signal.  The pulse drives a relay module (about $1 free shipping) that has an SPDT style relay.  The relay has 10 Amp contacts so obviously overkill but 1-2-3-done. 

 

ogr corssing flasher lego style

Attachments

Images (1)
  • ogr corssing flasher lego style
Videos (1)
ogr crossing flasher lego style

WOW,

 

Stan & John you are the best. I will give all of your suggestions and references a thorough review and let you know what approach I will try and the result. Stan, I did buy the Asian relay modules and a pack of various size caps so I can experiment.

 

Unfortunately today the love of my life (my dog) got very sick and I have spent the day at the vet and the evening caring for her.

 

Thanks much for all of your help.

 

Ken

Hi Stan,

 

I have the relay module you had shown in your picture schematic (the one from the Asian comp). Problem is that looking at the schematic that's shown on ebay for that module, I can't figure where to put the cap. I can't determine if it should go on the 'trigger' side or the 'relay closure' side. And the optical isolation has me a lot lost. My 2 concerns are:

 - If I put the cap across the wrong terminals (with no resistance to limit the current--cap is a short at switch closure), I could burn something up

 - Once I know where to put the cap, does it have to be electrolytic (been a long time since I did this stuff and don't remember if discharge direction is critical--isn't that why you use/don't use electrolytics--boy I've forgotten more than I ever learned)

 

Thanks,

 

Ken

I assume you are referring to the 5V relay module?  I don't have one but the one I linked to in the other thread shows the following schematic.  Unfortunately with many of these low-cost eBay modules some detective work is needed.  For example, can you look at the board and confirm that R4 is indeed the missing part shown in the photo below?  You should be able to visually trace the printed wires which are kind of fuzzy in the photo so I can't tell.

 

ogr ebay relay module missing resistor

Anyway, the idea is a capacitor in the polarity indicated gets charged by the external triggering source.  For experimentation purposes don't worry about the short-circuit from a pushbutton switch to charge up the capacitor.  As discussed earlier the concept is the capacitor discharges into the ISO1 optoisolator input.  The ISO1 output drives the relay transistor Q1 which provides current gain so that rather than requiring 100 mA (or so) to drive the coil, the control input only needs to provide a milliamp or so of current.  If experimenting you should be able to see LED D1 on bright when the control input is present, then as the control input is removed and the capacitor decays, D1 too will decay in brightness and at some point the relay will release.

 

The "fun" comes in when you fiddle with the circuit.  To extend the hold time, of course you can always add capacitance but that's the brute force method.  The input is such that you can really apply 12V (DC) if you have that present.  That means the capacitor charges up higher and will take longer to decay...adding hold time for the same capacitance.  Or you can add a resistor (say, 1K) between the capacitor and the module input to slow the discharge while still providing sufficent current to drive ISO1.  Or you can add a 10 cent transistor to increase the impedance that the capacitor sees thereby discharging even more slowly.  Or you can find a soild-state time-delay module on eBay to perform the delay digitally.  And so on.  Again, all this is for the DIY hobbyist who likes to tinker at the component level to keep the gray cells active in retirement .

 

Oh, and the wiring diagram is incorrect on the eBay listing I looked at.  "VCC" should go to the positive supply.

 

ogr ebay relay module wiring diagram wrong

 

But let me second-guess something.  One reason a time-delay is needed in signaling and crossing circuits is to insure the train passes thru the controlled area before the signal switches color or the gates go up.  But as we know, if a train passes an ITAD and simply stop right after, the timer will time out and the signal or crossing gates will change incorrectly after the time delay.  So the solution (in some cases) is to use two ITADs wired "in parallel" and require the train length to be long enough to straddle the two ITADs.  If this is done then no delay is required for the signal/crossing circuit to operate "properly".

 

So another part of the fun when you fiddle with these IR components is to observe that IR detectors (phototransistors) can be wired in series or parallel to perform basic logic functions such as "AND" and "OR".  For example, if you put two photodetectors in parallel, then if IR energy hits EITHER detector then current flows and the eBay module trips.  OTOH if you put two photodetectors in series, then as long as IR energy hits BOTH detectors then the module trips...but if either detector is blocked then the module releases.  Obviously you'd choose the right "logic" depending on whether you are using a reflective (as most ITADs do) or transmissive (across the track) detection scheme.   The point is this kind of fiddling can eliminate the need for a time-delay in the first place...and/or can save even more money as just adding a few 10 cent IR emitters and detectors can replace multiple ITAD/153IR devices!

 

Attachments

Images (2)
  • ogr ebay relay module wiring diagram wrong
  • ogr ebay relay module missing resistor
Originally Posted by ENichter:

I tried to find these on ebay but must be searching wrong? do you have a link or part number to help me find it?

Hmm.  The eBay timer module shown in the photo is one which I had to modify because they manufactured it incorrectly (subject of another thread but it's another story).  You can find timer modules on eBay using search phrases like "NE555 module".  I'm reluctant to post a link because that's what I did for the posted timer module and I felt bad that another forumite ordered it so I modified them for him (amazing since thousands have been sold according to eBay, they don't work as advertised, and they're still for sale from several sellers!).  I don't know what you're doing but obviously look for one that has a timing/frequency range that fits your needs.

 

The relay modules can be found with search phrases like "arduino relay module".  Again, it depends on what you're doing but these relay modules with 1,2,4,8,16, etc. on one board and you can get the cost/relay down below $1 with the multiple relays.

 

My intent was to discuss these insanely priced modules on eBay which allow a kind-of Lego style building block assembly of electronic functionality for O-gauge layouts.  If your intent was for crossing flashers, for a bit more money (but still what I call insanely priced) I hooked up the following $8 eBay timer module to implement the same crossing flasher functionality but this takes only one module so less wiring.  I can recommend this one as it was discussed in another thread and some other guys have actually used it too.  It allows amazing digital precision of timing functionality such as have the crossing lights alternate at exactly 0.99 seconds instead of 1.00 seconds (if that's what you want!).

 

http://www.ebay.com/itm/12V-DC...;hash=item19f7d39aba

 

 

ogr ebay cycle timer module as crossing flasher

Attachments

Images (1)
  • ogr ebay cycle timer module as crossing flasher
Videos (1)
ogr ebay cycle timer module as crossing flasher

Stan,

 

My module appears to be the one shown in your picture, but I could not visually verify the missing resistor due to the 4-pin chip covering the trace from the IN pin. I did however verify that IN goes to the spot you highlighted using my ohmmeter. So does that mean the 1K resistor is not necessary? The trace under the black chip also goes to a pin on the black chip (ID on the chip is FL 817C, F409--would that be the opto-isolator device?). Based on your suggestions, I will try different value caps on IN-Grd and see what happens. And yes I did buy an AC/DC Power Supply (for train application) so I can also play with VCC and the trigger voltage.

 

Again, can't thank you enough. I will let you know how it goes.

 

Ken

The resistor R4 (1K) is definitely not necessary and actually defeats the purpose of the optoisolator ISO1...but that's another story.  I've come to be suspicious of these eBay listings and you get useless (IMO) replies if you ask many eBay sellers anything technical.

 

Again, I don't have your particular module in front of me (I ordered one but who knows when it will get here!).  So I hooked up an eBay 12V relay module I have with a similar input circuit (uses the same 817 optoisolator chip).  The video below shows the basic function with a pushbutton providing the input.  The relay instantly turns on/off (watch the red LED on the relay module) following the pushbutton.

 

Then I put a 100uF capacitor between IN1 and ground.  It creates a delay of a few seconds. Then I put a simple transistor buffer using a 2N3904 NPN transistor and a 10K resistor as shown in the following schematic.  If you're dusting off your EE textbook this is a basic emitter-follower transistor buffer.  Now, the load on the capacitor is so small that a original 100uF capacitor created a a ridiculously long delay (several minutes).  So I used a 10uF capacitor and got a delay of about 30 seconds which is still probably too much for any practical signal/crossing-gate time delay but you get the idea.

 

The 2N3904 is possibly the most common transistor ever made, produced by the gazillions and available for about 2 cents on eBay.  The point is you don't have to thin your wallet if this kind of tinkering is what makes the hobby fun for you.

 

ogr relay module with input npn buffer cap

ogr ebay relay module npn buffer

 

Attachments

Images (2)
  • ogr relay module with input npn buffer cap
  • ogr ebay relay module npn buffer
Videos (1)
ogr capacitor delay ebay relay module

Stan,

 

Thank you, that helps. By the way, I took a course in Transistor electronics in 1963 and didn't do well then---so this may be wasted on me. I understand in principle, but all the EE courses were theory and not of much design/practical use. One example is me pulling out my Basic Electric Circuit Theory book from 1962 wherein I read that the instantaneous response to a switch closure in a DC capacitive circuit is a short circuit followed by a current decay to zero followed by a lot of math. That was my concern with no resistance in the circuit to ground. But on further reading, my book explained the examples to be ideal conditions vs. real world (i.e. no resistance in the circuit).

 

Oh well, too many years and I never used much of it in my career, That is why your help is sooooo much appreciated. I have a bunch of cap's and will play.

 

By the way, I cannot play any of your videos. They are in an ".swf" format not recognized by the several players I have nor by my video conversion program????

 

Ken

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.

3mm and 5mm IR LEDs with the round-top have narrow-beam lenses.  The best way to think of it is like ice-cream waffle cone.  So if the detector (D) is within the zone, everything works fine.  When shooting a beam across a track you send it diagonally rather than straight across.  So there are many placement options that allow beams to co-exist on parallel tracks or near each other.  Two are shown below.  A stronger beam, whether it be from a 3mm IR LED driven at higher current or from a 5mm IR LED simply makes a bigger ice-cream cone... crudely shown in green below.

 

ogr narrow beam IR LED

Remember we're talking basic IR occupancy detection.  It's like peeling layers of an onion, there are more tricks and techniques as you dig deeper. 

 

I'm simply suggesting that to get started, you don't have to break the bank.  If DIY tinkering with electronic modules and components is what makes the hobby fun/interesting to you, then for $5 to $10 you can make a bi-directional IR block occupancy detector with signal crossing flashers.

Attachments

Images (1)
  • ogr narrow beam IR LED

Dear Stan

 

Thank you for the explanation.  Colombo time: The heat shrink tubing you over the IR how much does it concentrate the beam to the receiving IR? I have eight loops on one layout that I am planning on building and some will have IR and some will not. I have some parts in house already and balance of the parts on order and are coming from Asia. As soon as I get the part and have some time I will assemble and I sure that I will have more question for you once I get started. I believe that your method is actually cheaper than the isolated track method. Here is my math please feel free to correct me. IE Fastrack isolated track about US$11.00 each you need two. (Yes I know you can cut the rail with a Dermal 5 inch Fastrack US$4-5 each again you still need two) Stan IR special cost about US8.00 if not cheaper per crossing. This is still best DIY project based on price I have seen.

Originally Posted by nvocc5:

The heat shrink tubing you over the IR how much does it concentrate the beam to the receiving IR?

Hi Kris,

 

Perhaps semantic gymnastics, but the heat shrink tubing does nothing to concentrate the beam.  The purpose is to ignore extraneous or ambient IR energy coming from the sides of the detector...such as from outside sunlight, overhead room lighting, or incandescent engine headlight or passenger car lighting.  Think of it as looking through a cardboard tube, you don't magnify (concentrate) what you're seeing but you ignore the peripheral activity.  Electrically speaking, this makes a more reliable digital detector since it provides more separation in photo-transistor current between the illuminated on-state and the blocked off-state.  In other words with digital on-off circuitry you want to maximize "black-and-white" and minimize in-between "gray-areas".

 

I see you're catching on to this stuff because that's the correct Columbo question!  That is, in addition to messing with the LED output, another option for increasing operating beam distance is to fiddle with the detector.  In terms of "concentration" the simplest is to capture a greater cross-section of the beam.  A 3mm LED obviously only "sees" a 3mm diameter cross-section of the beam.  You could put a lens that is, say, 1cm in front that focuses a 1cm diameter cross-section down to 3mm but I'd suggest that's impractical for a train layout. 

 

As you might suspect you could use a 5mm diameter IR photo-transistor which captures almost 3 times (i.e., 5/3 squared = 2.8 times) the cross-section of a 3mm photo-transistor.  Same price on eBay...about 20 cents each in small quantity.  But even with a 5mm IR photo-transistor you still should use a heat-shrink sleeve to keep the photo-transistor looking just at the LED beam.

 

Dear Stan

 

Thanks, so the heat shrink is to "filter out" any stray IR that might trigger or not trigger the circuit.  I understand this was the problem with the earlier design that from the major brands that produced them.  A simple solution to a to simple circuit and it works and is low cost, nice. Love the 9 V battery solution as well, as soon as I get the part I will build it and let you know the outcome. As soon I read you article about in regards to 5mm, I went out to E bay and purchased them and I am waiting for them to arrive as well.

Originally Posted by nvocc5:

Love the 9 V battery solution as well, as soon as I get the part I will build it and let you know the outcome.

Here's another tip I forgot to mention.  Perhaps common knowledge but you can dis-assemble some 9V batteries and recover the unique 2-contact 9V battery connector as shown in the above photo.  Google "disassemble 9V battery"; most people do this to get the 6 1.5V AAAA (yes, quadruple A) batteries but I do this with used batteries to get the clip to make 9V-powered widgets like this.

 

 

Those eBay 11 cent connectors that GRJ found are quite the price! 

 

For DIY electronic tinkering, I've found a 9V battery makes a convenient power source for simple measurement or signal generator circuits.  I've found the wireless style of 9V connectors can be handy when building hand-held "probe" widgits that uses the heft of the battery...rather than a dangling circuit  But these wireless (aka PCB-mount) connectors are harder to find and over $1 at DigiKey - rarely find them cheap on eBay.  Hence I find it worth the effort to recycle them from a spent 9V battery.  Here are some 9V test circuits scattered about the bench showing different styles of 9V connectors.

 

ogr 9v battery holder options

Attachments

Images (1)
  • ogr 9v battery holder options

This one is for Stan.

 

I have been playing with the LED replacement lights and finally gotten back to the IR detector that you so kindly outlined for me. I have all of the components (bridge rectifier, DC-DC pwr supply, IR detector module, & 5v relay module) you suggested. I have been playing with limited success. I couldn't get the relay module to trigger properly because the sensitivity of the IR module couldn't be throttled down. With further investigation I discovered that the output of the IR module 'trigger' was 5v (or whatever VCC was set at) when there was NO detection. When detection occurred, the output went to almost zero. I had connected the IR module 'out' to the relay module 'in', and I believe that it impacted the IR module function. Once I removed IR 'out' from the relay 'in', the IR module sensitivity was easily adjusted. Soooooooooo, how do I connect the IR module to the relay module. I checked the relay module jumpered pins labeled COM & GRN, and they are not connected to the GRD pin next to the VCC pin. I am afraid to connect the IR 'out' to the relay COM & GRD, but that seems like my only option.

Please help.

 

Ken

Stan, I don't know how you do it. I tried every possible combination of + & - VCC and trigger (of course except the one that worked). Other than 4th degree burns from grabbing the wrong end of my soldering iron (strong glasses were on), and big holes in the wall from throwing modules out of frustration (just kidding), things are going well. It works just fine now with the correct connections. Now to apply it to an accessory and then to separate the emitter and sensor to go across track. I'll stay in touch as soon as my burns heal--I'm currently typing with my nose (a little more humor--but I do have blisters--it's a ***** getting--I mean being, old).

 

Again, I can't thank you enough for your endless help and patience.

 

Ken

Originally Posted by nvocc5:

Quick question to expand my knowledge what application is the "active Hi" mode used for ?

That's a deep question with a combination of historical, by-convention, and technical roots. I'll give a politicians weasel answer by saying that the "active Hi" mode is used when you want to trigger/activate something using a hi level signal rather than a low level signal. Both methods are used in electronic applications.  Next question.

 

Originally Posted by ken's trains:

I tried every possible combination of + & - VCC and trigger (of course except the one that worked).

As you saw for yourself with the timer module, the instructions (if any are provided) can be incomprehensible. 

Hi Stan,

 

Well everything works with respect to the IR detection circuit you provided along with how to deal with the lo trigger situation. But, as you mentioned way earlier, using the IR module with the emitter & sensor side-by-side doesn't work very well. So, I am ready to separate them from the module.

 

My question has to do with removal. I have a low wattage soldering iron and a heat sink from RS. I would like to unsolder the 2 LED devices so I can put them across track as you have shown. What is the likelihood that I will damage the LEDs by using a soldering iron to remove and re-attach (to extension wiring)?

 

Also, when you remove them, there doesn't seem to be a clear designation of anode/cathode---so do you just mark them before removal. I know this sounds silly, but there is not a lot of space on the module board or on the LED(s) to mark. I guess once removed, I guess I could just pre-wire each end with a color code, and then add extensions as necessary, but if I drop an LED unmarked while attaching wires, game over. Just looking for your thoughts.

 

Ken

Last edited by ken's trains

I get that Clack, what I'm not sure of is how the sensor LED is connected. Is it the same as for the emitter LED (i.e., + to anode & - to cathode; where the + lead on my ohmmeter goes to the anode)? And do I have that connection correct? Also, should I see a positive voltage on the anode (to cathode) output (on the module) for both?

 

If all that is true, then I can make certain I have the correct connections with just my multi-meter. How about the heat from soldering iron damaging the LEDs?

 

Thanks for your suggestion.

 

Ken

In the case of that emitter-sensor module, I think that is the one you are going to remove the emitter and sensor from, both the emitter and sensor have a flat spot on the their base. The flat spot is the "cathode" and it goes to the negative side of the voltage. They, both flat sides, go to common on the little board. I don't think you can go wrong or need to mark anything.

Here's a picture of an emitter diode...I can't find a clear picture of the sensor, but the base of it is flat on one side just like this emitter.

OED-EL-1L2

Attachments

Images (1)
  • OED-EL-1L2

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