Skip to main content

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

In this eBay photo, the flat edges of both devices seem to be on the inside.  Why not power up a working module and measure the the polarity of the DC voltage across each device.  Then note whether the flat edge is + or - for each device.

 

flat edge on 3mm

As cjack suggests, if you place the edge of the iron across the 2 blobs of solder on the back side then in, say, 5 seconds you should be able to gently pull the part out.

 

I suggest determining polarity using above method first.  There's always a chance that you damage a part during removal and determining polarity on a damaged part can be frustating. Note that the detector is actually a transistor and not a diode so the 2 pins on the black-lens phototransistor are referred to as collector/emitter (rather than anode/cathode).

 

s-l1600

 

Attachments

Images (2)
  • flat edge on 3mm
  • s-l1600

Module work is a great way to learn "hands on".  

I have only scanned this thread but its pretty neat Stan. 

 

 I have an idea that might be of use to some prototypically operating minded guys with long trains, or just for fun. A car, or axle counter.

  Even if you had 100 receivers at least one could be tapped to double as a counter too.

 I worked on a few machines that used two "screens" of receivers to track small flying objects. Though tracking was done with matrix logic, it used a few hundred little boards similar to this one. One of the many LED planes, counted too, by an added opto isolation circuit.

 Lenses, and reflectors can help focus an L.E.D. for greater distance, & greater accuracy. Covering the emitter(led) with shrink tube, like the receiver in the video had, can keep the emitter from effecting other receivers near it, that its not paired to.

  For easy custom beam focus, Id look at small flashlights & laser pointer lenses.

 

Ken,

 If you have had a fear of, or tendency to overheat things badly, put the board in a hobby vice along the edges, and with one hand, lightly hold each diode leg nearest the diode with a pair of stainless steel needle nose. Just touching is ok.

 The pliers will act as a heat sink to protect components, and solder wont stick to stainless. You can often heat both legs at once, and just flip it out.

 

 Do a few like this & once your used to it, you can pop them out quick.

 Don't blow at solder holes to clear them. Solder can spatter back at your face. Use "solder wick" or buy a "solder sucker"(pens are best) for when you have stubborn solder holes to clear. Adding more solder, then removing it again, is a trick for the really stubborn holes that wont clear.

 My "idiots method" is to heat holding a board, then quickly bang the heal of my hand on the bench, letting gravity do its thing. (that way I burn my hand with a bit of spatter instead of my lips, or eyes)    

 

 

Originally Posted by stan2004:

In this eBay photo, the flat edges of both devices seem to be on the inside.  Why not power up a working module and measure the the polarity of the DC voltage across each device.  Then note whether the flat edge is + or - for each device.

 

flat edge on 3mm

As cjack suggests, if you place the edge of the iron across the 2 blobs of solder on the back side then in, say, 5 seconds you should be able to gently pull the part out.

 

I suggest determining polarity using above method first.  There's always a chance that you damage a part during removal and determining polarity on a damaged part can be frustating. Note that the detector is actually a transistor and not a diode so the 2 pins on the black-lens phototransistor are referred to as collector/emitter (rather than anode/cathode).

 

s-l1600

 

Oh! Good advice about checking polarity on the flat side of the sensor I see. It looks like in that circuit the round side of the sensor is connected to the common (ground) side of the circuit. These sensors are sometimes photo transistors and sometimes diodes. Sometimes with three leads and sometimes two. I don't know all there is to know about them, obviously, except that if you shine light on a pn junction, current will flow thru the biased junction, or a voltage will develop across the junction. So the circuit can vary.

Probably just note where the flat side is connected and maintain that orientation in the rewired circuit.

Originally Posted by cjack:
Probably just note where the flat side is connected and maintain that orientation in the rewired circuit.

I like this idea. Then you don't need to worry about polarity. 

 

Some of these schematics provided with these eBay modules must be taken with a grain of silicon (salt), but here's one that appears to match the pictured sensor module. I annotated it to show + and - of the IR LED transmitter and NPN IR photo-transistor detector.  But this is just window dressing as just extending wires and maintaining orientation achieves the desired result. 

 

s-l1600

Attachments

Images (1)
  • s-l1600

Thanks to all of you. I did all of the above. The worst part was the unsoldering. I believe they (assemblers) bent the leads on the LEDs, so I spent a lot of time (and heat) removing them--couldn't keep the leads hot enough with the heat sink on them. I guess I was lucky since once re-wired (using your polarity suggestions), everything worked.

 

Now for Stan (and anyone else following this thread). After all the trouble I went through with the IR module having a LO trigger, and then Stan showing me how to make that work to turn the relay on when detection occurs, guess what--now that doesn't work.

 

