Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Inexpensive infrared train detector two circuits

45346 views
32 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Thursday, April 23, 2015 9:53 AM

Hey Bob

I printed that out no problem

I'm still working on you simple circuit

Can't get it to work with the lights farther away then 8 inches

But it works

Ted

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Tuesday, April 7, 2015 5:05 PM
File: IR_Box_Circuit.pdf       Link: http://1drv.ms/1CuZh9s

Bob Frey’s IR Cover Box Circuit.    Was anyone able to print this Link?

A simple IR beam to over 3 feet.
 
 
 
 

Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Friday, April 3, 2015 9:10 PM
                                          Bob Frey’s IR Cover Box Circuit   
In this IR Cover Box project the 3MM IR DARK (940NM) photo Transistor is covered with a 0.15” black wide shield to form a 0.120” dia. viewing area.  In the past a shrink tube with a 0.062” dia. viewing area was used. By putting two IR (940NM) in series, this increases the amount of light that can be detected to 3 feet.  This IR Cover Box can be printed on card stock, or a 3 x 5 picture with 1”= 1” when printed.    Link: http://1drv.ms/1CuZ9a4
 

  • 754-1600-ND      EMITTER IR 3MM 940NM CLEAR (50 ma)   $1.87/10 (Em)
  • 160-1030-ND      PHOTOTRAN NPN 3MM IR DARK 940NM   $2.70/10 (PT)
  •  
  • KSP13BU-ND      TRANS NPN DARL 30V 0.5A To-92              $2.74/10 (T1)
  • PN2222AFS-ND   TRANS NPN 40V 1A TO-92 CASE               $1.99/10 (T2)
  • 10KQBK-ND         RES 10K OHM 1/4W 5% AXIAL                   $0.61/10 (R1)
  • 100KQBK-ND       RES 100K OHM 1/4W 5% AXIL                    $0.61/10 (R2)
  • 680QBK-ND         RES 680 OHM 1/4W 5% AXIL                       $1.22/10 (R3)
  • 3.3KQBK-ND        RES 3.3K OHM 1/4W 5% AXIAL                   $0.61/10 (R4)
  • 220H-ND               RES 220 OHM 1/2W 5% AXIAL                    $0.85/10 R5)
  • P14482-ND           CAP ALUM 10UF 16V 20% RADIAL             $2.20/10 (C1)
  • 1080-1122-ND       LED SS HI EFF RED DIFFUSED 3MM         $2.84/10 LED
  • 1N148DICT-ND     DIODE SWITCHING 75V 0.15A DO35            $1.06/10 (D1)
  • 277-1667-ND        TERM BLOCK PCB 2POS 5.0MM GREEN     $3.52/1  (TB)
  • 3405K-ND              BREADBOARD 1/16"DIA 2.00X4.50"            $5.65/1  (BB)

 

 

 

  Two IR EMITERS in series produce a stronger IR beam with the same dc current
 
 
 

 

   Two IR EMITERS in series Cover Box
 
 
904-299       Walters GOO -- 1oz 29.lmL, all-purpose adhesive. (Holds the folded cardstock and roof of the Cover Box.)
Search: 189-5934         US-Style Crossing Signal         Set includes two crossing signals and flashing control unit.
 

The two EMITTERS IR cover Box and the Photo Transistor cover Box can be up to 3 feet away.  The IR light is weak at 3 feet, but the LED still turns on when the beam is broken.  The beam can be found by moving a pencil up and down.  With the 0.062 brass tube in a drilled hole, both ends can be rotated, and moved up and down to find the flat cars, so that either car can stop our IR beam of light.

If the Train room has a large amount of IR light, then this simple circuit will not work when the weak IR beam is interrupted.  Sensitivity to an ambient IR light problem can be adjusted by moving closer (stronger IR is interrupted) and changing (R2) to:  100K@3’, 68K@2’, 33K@1.5’, 10k@1’ or 4.7K@0.5’ 

http://home.cogeco.ca/~rpaisley4/IrProximity.html

Proximity Detector using the Vishay Electronics - TSOP4830 Infrared.  This IR receiver is used as a sensitive detector that does not require shielding from room lighting. The IR detector will work under almost any lighting condition from complete darkness to full sunlight.

