# PHOTOCELL TRIGGERING ISSUES



## time warp (Apr 28, 2016)

I have an automatic grade crossing setup which uses Photocells between the rails which trigger the remote circuit board and alternately flash red LED's on the crossbucks. This particular system was acquired at a train show for $20 bucks, so I figured I couldn't go wrong. It's made by IHC.
I installed it on my layout and it does work , however I ran into some triggering issues which had me scratching my head. The photocells were installed at the entrance and exit of the crossing and trigger just fine except as the train passes over the crossing, flickers of light strike the detectors through the gaps between the cars. The initial trigger always begins with the left light, so as these flickers occur the circuit will keep defaulting to start. This gives me a halting flash of the left light, and rarely a right light. Moving the detectors closer together has no effect, and the speed of the train has no effect. If I block the detector with my finger or turn off the room lights the circuit functions normally.
I visited with wvgca about this and one of his suggestions was to filter the light by using wax paper to make the detector less sensitive. I did filter the photocells, but I used frosted tape. To get the best performance 3 layers were required but now it works perfectly. I have the tape on it now but will need to come up with a more attractive remedy, one suggestion was white glue, another might be the wax paper with a little scenic disguise, I'm not sure. Operationally things are fine and I'm sharing this info at Warren's suggestion for the benefit of others.
And by the way, the room lighting is fluorescent, which may be a factor.


----------



## gunrunnerjohn (Nov 10, 2010)

You need to add a filter on the outputs to keep the signal constant until the trigger is gone for some period of time. This will eliminate any issues of intermittent triggering.


----------



## Overkast (Jan 16, 2015)

gunrunnerjohn said:


> You need to add a filter on the outputs to keep the signal constant until the trigger is gone for some period of time. This will eliminate any issues of intermittent triggering.


Electrical workarounds get me all "giddy" inside :laugh:


----------



## time warp (Apr 28, 2016)

gunrunnerjohn said:


> You need to add a filter on the outputs to keep the signal constant until the trigger is gone for some period of time. This will eliminate any issues of intermittent triggering.


 I didn't think about the output, I was focused on the input as the issue. Makes sense though. What do you suggest?


----------



## gunrunnerjohn (Nov 10, 2010)

Well, the "problem" is simply the characteristics of the item being used to trigger the module, right? 

This Multi-Function Timer Module looks like it could do the job.


----------



## time warp (Apr 28, 2016)

Yes, the components are working perfectly, the shortcoming is in the basic simplicity of the circuit design.
The timer is 10 times the size of the existing unit! It will do the job, I'll just have to sort out where to insert it into the circuit.
Bombs away! BIN.


----------



## Tom_C (Jan 8, 2016)

If you're so inclined, I think you can do this with a 555 in mono-stable mode. It's been a while since I designed anything, but I think this will do what you want. Or, you can buy that part John linked. 

http://www.instructables.com/id/555-Timer/step2/555-Timer-Monostable-Mode/

ADDED: Here's a prebuilt circuit:

http://www.ebay.com/itm/NE555-DW44-...908896?hash=item3d33411760:g:QtIAAOSwdGFYozq-

Also, for reference and to topic, I've had great result with the azatrax circuits for signal controls:

http://www.azatrax.com/controller.html


----------



## time warp (Apr 28, 2016)

Thank you Tom, I bought the timer but I'm glad you shared the 555 circuit. I may want to incorporate this in other ways later, but currently I have 0 component inventory and haven't built anything in decades. My IC's all went away at some point during a move so I don't have the 555's anymore either.
I also want to add a red/green timed indicator light on my coal loader. Triggred by the first car it will show red while the car is "loading", and after a few seconds will show green until the next car is advanced, then again show red during the loading cycle.

Regarding the Azatrax, I do have the Dallee current sensing flasher unit elsewhere on the layout. It, like the Azatrax, is full function for gates and so forth. I far prefer it over the photocell type.


----------



## J.C. (Dec 24, 2016)

I my self have much more success with L D R's (light dependent resistors ) in detection circuits than photo cells , as they don't seem to switch as fast.


----------



## time warp (Apr 28, 2016)

The photocells are fast, but this what I happen to have. Not the best way to go, like you say.
I'm just now digging in to this really, because we are adding several more animated features to our pike.


----------



## J.C. (Dec 24, 2016)

```

```



time warp said:


