Author Topic: Sharing Photo Cells with Block Animators  (Read 704 times)

0 Members and 1 Guest are viewing this topic.

davidgray1974

  • Crew
  • *
  • Posts: 294
  • Gender: Male
  • "...." - Luke Skywalker
  • Respect: +147
Sharing Photo Cells with Block Animators
« on: January 25, 2016, 12:26:04 AM »
0
I've spent most of the day installing Tomar signals on my layout using Logic Rail BA2's with photocells.  I was wondering if anyone knew how or if its possible to share a photocell in two different blocks with Logic Rails Block Animator?  I have a photocell right after signal #19 and before the switch going towards signals #17 and #18 on the picture below.  Currently i have the W1 photocell connected to both signals but only one of them changes from green to red when the photocell is covered.



 

The diagram below depicts IR sensors, but this was the only photo i could find on the web.  Basically i want to share W1 (West Bound 1) with Westbound signals #17 and #18 to cut down on the amount of photocells on the track.  I'll still use separate photo cells for W2 on both signals. 



Hope this makes sense.

David
« Last Edit: January 25, 2016, 12:27:35 AM by davidgray1974 »

Modeling the L&N, well at least a few times a year.

C855B

  • Crew
  • *
  • Posts: 8104
  • Respect: +1068
Re: Sharing Photo Cells with Block Animators
« Reply #1 on: January 25, 2016, 01:56:11 AM »
0
Unfortunately, I don't think you can do what you need to do because of the self-contained nature of the sensor + signal driver. The IR transmitter and receiver have to be used as a married pair because the transmitter is strobed and the receiver is looking specifically for its own strobe pattern. The problem with combining things with this Logic Rail circuit is there is no (user-accessible) breakout of the "detected!" logic, which is the only place where we would have the opportunity to send the result of the one pair to multiple places.

When I saw your track and signal plan, I thought to myself, "Gosh, that looks familiar somehow." Then it hit me. :facepalm:  Nice to see it coming along!
...mike

http://www.gibboncozadandwestern.com

We don't make mistakes, we have happy accidents. We just don't tell anybody. -Bob Ross

mmagliaro

  • Crew
  • *
  • Posts: 4661
  • Gender: Male
  • Respect: +932
    • Maxcow Online
Re: Sharing Photo Cells with Block Animators
« Reply #2 on: January 25, 2016, 06:15:01 PM »
0
Here are some long-winded meanderings that may stimulate thinking to solve this problem.

You are using the photocell version, not the IR version you showed in the diagram, if I understand your post correctly.
Therefore you do not have any issues with a strobe clock.

The issue, I think, is current flow into two input stages of two boards
at the instant that photocell goes dark.

I'll state at the outset that I don't have a solution for this just yet.  But I think I know what the problem is.

There is no schematic for that board, but I'll take an educated guess here.

What follows is the electronics theorizing that went through my head as I thought about how this must be happening.
It may not be of use to you... but it might, or it might stimulate some thinking amongst the other Railwirians about
a way out of the problem.

/////////////////////////////////////////////////////////////////////////////////////////////////
Right now, you have a single photocell connected to two detector boards.

Without seeing a schematic, but knowing how some of these circuits work, I *think* the issue is this.
The photocell is connected (approximately) from base to ground of some sort of input driver.  Let's assume it's just a
small transistor.  When well lit, the photocell's resistance is very low, so it keeps the base of that transistor shorted out,
the transistor doesn't turn on, and the signal doesn't light.  (or rather, the rest of the circuit is in some default state,
so the green one lights, but not the red one).
When the photocell is covered, its resistance goes very high, so it stops shorting out the base,
the transistor turns on, the circuit changes to the "red" state.

But you've got that photocell connected to two circuits.  What happens now?

When the photocell is dark, ONE of those transistors is going to
turn on first (and that just depends on luck of the draw).  But when it does, all the current, from both detectors is going to dump
into that first transistor, and happily turn it on.   After that, all the current is going to go through the already-conducting transistor
and there is no reason for the other one to ever turn on.
If the circuit includes some sort of feedback like a Schmitt Trigger), and it probably does,
then once the first transistor starts conducting, it's going to really feedback and turn itself fully on, and no current
is going to flow in that other detector at all. 
And this is ideally what you want... except in your case where you are trying to
get two of them to come on.

I don't think this is fixable.  I think you need two photocells.  But here's something to experiment with.

See what happens if you hold your hand above the track and off at various angle until you figure out where
you can hold your hand so you *just* get the first signal to go red.  See if there is a point where you can get both
to come on that way. 

As for the solution... I don't know yet... I'm trying to see if I can think of a way maybe with resistors or diodes to keep
the "first one" from hogging all the current.  But I really don't think there is a way without 2 photocells.
   

peteski

  • Crew
  • *
  • Posts: 21491
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +2005
    • Coming (not so) soon...
Re: Sharing Photo Cells with Block Animators
« Reply #3 on: January 25, 2016, 06:49:35 PM »
0

