A simple method of identification - thoughts?

Hi all,

I'm building an Arduino-based system for my model railroad which needs to identify which locomotive is entering a certain area. Using DCC transponding isn't an option, and I'm having some trouble getting an RFID reader to work properly.

As such, I'm considering going with something simpler for locomotive identification. I have 8 locomotives, numbered 1-8, and won't be adding any additional ones. I was thinking that I could use just an LED and a LDR to detect them.

My plan is to have a number of aluminum tape strips on the underside of the locomotives, corresponding to that locomotive's number. At one point, under the track, I'll mount an LDR next to a bright white LED. The LDR will be connected to the Arduino, and will count how many reflections there are as the train goes past. This will give the loco number.

The only shortcomings I can see is that the light from the LED will spread out. I could mount it in some tubing, but that means I'd have to have at least 3mm between the strips, which could be difficult on some of the locos.

Could this possibly work?

Cheers,
Tbdanny

A reflective IR sensor could work for a course bar code.
http://www.seeedstudio.com/wiki/Grove_-_Infrared_Reflective_Sensor
Leo..

Tbdanny:
Hi all,

I'm building an Arduino-based system for my model railroad which needs to identify which locomotive is entering a certain area. Using DCC transponding isn't an option, and I'm having some trouble getting an RFID reader to work properly.

What gauge are you working in?
In how many places on your layout will you need to detect which loco is passing?
Does the detection system have to be 'invisible' or can visible light be used (e.g. in a tunnel or fiddle yard?).
I presume that you're using a variable 12V DC supply to drive your trains, as you've ruled out DCC. Is that correct?
I've an easy, invisible, system that can detect and identify up to 6 locos (maybe more) in OO/HO and up to 8 (maybe more) in O gauge, depending on the length (including tender) of the locos.

Hi
A thought, use a photo-transistor in the track, under the loco have an LED flashing.
The LED flashes/pause/flashes/pause etc.
The number of flashes represents that loco's number.

The reason for a photo-transistor is to get the response time for flash frequency that may be needed to cater of loco speed over the photo-transistor.

Or your idea, but with photo-transistor, as Wawa has suggested, LDR will not have fast enough response.

Tom.... :slight_smile:
I say keep the ideas coming, something will eventually suit your situation.

Henry_Best:
What gauge are you working in?
In how many places on your layout will you need to detect which loco is passing?
Does the detection system have to be 'invisible' or can visible light be used (e.g. in a tunnel or fiddle yard?).
I presume that you're using a variable 12V DC supply to drive your trains, as you've ruled out DCC. Is that correct?
I've an easy, invisible, system that can detect and identify up to 6 locos (maybe more) in OO/HO and up to 8 (maybe more) in O gauge, depending on the length (including tender) of the locos.

I'm working in On30, and the models are DCC operated. It's just that the decoders in them aren't capable of DCC transponding.

As for the detection system, it's for the staging yard behind my backdrop, so it doesn't matter if the light is invisible or not.

I am thinking of building a (small) PC controlled model railway. I reckon it will be possible for the PC to know which loco is where simply by inferring from the commands it has given (and assuming I tell it where everything is at the start of operations). I just plan to put LDRs below the track to identify that a train has "arrived" at that point.

In other words, if the green tank loco is at location A and it is commanded to go to location H it is reasonable to assume that when a loco is detected at H it is actually the green tank loco.

...R

you can use ldr on one side of track and flash light on the other side, if loco passes through it then the flash light will not falls on ldr then program it for increment the value in this condition then at final u can get total value of locos passed through the track.