Shop OBEX P1 Docs P2 Docs Learn Events
Barcode Scanner — Parallax Forums

Barcode Scanner

John BurrowJohn Burrow Posts: 27
edited 2008-07-21 20:59 in BASIC Stamp
I have a model railroad where a BS2P is·polling a network of RFID readers to detect locomotive movement.

I would like to add barcode reading. I have seen a system (manufactured by Z-Stuff) where a barcode is placed under a locomotive or freight car, and·is then read by a small sensor placed between the rails when the train passes by. This is the sensor http://www.z-stuff.net/DZ-1205.htm

I assume the sensor is reading the high and low light reflections from the white and black striped bar code.

Before I go off and go all the hard work, has anyone done this already? I'm starting from nowhere, so any information about the hardware would be useful.

Thanks, John Burrow

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-21 20:59
    Those look like simple reflective optosensors without any inherent decoding. So your Stamp will have to do the decoding for you. Since BASIC Stamps are single-task devices, you won't be able to monitor more than one sensor at a time. Properly configured, though, it may be easy to poll round-robin style for the beginning of a barcode, then decode whichever one has started.

    You might look at the "include.bs2" source code (attached below) for the Parallax Scribbler. It has a routine for reading simple serial barcodes that the bot passes over. For this kind of barcode reading to be successful, the locomotive will have to be moving at a fairly constant rate without stopping.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
Sign In or Register to comment.