JohnnyUBoat

So the plan is to build a helix which may span two rooms: a non load bearing wall will be installed to separate the train room from the rest of the basement; however, to conserve ~10 sq. ft. of space, I've decided that about half the helix will lie within the train room while the other half will cross into the rest of the basement and be finished off (with viewing windows) to "blend in". 

The problem is I want to be able to tell, from just a quick glance at a panel, if my train is A) still riding the rails andb) still in one piece. To accomplish this I am building a panel of LEDs that are activated by photocells placed every 2'-3' or so along the helix track (about 6-8 photocells according to some quick math).  This number is perfect because I found an 10-position LED bargraph on allelectronics

( http://www.allelectronics.com/make-a-store/item/BG-10G/10-SEGMENT-BARGRAPH-GREEN/1.html

that would look sa-weeeeeet mounted vertically on a fascia panel!

I was looking to use a normally open photocell switch with an opposing LED (to provide a light source) to detect trains but I have not seen this in practice and was wondering what tips some of you may have to make this a successful project?

Thanks!

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
LKandO

Same Idea

I am planning the same for my helices. IR phototransistors coupled to IR LEDs. Used this arrangement with former slot car layout to detect cars for lap counting. Worked well. Am planning LEDs arranged on panel in a zig-zag configuration to indicate helix occupancy.

ix%20led.jpg 

Simple phototransistor circuits

Alan

All the details:  http://www.LKOrailroad.com        Just the highlights:  MRH blog

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro
nsparent.png 

Reply 0
lexon

Photo cells

http://home.cogeco.ca/~rpaisley4/CircuitIndex.html#Light

Rich

Reply 0
Jurgen Kleylein

That's a lot of detectors

Boulder Creek Engineering makes IR detectors which can indicate either positive or negative occupancy:

http://www.bouldercreekengineering.com/nightscope.php 

That sure is a lot of detectors, though; it would get pretty pricy having that many.  We only plan 3 per helix on the Sudbury Division.

Jurgen

HO Deutsche Bundesbahn circa 1970

Visit the HO Sudbury Division at http://sudburydivision.ca/

The preceding message may not conform to NMRA recommended practices.

Reply 0
Prof_Klyzlr

Been working since the 70s

Dear Johnny, Yes, your "N/O" photocell idea can and should be able to do what you require, giving a "snake" of LED that crawl along the panel as the train progresses around the helix. For a live-fire example, Google "Vulcan Vale Tramway". You'll end up at the Australian Narrow Gauge Web Exhibition, looking at a pioneer On30 layout started back in the 70s. http://members.optushome.com.au/jdennis/vulcan/frameset.html It had extensive hidden trackage, and used exactly this kind of system. I may be able to dig up some pics from the "last run" of the layout if that helps... Happy Modelling, Aim to Improve, Prof Klyzlr
Reply 0
proto87stores

Alternatively . . .

. . .put an inexpensive WEB or security CAM in the center of the helix and place it on a slowly rotating mount.

1. I suspect it will be cheaper overall.

2. You won't have to worry about the complexities of reliable Pcell detection with ambient light.

 

Andy

Reply 0
Prof_Klyzlr

Dear Andy, Any hints as to

Dear Andy,

Any hints as to how to handle the potential cable tangle?
Would the webcam/CCTV cam be better on a "back n forth" slew mount?

Happy Modelling,
Aim to Improve,
Prof Klyzlr

PS how about a wireless cam?

http://www.jaycar.com.au/productView.asp?ID=QC3368&keywords=wireless+camera&form=KEYWORD

http://www.jaycar.com.au/productView.asp?ID=QC3251&keywords=2%2E4g&form=KEYWORD

 

Reply 0
proto87stores

I was going to say wireless security CAM. . .

.  . but thought that might be too restrictive as an answer. I think you need a video input card to then put the image on your PC. A simple rotating mount avoids the need for slew controls. And a helix innards suit that view more than any other track formation.

Andy

Reply 0
LKandO

What Could Be Simpler?

No fancy circuitry needed. LEDs can be driven directly from the phototransistors. Each detector leg requires:

  • 1 Phototransistor @$0.17
  • 1 IR LED @$0.13
  • 2 Resistors @$0.04 ($0.08)
  • 1 Capacitor @$0.06
  • 1 panel LED @$0.06

$0.50 in parts per detector at Mouser prices. 8 detectors per loop on helix = $4.00 per loop = $16.00 for a 4 turn helix with 32 detectors. Add in a few feet of ribbon cable $3.00 to make wiring easy and neat. Entire arrangement for less than $20.00.

Beam crosses at axle centerline. Tube on phototransistor prevents trigger by stray UV. Capacitor prevents flicker.

Simple, inexpensive, and the LEDs on the fascia will look very cool.

DETECTOR.jpg 

Alan

All the details:  http://www.LKOrailroad.com        Just the highlights:  MRH blog

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro
nsparent.png 

Reply 0
JohnnyUBoat

Guess what I just found?!?

...My CMOS Cookbook by Don Lancaster!  I knew I had this thing sitting around from back when I first got interested in circuitry years and years ago.  There're even a few pages on comparators, which was mentioned in your post, Lenox.

Thanks for the info, guys - it will all come to use, along with my Cookbook.  I'm going to order a few parts and try out  a quad-comparator system.  Once it's up and working, I'll chronicle my experiment.

Thanks!

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
JohnnyUBoat

Whoops...

Missed your post, Alan.  That is​ pretty simple.  I think I'm going to try both, seeing as the wiring for a quad comparator may be a little more "compact", it might be worth it to wire up both and see which one (if any) is more reliable.  Considering I'm not starting the layout anytime soon, this is the time to cook something up!

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
jlrc47

 A couple of are club members

A couple of are club members use this camera in hidden tracks. Harbor Freight has Black and White Security System with Two Cameras & Monitor for $59.99

http://www.harborfreight.com/black-and-white-security-system-with-two-cameras-monitor-66556.html

Joe

Reply 0
JohnnyUBoat

Thought about the camera...

...but there isn't a good space to mount a monitor, even from the ceiling.  I need a solution that is instant, reliable and compact. I can see a camera system being quite useful for a large, hidden staging yard but not so much a helix.

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
proto87stores

Don't run from slightly more electronic complexity

Electronics doesn't cost much more for a few added parts, once you have paid for all the foundation stuff, like all the little PCB's for mounting on, and the power supply, plugs and sockets, cables, etc. But you can then cover a lot more of the issues.

For example, if you are only slugging the sensor output to avoid flicker of the leds (due to the gaps between trucks) with just a single capacitor, you may risk missing seeing the few short pulses of a loose car breaking away from a climbing train, and rolling backwards down the slope.  Solutions for that would start by adding a diode around each slugging cap, or maybe using cheap 555 timers,

Another popular solution would be to feed all the sensors into a PIC or AVR micro, and then ne able to interpret much more of what's happening on in the helix, as well as easily add collision prevention if you wanted.

 

Andy

Reply 0
JohnnyUBoat

I love a challenge

Complexity isn't so much an issue so long as I am receiving reliable results.  If two solutions achieve the same result and one utilizes 15 components while the other 5, I'm going to choose the simpler one.  But, you make a valid point:  better base components will allow for future expansion of the system.  For instance, the example you used, Andy, about the car breaking away down the grade: wouldn't it be great to have an alarm sound if the system detected the speeding cars?

I may be implementing a similar audible system for at least one of my hidden staging yards:  Upon entering a staging track, the train's progress will display on a panel. As the train approaches the very end of the track (I may have to deal with stub-end staging, unfortunately) an alarm will begin to sound, alerting the operator to stop his train.

My interest in Arduino boards has piqued during my research.  The more I look into it, the more I realize I could probably automate EVERYTHING on the layout with one - or a series - of these little guys!  Anyone played with an Arduino before?

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
LKandO

Not Afraid, Just Fond of Simplicity

Andy, I experienced the missed pulses issue you describe in an installation long ago.

My formal plan has the emitters and detectors mounted in the helix sub-roadbed pointing up/down. This greatly minimizes the issue of missed pulses. Spline cars being the exception however my layout is set in the 60's. I posted the drawing of across-the-r.o.w. in the event someone has the space/desire/post-helix-construction limitation of mounting in the roadbed.

I will press fit the emitter/detector pair in place in routered raceways/holes, limiting resistors in the raceways, ribbon soldered directly to leads, mount all remaining discrete components on the same single PC board used for fascia LEDs to keep cost and complexity down. The ribbon will spiral along the edge of helix roadbed to keep the install neat and tidy. There is a universal multi-voltage buss for the entire layout providing 5 & 12v for all non-DCC appliances so power supply will already be present.

This exact same arrangement was used on my slot car layout - minus fascia LEDs. It was able to reliably detect an 1-1/2" long HO slot car passing through the beam at hundreds of scale MPH. A lot of trial and err occurred when I fine tuned the capacitor value for that application (false triggering through the windshield past the commutator ring). I suspect slow moving trains should be much easier to dial in the cap value. I will of course build a small scale test setup before committing to full helix installation.

Alan

All the details:  http://www.LKOrailroad.com        Just the highlights:  MRH blog

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro
nsparent.png 

Reply 0
bear creek

Sensor height

Sensors mounted at mid-wheel height should certainly detect a wheel.

But, there is a good possibility that when a short train stops, none of the wheels are blocking a led/detector pair. How about raising the LED/detector height to be blocked by the floor of a car? Might be tricky getting an elevation that works with all car types...

I'd also lose the capacitors. If the LEDs are flickering then you know the train is in motion.

Charlie

Superintendent of nearly everything  ayco_hdr.jpg 

Reply 0
proto87stores

The cap is a timing issue, not a mounting one.

Sorry I wasn't clear the first time. The difference between the slot car lap counting single fast pulse and non flicker presence indication of multiple long pulses has to do with slugging the the sensor.

Any simple passive R-C timing circuit will take just as long to charge up as it does to discharge. So if you have a long time delay to indicate continued presence (no flicker) between sensing two slow moving truck "darks",  then it will take just as long to register going dark in the first place.  (and potentially miss a faster moving single car). Adding a diode, etc.,  to bypass the slow timing resistor can allow you to have a fast charge but a slow discharge.  Ditto for using an "edge triggered" device such as a 555 or some sort of binary circuit.

Andy

Reply 0
LKandO

Phototransistor = Photodiode?

Does the gate of the phototransistor not act as a diode forcing the cap to discharge through the current limited panel LED?

Alan

All the details:  http://www.LKOrailroad.com        Just the highlights:  MRH blog

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro
nsparent.png 

Reply 0
JRG1951

IR Detection Solution

Johnny,

An IR system may help eliminate false indications. Here are a few links,

http://www.mrollins.com/irled3.html

http://www.societyofrobots.com/schematics_infraredemitdet.shtml

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

Hope this is useful,

John

*************************************************************************************************************************************************

Football doesn't build character. It eliminates the weak ones.  Darrell Royal

BBA_LOGO.gif 

Reply 0
JohnnyUBoat

That's exactly what I'm

That's exactly what I'm aiming to do, thanks for the references, John.

I've been reading that if the sensors are placed at a 45 degree angle to the track that many of these issues being discussed can be avoided.  At 90 deg, the emitter/sensor would have to be precisely aimed at the frame, say, to avoid any "blank" spots.  Turning at a 45 degree angle, there is more railcar surface area to deal with, allowing for a [slightly] more accurate read.

-Johnny

-Johnny

Freelancing the Plainville, Pequabuck and North Litchfield Railroad

 

Reply 0
dfandrews

Height

It would seem that setting emitter/sensor height at midpoint of coupler mounting height would be ideal. Rolling stock frames are that same height, so the only cars that might give false indications might be depressed-center flats.

Don - CEO, MOW super.

Rincon Pacific Railroad, 1960.  - Admin.offices in Ventura County

HO scale std. gauge - interchanges with SP; serves the regional agriculture and oil industries

DCC-NCE, Rasp PI 3 connected to CMRI, JMRI -  ABS searchlight signals

Reply 0
proto87stores

On reflection

Since mounting angle has come up, It might be worth mentioning that using two open ended tubes in a "vee" pointing towards a spot at the same expected distance on the car surface is another useful method.

LED in one tube, photo detector in the other. Now you typically only get a signal if car reflects the LED light (IR or visible) beam back into the detector tube.  So it is fail safe as far as only generating a signal if the whole system is working. And it won't pick up reflections from the wrong distance. The Roomba robot uses it to safely detect the edge of the floor, at top edge of stairs, for example.

Andy

Reply 0
Reply