Note: The upper portion of the circuit uses two astable 556 oscillators.  The lower portion of the circuit is the IR detector, time delay and output section.  ROB PAISLEY shows the basic Infrared - Proximity Detector Circuit and Parts.

TSOP4830-ND PH.MODULE 30KHZ S.VIEW (940NM)   $1.33/1 (Receiver)
754-1600-ND   EMITTER IR 3MM 940NM CLEAR 50ma $0.52/2 (Emitter)

CF12JT180RCT-ND RES 180 OHM 1/2W 5% CARBON FILM  $0.14/1 (R5)

Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Wednesday, April 1, 2015 10:48 PM

Ted:

Sorry I didn't get back to you sooner. IR receivers are often black so the ones they sent you should be ok.

If you don't have the shrink tube installed then the circuit will suffer from too much extranious light and will not work properly.

Without adding in more components to allow you to adjust the sensitivity, the only variable is the shrink tubing. You could do a series of tests by starting with a longer piece of tubing over the receiver and then gradually shortening it a bit at a time to see what changes occur.

Something that I did to test the detectors was to set up a short piece of track on some 2" pink foam insulation, including cork roadbed. That allowed me to mount the detectors in a controlled environment to see how they worked. I did have trouble initially with light coming from my workbench but when I turned off the center light that was shining directly into the receiver tube things worked ok. There are two other lights over the workbench, and all three are within three feet of each other. The center one is halogen and the other two are CFLs.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Tuesday, March 31, 2015 1:01 PM
Hello Thank you David for the reply I do not have the shrinkwrap install but did buy it as per parts list Good tip on the drill bit use ! My circuit 2 is not working with room lights (i changed the bulb in my workbench light) it needs a bulb almost touching it All my room lights are fluorescent (was my first problem) I have bought all the parts to change over to a track light system and hope to use dimmable leds. Is there a way to adjust the sensitivity ? Are the IR collectors used black in color? Making sure I was sent the right ones Ted
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, March 28, 2015 2:45 AM

Ted

I think the trick to circuit 1 is to try to prevent any direct room light from getting to the receiver. That's where the heat shrink tubing is crucial. If the receiver can 'see' any of the room lighting fixtures then it will trigger the sensor. I use a 1/16" drill shank to control the size of the opening in the heat shrink tubing. Put the tubing over the LED, then put the drill shank into the top of the tube so that it rests on the top of the LED, then apply the heat. You want to form a 'tube' with a 1/16" inside diameter about 1/8" long above the receiver. That gives a very narrow 'viewing angle' so the receiver can only 'see' what is directly above it. When a car passes over there is plenty of IR light to bounce off the bottom of the car and into the receiver, but the narrow angle will hopefully cut out direct light from the ceiling fixtures. Placement of the ceiling fixtures is obviously an issue. If they can shine directly down the tube then they will trigger the sensor. Please remember that I described the sensor as being "basic", as in "very".

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Friday, March 27, 2015 8:10 AM
up date on my attempts : Built circuit 2. works and lights the led when in room and off when shadowed Built circuit 1. led on all the time and gets brighter when in room light or with IR emitter Going to try this one again tonight Tried to post pictures but do not understand how Happy so far got circuit 2 to work. Will just have to change indicator led to green to show clear track. For now Ted
  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Monday, March 23, 2015 12:28 PM
Robert Thank you Yes i will be trying again on both circuits 1 and 2 I will report back later this week Had to take a break from this project Still very interested in making this work
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Thursday, March 19, 2015 4:37 PM

Very interesting comments Ted.  Since you ordered parts from my new list, try building both Circuit 1 and 2. Could you give us a report on how you did in about 1 week?

Circuit 2 is 940NM IR light bouncing off the bottom of the car. Notice that the IR Photo transistor has a heat shrink cover?  About a 1/16” dia. hole is in the front.   This is like you are in a well looking for the moon. When it is over head, you see it. Say +/- 15 degrees off center you don’t.  Now 10u Amp of reflected IR light will produce 1 Volt DC at the 100K, then the Darlington will give 10 m Amp of current to the Red LED. (Your Lamp, incandescent bulbs and day light all have 940NM IR light, then the Red LED may never turn off.)