> The photocells are fast, but this what I happen to have. Not the best way to go, like you say.
> I'm just now digging in to this really, because we are adding several more animated features to our pike.


here is a simple ldr circuit.


----------



## gregc (Apr 25, 2015)

why not orient the detector at an angle so that the path remains blocked even when the gap between cars passes?


----------



## Tom_C (Jan 8, 2016)

gregc said:


> why not orient the detector at an angle so that the path remains blocked even when the gap between cars passes?


I don't have much experience with this, but it is one method talked about on the azatrax installation guide. Scroll down to page 3.

http://www.azatrax.com/install-MRX3.pdf

I did try to install like that, but I have On30 cars and found I didn't really need to mess with it, but it may help solve the problem of overhead lights causing problems.


----------



## time warp (Apr 28, 2016)

gregc said:


> why not orient the detector at an angle so that the path remains blocked even when the gap between cars passes?


 That may work. I believe it would be most effective though if the photocell was mounted maybe 1/4" down into a plastic tube and then installed at an angle. That would narrow the light path enough to lessen the chance of light entry.
I'm impressed with everyone's input on this.


----------



## time warp (Apr 28, 2016)

J.C. said:


> ```
> 
> ```
> here is a simple ldr circuit.



Would the 555 as configured in this schematic handle the load of an Atlas snap relay? Maybe a micro relay would be better for say controlling signal lamps or power routing on turnouts. My gears are turning.


----------



## J.C. (Dec 24, 2016)

time warp said:


