# Train Motion Detection for Enhanced Lighting and Smoke Control



## gunrunnerjohn (Nov 10, 2010)

I wanted an enhanced lighting package for my new GG-1 conversion to TMCC, so I came up with this little board. It senses that there is voltage on the motor(s) and trips a DPDT relay. This allows you to either switch things on for the train in motion, or switch things off, depending on what you're controlling and the effect you want to create.

I used it to implement Rule 17 lighting and automatic cab lighting for the GG-1, so one set of contacts were used to add in a parallel resistor to bring the headlights to full brightness, and the other set of contacts was used to break the cab light connection so the lights were off when the train is in motion.

The board is build in .1" prototype fiberglass stock and of course, hand-wired.










After testing, the entire board is encased in heat-shrink to protect it and keep it from shorting to anything. Snappable headers create nice compact connectors for the board.










Finally, the schematic for the board in case you'd like to duplicate it.


----------



## gunrunnerjohn (Nov 10, 2010)

I did some more work on this project and came up with an improved model, this is the one I'll probably get a PCB made for. The opto-coupler was changed to an AC model to eliminate the Schottky bridge, and the relay drive was changed to a MOSFET for quicker triggering. Also, the MOSFET has a drop-out delay of a bit over a second to keep the relay from chattering at low speeds. Bench tests seem to indicate this one is very robust and I think it's "done".


----------



## I Am Fasha (Apr 2, 2013)

What??? LOL Just kidding, this stuff is way over my head. I would love to understand it. I would like to have some kind of sensor to place in or near the track, so that when a train passes it, it trips a circuit to play a record message. Im still looking into this. Hats off to you are being able to make this work !


----------



## gunrunnerjohn (Nov 10, 2010)

A track sensor to play sounds would be easy. About $25 worth of parts, two pieces. The IR detection system and the sound module.


----------



## I Am Fasha (Apr 2, 2013)

Gun, I know nothing about this stuff, but Im willing to try it. Let me ask you two questions. How hard is it to record what you want played over the speaker and two, is there a website with info that you can point me to get these parts?


----------



## gunrunnerjohn (Nov 10, 2010)

Here's the Big Dawg Sound Modules.

Here's the IR Train Detector Module.

Program the Big Dawg module with pushbutton #1 for your custom sound, and connect the output relay of the IR detector across the pushbutton inputs. When the train goes by, the sound will play.


----------



## I Am Fasha (Apr 2, 2013)

Thanks Gun! I will look into these!


----------



## choochoo.72 (May 19, 2013)

Hi all I have been trying to do something very similar on my 3 rail 0 scale layout using Fastrak. What I am trying to d is either play a recording or ring a buzzer when a train passes a location. I have seen in the Fastrak catalog that there is a accessory activation piece. I know nothing about that. Can that do much the same thing and be substituted for the IR contact?
thanks


----------



## gunrunnerjohn (Nov 10, 2010)

You can use an insulated track for signal activation, but you do need to still cut rails with Fastrack, they don't provide insulated pins like tubular and other track styles.

For something like the sound module I posted, you'd need a relay triggered from track voltage with a diode and large capacitor to avoid chatter that would abort the recording.

Given those constraints, the IR sensor seems easier to do.


----------



## choochoo.72 (May 19, 2013)

Thanks, maybe the IR is the way to go. Does it mount directly on the track (between ties) or on the side of the track? How does that sound unit hook up? Are there spade or screw terminals for button 1?
thanks


gunrunnerjohn said:


> You can use an insulated track for signal activation, but you do need to still cut rails with Fastrack, they don't provide insulated pins like tubular and other track styles.
> 
> For something like the sound module I posted, you'd need a relay triggered from track voltage with a diode and large capacitor to avoid chatter that would abort the recording.
> 
> Given those constraints, the IR sensor seems easier to do.


----------



## gunrunnerjohn (Nov 10, 2010)

I put the IR sensors in a milepost along the tracks, the sensor and IR LED are stacked about 1/2" apart up the post. 

The sound module comes with small push-buttons on the inputs, just cut one off and connect the wires to the IR sensor. You will probably want to extend the wires from the button, but the sensor has screw terminals. Here's the IR module and the sound module. The sound module is powered by batteries, but I remove them and use a DC supply.


----------