Circuit 1 is the lost of light.  The IR Photo transistor does not need a heat shrink cover!  The shadow of the car over the light sensor turns off ANY light source, and the Darlington stops shorting out the LED. 

Bob Frey 

Website: http://bobfrey.auclair.com

  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,482 posts
Posted by MisterBeasley on Thursday, March 19, 2015 12:09 PM

One of my current projects is installing grade crossing flashers.  I find the between-the-rails phototransistors work pretty well even in very reduced ambient light, but if I dim the room enough they will stop working.  So, I'm playing with IR LEDs.  I have a few hooked up and they seemed to be completely useless, but I put a meter on the phototransistor and found that the IR LEDs are extremely directional, and if I don't point them pretty much directly at the phototransistor it won't get enough IR light.  So, now I need to take some more careful measurements and determine the "cone" sizes for both the LED and the phototransitor, and make sure I mount both of them accordingly.

It takes an iron man to play with a toy iron horse. 

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Thursday, March 19, 2015 12:20 AM

Ted:

Glad you are sorting out the problem.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Wednesday, March 18, 2015 1:54 PM
Thank you Bob I ordered all those parts from them off a list you have put up found some the had the 100k resistor replaced with a 220k and thought that may be the problem At first my try's did not work until i remembered i had one of those new light bulbs over the work bench Stupid me haha them i had one that the led glowed and would get brighter is i held the emitter up to it real close but am going back over everything tonight Thank you again Ted
  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Wednesday, March 18, 2015 1:49 PM
Thank you for replying I understand about not seeing what i have done i was seeing is this thread was still good first off and them what information would be needed Thank you again Ted
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Wednesday, March 18, 2015 1:43 PM

 Hi Ted              http://www.digikey.com        Part list updated:     22 March 2015

Part No.                    Description

754-1600-ND           EMITTER IR 3MM 940NM CLEAR (50 ma)        $1.87 per 10

160-1030-ND           PHOTOTRAN NPN 3MM IR DARK (940NM)      $2.70 per 10

A364B-4-ND              HEATSHRINK 3/64 IN X 4FT BLACK               $1.13 per 4 Ft.