Just a little tutorial for anyone interested. When the emitter/detector are side-by-side looking for a reflected signal, you need to modify the wiring to the relay as Stan explained above. However, when the emitter is pointed at the detector all the time, a LO trigger is what is required. The reason being is that when the detector senses IR from the emitter (which is all the time except when the beam is broken), you want the IR module output to be LO (so the relay is not energized all the time). Then when the beam is broken, the IR module output goes HI, and activates the relay until the beam is re-established. I hope all this wasn't too obvious, but not to me. So back to the soldering iron to go back to original connections--now that the burns have healed.

 

Ken

"Then when the beam is broken, the IR module output goes HI, and activates the relay until the beam is re-established. I hope all this wasn't too obvious,"

 

It's not "too" obvious. It's very common for a seasoned design EE to build a circuit like that and when it's working say "Oh...I need to change it so the relay is off...". ��

 

 You've emerged from the creatures den, with the scars of a victory worthy of knighthood. An educated champion. Bravo 

You did not "run away, run away", and you may say "Ni" now if you wish .

 

 You may actually like a hotter iron if you found yourself wanting to move faster than the heat did . (I even weld hot/fast)

 I use a "gun" & heat sinks often, I learned to move fast & "know" when to break heat with few failures really. It also just seems to me to be harder to heat damage things from this era really. And I can think of a few things I was forced to really "cave man it" with that survived to my amazement.

 

 

 

(And I forgot they often bend those into curves, and "twist-flip" is more like it. So just give me a popsicle stick, and point me at door #3, so I can play with the Kitty Kats

Very interesting discussion with lots of good information. Ever thought about why to use train detection of any type on a layout? In an article I wrote in 2008, I outlined six basic reasons for detection schemes and the benefits thereof.

1. Control panel location monitoring lights. No real operational advantage, but nice to watch and show visitors.

2. Accesory & signal activation. No need to cite reasons here. Probably the most widely used application of layout train detection.

3. Collision avoidance. Primarily useful at crossings where two trains might converge.

4. Derail prevention. Some track switches don't have this feature and it can be added with the approprite detection scheme.

5. Train control. The most complex application. With the proper schemes and circuits, you can have trains running themselves on the layout.

6. Hidden track visibilty. Actually a slight variation of reason 1. Keeps track of trains in areas of the layout where you can't see the trains.

Almost any form of detection if properly implemented will work to accomplish any of these layout functions.

Hi all.

 

Just another tidbit of info. I have ordered many different LEDs (from China via ebay) and have only found a couple that fit in my 022 switches. Most are either too fat or sit too high so that the red/green cap doesn't fit. Most recently I found some very inexpensive LEDs that fit perfectly and have 7 emitters (so the coverage is great to shine thru the red/green lens'. The one's I have are bayonet style and require 12VDC. As I wrote earlier, you can remove the wire attached to the constant voltage terminal that goes to the light bulb socket and power the LED via that wire. I have sent them a message asking whether they have the exact same style in a screw type base ()which I will need also). The AC LEDs are great but way too expensive if you need 50 of them.

 

The ebay link to these LEDs is:

 

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

 

Ken

Originally Posted by ken's trains:
The ebay link to these LEDs is:

 

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

 

Ken

One little problem.

 

0 available / 23 sold

 

Here's one that's a bit more expensive, but they're available.

 

http://www.ebay.com/itm/10X-Wh...6587b18f&vxp=mtr

 

And here's an even better deal.

 

http://www.ebay.com/itm/10PCS-...9afa12e0&vxp=mtr

 

 

Last edited by gunrunnerjohn

Hi John,

 

I am sorry, I didn't realize I had cleaned out their entire inventory.

 

As to the others you have listed. If you have them and they fit--good. I checked the length on the last listing you provided, and it's 30MM which is 1.81 inches. That may or may not fit, depending on the height of the LED stack and the location of the bayonet tabs on the body (affects how deep the LED sits when mounted. I found some great ones that were only 1 inch in length, but the LED body stuck up so high that the cap did not fit all the way down.

 

Ken

Originally Posted by ken's trains:

By the way, I have about 25 of that style LED. Problem was, when I ordered them, they didn't provide the dimensions,  I guessed at what the part no.s meant, and I got the next size up. They might fit lamps in my car, but not for my railroad.

 

Anyone have a use, let me know.

 

Ken

What about making yard lights? Use in a caboose, or behind frosted passenger glass?`

John, that's what I have been doing which is why I have soooooo many.

 

And Adriatic, those are good suggestions, but these LEDs are very big. They are replacements for car lamps and the ones I bought have 2 bottom terminals (probably for turn signals or brake lights).

 

And one more for Stan. My across the track IR detector works fine. I remember you explaining to me the use of an electrolytic cap in the trigger circuit. I bought 10 100uf/50v cap's some time ago, but I don't know which lead goes to +. One lead is longer than the other and the short lead has a gray stripe with a little black rectangle in the stripe. Also, if I want to increase capacitance, can I do that by putting them in parallel or series, and can I reduce capacitance by the reverse?

Last edited by ken's trains

Add Reply

Post

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

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