> Would the 555 as configured in this schematic handle the load of an Atlas snap relay? Maybe a micro relay would be better for say controlling signal lamps or power routing on turnouts. My gears are turning.[/QUOTE
> 
> I would say no without using the relay as I think the out put max current is 200 ma. the other problem with using that for a switch control is it would only throw switch one way , so you would need a light activated set up to turn switch back the other way.


----------



## time warp (Apr 28, 2016)

Not to throw the switch, just the relay for signal lights or power routing. The secondary contacts would handle the track voltage in the case of power routing.


----------



## J.C. (Dec 24, 2016)

I would say yes as long as the relay didn't need over 200 ma [f the draw is higher you could use the output to drive something like a 2N3055 rated at 15 amps or a 2N2222 rated at .8 amps.


----------



## time warp (Apr 28, 2016)

It will be a while before I can move ahead because the timer I bought will be direct from China. I'd guess 3 weeks.
The advantage of the timer is since I have two tracks which always run the same direction through this grade crossing I can use one of the photo resistors on each track and control the signal duration with the timer. I won't need both detectors on the same track as before.


----------



## wvgca (Jan 21, 2013)

time warp said:


> It will be a while before I can move ahead because the timer I bought will be direct from China. I'd guess 3 weeks.
> The advantage of the timer is since I have two tracks which always run the same direction through this grade crossing I can use one of the photo resistors on each track and control the signal duration with the timer. I won't need both detectors on the same track as before.


If you use a 555 as a trigger, you can use another [or a 556] to do the signal light flashing, will drive leds okay, but nothing with higher current draws


----------



## time warp (Apr 28, 2016)

wvgca said:


> If you use a 555 as a trigger, you can use another [or a 556] to do the signal light flashing, will drive leds okay, but nothing with higher current draws


 I need to take a closer look, but I believe the unit I already have is built that way. And it does use LED's as flashers.

I kind of veered off topic slightly thinking of a way to use some of the suggested circuits for different types of signaling based on photocells. End of track indicators, Occupancy detection and so forth. I've no doubt these things have been discussed here before.


----------



## Tom_C (Jan 8, 2016)

Sort of off topic, but years ago I used a 555 to make the lights flash on an old Lionel 154 crossing signal. The 2 incandescent bulbs are wired in series, constant on, so I tied the output of a 555 (astable timer ckt) between the bulbs, which made them flash.

I was using a pressure switch, and not the rail contacts like shown in the link below, so my lights were either on or off.

http://www.tandem-associates.com/lionel/lionel_trains_154_acc.htm


----------



## Overkast (Jan 16, 2015)

gregc said:


> why not orient the detector at an angle so that the path remains blocked even when the gap between cars passes?


I thought the angle trick was more for infared sensors not photocell? If the photocell activated on dark and you block it's path so it's always dark, wouldn't it remain on all the time??

Sent from my SM-N910V using Tapatalk


----------



## Tom_C (Jan 8, 2016)

I'm guessing here, but I assume TW is actually talking about IR, not photocell. I may be wrong. (Added: I think the topic veered to include photocells, but originally I think it was about IR)

As for the photocell activating on dark, you're right, but it could be used in it's associated circuit to trigger something on high or low, so it's all dependent on how it's used in the circuit. 

Added for clarification: By photocell do you mean a photoresistor (LDR)? If so then it just varies the resistance based on the amount of light reaching it. I think we did a kit-bash with the terms photocell and LDR.


----------



## gunrunnerjohn (Nov 10, 2010)

Lots of ways to skin this cat, but IMO the simplest way is to just delay the dropout of the signal relay. Fooling with the sensor to insure you never have a gap will be a PITA, and dollars to donuts you'll have some consist that still has a gap that triggers it.


----------



## J.C. (Dec 24, 2016)

gunrunnerjohn said:


> Lots of ways to skin this cat, but IMO the simplest way is to just delay the dropout of the signal relay. Fooling with the sensor to insure you never have a gap will be a PITA, and dollars to donuts you'll have some consist that still has a gap that triggers it.



question for you John as not that up on photo cells , but would it be possible to put another cell in parallel to the first about two inches out from he first one or would that cause the voltage to be two high?


----------



## Tom_C (Jan 8, 2016)

J.C. said:


> question for you John as not that up on photo cells , but would it be possible to put another cell in parallel to the first about two inches out from he first one or would that cause the voltage to be two high?


I'm not John, but do you mean in reference to the circuit you posted earlier?


----------



## J.C. (Dec 24, 2016)

Tom_C said:


> I'm not John, but do you mean in reference to the circuit you posted earlier?


no not for LDR for TW's original post.


----------



## Tom_C (Jan 8, 2016)

Right. I think TW was actually talking about IR, not a photocell. A photocell is an LDR. They are the same thing. 

He first calls it a photocell, and then later he says 'detector', So I think we need to get clarification on what we're talking about.


----------



## J.C. (Dec 24, 2016)

Tom_C said:


> Right. I think TW was actually talking about IR, not a photocell. A photocell is an LDR. They are the same thing.
> 
> He first calls it a photocell, and then later he says 'detector', So I think we need to get clarification on what we're talking about.


I was assuming he was talking about a photovoltaic cell


----------



## Tom_C (Jan 8, 2016)

J.C. said:


> I was assuming he was talking about a photovoltaic cell


I tried to find IHC signals and they may be out of business, but I did find this signal that can use photocells or IR pairs. I guess we have to wait and see.

https://www.logicrailtech.com/gcp_inst.pdf


----------



## J.C. (Dec 24, 2016)

you are right will have to wait for a better definition of what type dector of from TW , the bunch I worked with always referred to a LDR as a LDR and a photovoltaic cell as a photocell. as for the circuit I posted uses you can use more than one LDR on it (the most I have used it two) don't know how many could be used though. guess I'll pull out the breadboard and see how many it will stand.


----------



## gunrunnerjohn (Nov 10, 2010)

Obviously, you could use two photo detectors across the track, whatever technology you choose to employ. My point is that it's probably easier to just have a retriggerable timer on the output that holds the signal until some set time period without an obstruction. Having multiple sensors across the rails is pretty messy and somewhat labor intensive to not only install them but also hide them in scenery.


----------



## time warp (Apr 28, 2016)

Sorry for any confusion, but in reference to the stated problem I did call them detectors. I'm not sure what the actual devices are as they came with the unit and you fellas are far more knowledgeable than I on these things.
Also, the unit is an old (NOS) IHC crossing flasher kit.


----------



## wvgca (Jan 21, 2013)

While just reducing the light input to the detector with frosted tape may be nowhere near the ideal solution, it does solve the 'symptom' without having to remove the unit to do any changes or soldering 
time warp . I assume that at this point it's working 'good enough' ?


----------



## time warp (Apr 28, 2016)

Yes it is, but I plan on adding the timer GRJ mentioned for the delay aspect.
The input here has been fantastic and very informative.


----------



## Tom_C (Jan 8, 2016)

TW, look at my post at the top of this page and see if that .pdf is similar to your unit with regard to the photocells. Does your unit only have a single detector in each location and is using room light to trigger? Photocells are typically round and have a squigley line down the middle separating the 2 sides of the cell.

If so, then they are photocells otherwise known as LDRs, and their resistance changes with how much (or little) light they receive... also the unit wouldn't work without room lighting so you couldn't get any detection at 'night', depending on the ambient light available.


----------



## time warp (Apr 28, 2016)

I believe you are right, and room light is required. When the room lights are turned off the unit stays activated.


----------



## Tom_C (Jan 8, 2016)

OK, so here’s a possible cosmetic fix. I am assuming the photocell is about the size of a dime, give or take. You needed to drill a half inch hole in your rail bed to accommodate the cell, and that probably drilled through 1 or more RR ties. Take a piece of construction paper or something similar that is the same color as the rail ties and ‘repair’ the ties across the top of the cell. That may not only camouflage the cell but also reduce the amount of light hitting it. 

That could solve both your problems.

Also, you could add a little 'street light' to your layout and it may fix the problem at night.


----------



## time warp (Apr 28, 2016)

Here you go, and the track is HO obviously. I just got home and pulled the tape off so you could see what I see.
Sorry for the hit and run responses, but I work nights and I had a Teachers conference, lunch and family business to attend to today.
The box picture is For the unit I have, which was sold by IHC some years ago.
You guys always amaze me with great information and insight. Very very helpful always.:thumbsup:


----------



## Tom_C (Jan 8, 2016)

OK, smaller than I assumed. Guess you're back to the timer. 

Heres another possible thing to try. Film negatives will act as a filter and it might camouflage the cell a little more. If you have a peice of film with no image you can try a peice and see if it helps.


----------



## time warp (Apr 28, 2016)

Good idea. I'll fiddle with it some more, and now armed with more good info I want to get the Coal loader signal lighting figured out as well.


----------



## Tom_C (Jan 8, 2016)

If you plan to build everything yourself, then you can probably use a similar circuit to what JC posted, and then use a bi-color LED (red/green) on the output for your signal. On is red, off is green (or vice versa)


----------



## time warp (Apr 28, 2016)

That's sort of what I was thinking, but I hadn't considered the bi color LED.


----------



## Tom_C (Jan 8, 2016)

I'm pretty sure you can use a 555 in some configuration, but I'd need to study it more... been awhile since I designed anything using it. It might be a little tricky using a photocell and a timer in the way you've described.

As my old professor said, anything can be done with electronics, but in reality when things get more complicated it could be cheaper, and certainly easier, to buy something prebuilt to fit the need.

As for the bi-color LED, I've done it with a 555 and just tie the LED to the output, connected to a voltage dividing resistor network (2 resistors in series) so when the output is high is uses one resistor and when low it uses the other resistor, and the LED will be red or green depending on the output of the timer.


----------



## time warp (Apr 28, 2016)

I'll post a diagram of the idea as soon as I verify what I need to do.


----------



## J.C. (Dec 24, 2016)

TW here are two circuits on light on dark there the basic ones I use for just detection of occupied tracks, tried to send them in a PM but can't as there on my computer not a url, if you have any questions PM me


----------



## time warp (Apr 28, 2016)

Thanks, guys. I must say I thought for a bit that there was too much info here, but looking past the original problem I'm glad for the additional ideas. 
It looks like the suggestions provided will allow me to get a couple of other things figured out. Thanks for the schematics, J.C.:smilie_daumenpos:
And GRJ, when the timer board eventually arrives I'll let you know how it goes. I ordered two so I could use one on another project. I'm planning on building a simple layout for the assisted living center near me, using a single push button/ timed circuit to allow it to run for a couple of minutes at a time.


----------



## wvgca (Jan 21, 2013)

time warp said:


> I'm planning on building a simple layout for the assisted living center near me, using a single push button/ timed circuit to allow it to run for a couple of minutes at a time.


I have spare DC loco, and HO rolling stock that I can donate for this project...doesn't fit my layout / era ..
I can even ship prepaid, not an issue ..


----------



## gunrunnerjohn (Nov 10, 2010)

I probably have some HO stuff I could donate to the cause as well.


----------



## J.C. (Dec 24, 2016)

got two Tyco billboard reefers that I would donate , they might need a tweak to use .


----------



## time warp (Apr 28, 2016)

Wow! Thank you both! I'm still trying to get things arranged, but I'll definitely keep you posted.


----------



## time warp (Apr 28, 2016)

I got my timer boards the other day for the crossing fasher circuit. I need to look at the crossing circuit board to try to determine where I need to wire this in.


----------