Q2F332B-ND             HEATSHRNK POLY 3/32" BLK 4'                    $0.51 per 4 Ft.

     (Request To Digi-Key: “Please cut Tubes into 8 pieces, about 6” long

KSP13BU-ND            TRANS NPN DARL 30V 0.5A TO-92                   $2.74 per 10

100KQBK-ND             RES 100K OHM 1/4W 5% AXIAL                       $0.61 per 10

680QBK-ND                RES 680 OHM 1/4W 5% AXIAL                        $1.22 per 20

270H-ND                     RES 270 OHM 1/2W 5% AXIAL                        $0.85 per 10

1080-1122-ND            LED SS HI EFF RED DIFFUSED 3MM              $2.84 per 10

1N4148DICT-ND          DIODE SWITCHING 75V 0.15A DO35             $1.06 per 10

 

The parts list is for Circuits 1 or 2 is shown in the beginning of this thread.

If you reverse the pins 1 & 3 of the NPN Transistor, neither circuit will work.

Electronic parts in both the circuits are polarity sensitive. One wrong, circuits will not work.

 

Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Wednesday, March 18, 2015 12:39 PM

Hi Ted

Welcome to the forums!   Welcome

Without being able to see exactly what you have done its kind of hard to figure out why your circuit isn't working. The only thing I can suggest is to take a look at each of the components and make sure they are all wired the right way round. You could also check out the thread I started prior to this thread on the simpler version of the circuit with both the emitter and receiver mounted in the track. Robert referenced my thread but in case you missed it here is the link:

http://cs.trains.com/mrr/f/744/t/213706.aspx

(To get the link to work, highlight it, then right click on it, then select "Open Link" or words to that effect from the drop down menu).

I'll take the liberty of suggesting that you contact Robert Frey directly too. He has been very willing to help in the past.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Tuesday, March 17, 2015 2:49 PM
Hello Tryng to see if this thread is still open I'm am very interested in the circuit and trying to build but have failed to make it work Look for help Thank you Ted
  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, January 1, 2014 12:17 PM

 You want plain perfboard with 0.1x0.1 hole spacing. This is available in anything from sizes to hold just one circuit on up to big sheets you can cut apart. You cna also get it at your local Radio Shack. Squares cut from a big sheet were what I used for my Tortoise mounts back when I used Tortoises. To cut it I used wire cutters to snip through a few holes on each side of where I wanted to seperate it, then carefully snapped it along that line.

                  --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    October 2008
  • From: high desert so cal
  • 997 posts
Posted by BIG JERR on Wednesday, January 1, 2014 11:35 AM

hi guys , got a shopping list going to make some of these detection units as decribed BUT would like to get some kind a circuit board material to build it on so I can attache & or move inside a covered helix ..

so I'M looking at boards at digikey site and there a ton , is there a spacific type thats CHEAP and easily cut apart ,for making little circuits as these ..???  or  somthing other /

I know a board is NOT required for these units but having made things in the past Ive come to beleive it would make it easyer for me. ....... Jerry

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Tuesday, December 31, 2013 4:22 PM

Website: http://bobfrey.auclair.com

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, December 29, 2013 3:51 PM
To Frolin Marek,
In my material list for the replacement parts, I said: “Putting two 100 K resistors in series, increases the sensitivity. In parallel, it reduces the sensitivity to any light.”  Since you did not purchase a 200 K (200,000 Ohms) resistor, you can test this by temporarily putting a 100,000 and a 100,000 ohm resistor in series which is close to a 220K bias on the transistor pins 1 and 2.
 
Frolin, we don’t need a greater distance in HO scale.  I have tried to suggest two way of increasing the distance. One is to produce more IR light, and the other is increase the sensitivity to any light, and then work in a dark area.  You could be the first to work with reflective IR light in G scale. I also think it will work for you, but you need to do some testing.
 
Frolin, If you have just florescent lighting in your train room, then take the IR EMITTER, hold it above your G scale box car, and point it a the IR Photo Transistor, and use circuit #1   The result is the same. The LED comes on when there is something that covers the IR Photo Transistor.  (IR EMITTER on a Telephone Pole near the track, or even in a tree near the track. You don’t see IR light.)
 
Bob Frey 

Website: http://bobfrey.auclair.com

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Sunday, December 29, 2013 1:21 AM

Dave, Thanks for the reply. Good to hear others have tested the greater distance and had success. I did email Bob directly, he replied giving this thread link and suggesting I post and ask here, so am doing.

Bob,  was wondering about the use of two 100ohm resistors in series, instead of one. Would a 200ohm do the same? Can't find the posting that mentioned using two, so thought would ask here.


Guys... care to see examples of indoor G/Gn3, that I am referring to?  Not casual "G gauge" but true 1/22.5 scale, using both Gauge 1/G for Gn3 NG and Gauge 3 for Std Ga trackage. My layout is not as far along, but my site has photos and videos of my friend Barry's layout. 
Try the 'Sampler' video...
 http://www.frolin.net/cwrr/data/videos.html

thanks again!
Frolin Marek
Mountain RR

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, December 29, 2013 12:09 AM

Note that both the IR EMMITTER Diode and the IR Photo Transistor use IR light @ (940NM).  I don't think the new LED style produce IR light in this range?  (I have some of them, and Foresselent Lamps in my work shop. The problem of my circuit LED staying on comes when I push the "Sensitivity Resistor" near 470K.) .  

Bob Frey Big Smile

Website: http://bobfrey.auclair.com

  • Member since
    November 2013
  • 29 posts
Posted by Holshot14 on Saturday, December 28, 2013 7:33 PM

What should you use if your room lighting is the new LED style?

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Saturday, December 28, 2013 4:40 PM
To Mr. Frolin Marek
 
As you know, the Train detection circuit published in MR Oct. 2009 used a QRB1114-ND.  This device is now obsolete.
 
 
The replacement parts from Dig Key:  http://www.digkey.com are: 754-1600-ND, EMITTER IR 3MM 940NM WATER CLEAR  (50 ma).   160-1030-ND, PHOTOTRAN NPN 3MM IR DARK (940NM), Q2F332B-ND, HEATSHRNK POLY 3/32" BLK 4' (To cove the PHOTOTRAN and eliminate any side ambient light.) and a MPSA27GOS-ND, TRANS NPN DARL BIPO 60V TO.
 
 
Frolin, If you do use this IR Detector for your “G” scale Railroad, could you please report back the ”Sensitivity Resistor” you used, how far away could you get your WHITE Cardboard to reflect the IR light back?   Does it sense the present of ALL of your “G” scale cars?
 
Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, December 28, 2013 12:02 AM

Sorry Frolin. I didn't read your post carefully enough.

To answer your question, the sensors should work just fine with your scale. My test units consistently worked at about 5" - 6".

If you want a more detailed answer why not send a PM to Bob Frey. In my experience with him, he is quite willing to help out.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Friday, December 27, 2013 6:08 PM

Dave,

Maybe I was unclear on my question, as I am looking for a detector circuit that is 'not' light source based.  I do not want to use any light source in the setup, that is why I liked the circuit as I read, as both the emitter and detector are mounted in the track.  Do not want an overhead lamp, room lighting or such, to be needed.  And staying away from blocks or gaps and circuit detection if possible as well.

What I was wondering about though is, the increased distance that I have in G scale.  That is, the distance from tie to bottom of an HO car is maybe 1/2 inch, where the distance from ties to bottom of a G scale car is closer to 1 1/2 inches.

One of the circuit comments was to put two 100 ohm resistors in series (why not a 200ohm), to increase the sensativity of the circuit.

Will this circuit still work, and sense the car, when the distance is 3 times the space found in HO scale?  Is there a higher resistance value needed to handle the increase in distance I have in G scale?

 

thanks!

Frolin

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Friday, December 27, 2013 4:20 AM

Hi Frolin

The detectors that Rob Frey is explaining don't necessarily need an overhead light source, in fact they don't need any incandescent light at all. They can work by reflecting a beam of infrared light off of the bottom of the cars as the cars pass over the sensors which are mounted in the track between the ties. The sensors have two components. One is an infrared emitter and the other is an infrared sensor. They will work just fine in tunnels and if you use them in other locations they will work in both daytime and night time operations.

Don't be afraid to ask more questions! I was (and still am) an electronic dinosaur but I have managed to figure out how these sensors work.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Thursday, December 26, 2013 9:37 PM

Bob,

Looking at building some of these detector circuits to test use on my layout. 

I read about having two 100ohm resistors in series to increase the sensativity.  I model (indoors) in 1/22.5 scale and thus the distance is between 1 1/2 to 1 3/4 inches from top of ties (sensors) to the bottom of most cars.  Wondering if you see any concerns with this much distance?

The common answer idea is photocel based, but I want to use the same circuit on the layout in hard to view places, along with in hidden storage.  Do not want to mount a light source over each circuit.  Will not always have a light source, and with possible night time lighting, means the circuit should not by room lighting based.

So any concerns over the distance from sensors to bottom of cars, in G scale compared to HO scale?

Frolin

 

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, August 4, 2013 5:58 PM

DiscoverCircuits.com, has 30,000+ electronic circuits, cross-referenced into 500+ categories. Model Trains Circuits: http://www.discovercircuits.com/M/model-trains.htm

I also like Rob Paisley's Model Train web site. “Model Railroad & Misc. Electronics” He has a Main Circuit Index list.  Computers and microcontrollers have largely been avoided.  The circuits are explained as to how they work, and has a list of Dig Key Part No.

Rob Paisley's: http://home.cogeco.ca/~rpaisley4/CircuitIndex.html

Day&Night IR: http://home.cogeco.ca/~rpaisley4/DayNight.html

Track IR: http://home.cogeco.ca/~rpaisley4/ATDetIR.html

IR Detector: http://home.cogeco.ca/~rpaisley4/IrProximity.html

Bob Frey

 

Tags: detection

Website: http://bobfrey.auclair.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!