Lightweight identifiable Sensor/readers for model railroad

Hello, i am relatively new to Arduino.

I want to use it to build a new HO Scale model train of the things i would like to do is to replicated a 'hump freight yard'.

One of the things i need is some way to identify the 'train cars' as they move through the yard, to be able to set the switches down the road.

Ideally i want to identify each car individually, at the least i want to be able the type of car (box, gondola, hopper, flatbed, train).

I've been doing some googling, but i could not find a setup that would be useful for me, so i am looking for advise on what arduino parts could be usefull for this.

Restating Requirements: Need a small scannable/readable no energy item that can fit on an HO Rail Car/Train, that can be read by something that can fit inside an HO rail, or at least can be mounted in a way that would allow reading and moving of train cars.

Any suggestions would be appreciated.

Bar code on the underside of each car? RFID?

Yep, I would be looking at Bar Code or RFID. Those would be my first choices.


QR code may be better than bar code - same principle of course. More localised reading than RFID which on H0 scale can easily (also) read the car before and after.

Thanks! Ill look into those again. When i saw them before they looked rather large, but they may have some smaller versions i didint see yet ?

If I recall correctly something I read years ago, that's exactly how bar code started. They had a wide brush and narrow brush and painted huge stripes on the side of rolling stock.

(Wide and narrow here meaning 6" and 3" or whatever.)