The photocell is connected (approximately) from base to ground of some sort of input driver.  Let's assume it's just a
small transistor.  When well lit, the photocell's resistance is very low, so it keeps the base of that transistor shorted out,
the transistor doesn't turn on, and the signal doesn't light.  (or rather, the rest of the circuit is in some default state,
so the green one lights, but not the red one).
When the photocell is covered, its resistance goes very high, so it stops shorting out the base,
the transistor turns on, the circuit changes to the "red" state.


If the sensors are CdS photocells (they simply change resistance depending on the amount of illumination) then the type of a circuit you describe would most likely have a pullup resistor from the positive side of the supply to the transistor's base.  In layman's terms, if a transistor's base is grounded or free floating, the transistor will not conduct.  I'm talking about a standard NPN transistor circuit.  If the circuit has the pullup transistor then hooking 2 inputs to a single photocell will just make it a little less sensitive (since 2 pullup resistors will be in parallel, decreasing their total resistance.

If I had one of these boards in my possession I cold try to do some "reverse engineering" to see if I can figure out the exact circuit.
--- Peteski de Snarkski

-"Look at me, I'm satirical!!!"
-"Look at me, I'm anal retentive!!!"
-"Look at me, I have the most posts evahhhh!!!"
-"Look at me, I'm snarky!!!!"
-"Look at me, I have OCD!!!"
-"Look at me, I'm a curmudgeon!!!!"
-"Look at me, I'm not negative, just blunt and honest!!!"

alhoop

  • Crew
  • *
  • Posts: 260
  • Respect: +24
Re: Sharing Photo Cells with Block Animators
« Reply #4 on: January 25, 2016, 09:50:19 PM »
0
Max and Pete are saying the same thing and both are correct.
Why not buy a PicAxe 20M2 microcontroller for <$5 for each two signals and roll your own?
The Programming editor is free to download - all you need to program the chip is a
solderless breadboard, two resistors, a serial cable -  either USB or RS232 and
 a 4.5 volt power supply( 5VDC fed through a 1N400x rectifier).

Al

« Last Edit: January 25, 2016, 10:14:58 PM by alhoop »

nkalanaga

  • Crew
  • *
  • Posts: 6688
  • Respect: +291
Re: Sharing Photo Cells with Block Animators
« Reply #5 on: January 26, 2016, 01:43:26 AM »
0
Use one detector to control several DIP relays, which in turn control the signal circuits?
N Kalanaga
Be well

mmagliaro

  • Crew
  • *
  • Posts: 4661
  • Gender: Male
  • Respect: +932
    • Maxcow Online
Re: Sharing Photo Cells with Block Animators
« Reply #6 on: January 26, 2016, 12:31:56 PM »
0
Use one detector to control several DIP relays, which in turn control the signal circuits?

Yep... that would certainly work.   But I think he's looking for an easier solution.
For that matter, putting two separate photocells into the track at the same location, one for each signal board,
would work and that doesn't require any extra parts except the photocell.

davidgray1974

  • Crew
  • *
  • Posts: 294
  • Gender: Male
  • "...." - Luke Skywalker
  • Respect: +147
Re: Sharing Photo Cells with Block Animators
« Reply #7 on: January 27, 2016, 03:23:59 PM »
0
@mmagliaro - You're right, I may just have to go with adding the additional photocells.  Didn't really want to because of the amount of photocells in one location, but it is the easiest option.

Thanks for all the great feedback everyone!

David

Modeling the L&N, well at least a few times a year.

peteski

  • Crew
  • *
  • Posts: 21491
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +2005
    • Coming (not so) soon...
Re: Sharing Photo Cells with Block Animators
« Reply #8 on: January 27, 2016, 03:47:00 PM »
0
David, I looked over the documentation for this circuit and I would say to go ahead and try to share the same photocell between both detector circuit.  It won't damage anything - in the worst case it just won't work.

Just set up a test your workbench before committing it to your layout.  I suspect that you will have to adjust the sensitivity potentiometers on both circuit boards towards increased sensitivity (try to adjust them to be at the same setting on both boards).   Start off at maximum sensitivity and then gradually decrease it (if needed).  I think it will work fine.

As far as the IR version of the circuit goes (I know, you aren't using it) there is no strobing of the IR LED. It is hooked up between 5V and GND with a series 180 ohm resistor. So, it is always illuminated.
« Last Edit: January 27, 2016, 05:05:38 PM by peteski »
--- Peteski de Snarkski

-"Look at me, I'm satirical!!!"
-"Look at me, I'm anal retentive!!!"
-"Look at me, I have the most posts evahhhh!!!"
-"Look at me, I'm snarky!!!!"
-"Look at me, I have OCD!!!"
-"Look at me, I'm a curmudgeon!!!!"
-"Look at me, I'm not negative, just blunt and honest!!!"

davidgray1974

  • Crew
  • *
  • Posts: 294
  • Gender: Male
  • "...." - Luke Skywalker
  • Respect: +147
Re: Sharing Photo Cells with Block Animators
« Reply #9 on: January 27, 2016, 03:54:54 PM »
0
@peteski - I did try this but didn't think about adjusting the sensitivity.  One signal changed from Green to Red when covered, but the other stayed constantly on Red.  I will definitely give this a try tonight and post the results.

Thanks!

David

Modeling the L&N, well at least a few times a year.