Go Down

Topic: Simplest and cheapest way to make a simple barcode reader? (Read 12546 times) previous topic - next topic

SPlatten

Hi, I'm very new to Arduino, just received my Arduino UNO 3 today.  I am an experience software developer and also enjoy developing software in my spare time. 

One of my hobbies is slot car racing.  I would like to use the Arduino to develop a slot racing timing system that could be used for both Analogue and Digital systems without modification.  The idea is to put a simple barcode sticker on the underside of each car.  A sensor/reader/scanner would be installed in the track for each lane at e Gantry.  The cars would be scanned as they lap, because it's reading the code, it doesn't matter which lane the cars are in, the system will keep track of them.

I'm not an electronics wizard, my knowledge of software and languages is very good, where as my knowledge of electronics is probably the exact opposite.  It has been suggested to me that using a laser diode from a dvd reader would be a good starting point as DVDs are read very quickly, likewise the cars will need to be scanned very quickly.  I've search the net for some reference material, but couldn't find anything useful.

Can anyone help me to interface a laser diode to the Arduino UNO 3?  One per lane.

Thank you,

Sy
Kind Regards,
Sy

EWo_ge

Hi -
I think it should be doable.
I suggest you use reflex light sensors in order to pick up the barcode. Since the car is in motion it should not be too difficult to pick up a pattern of bright and dark stripes.
In your program you probably would have to make a "normalization" in order to compensate for the differences in speed.
Are you bound to real barcodes at all?
Otherwise you could just print little stickers with a number of black stripes and put those to the underside of your cars. Then you simply would have to count them...

Good luck with your project,
EWo

SPlatten

Hi, thanks for the reply, no I'm not bound to any standard, and since I only need up to 16 different codes, it shouldn't be to difficult to come up with something.  Thanks again, will see how I get on, going shopping for components tomorrow.
Kind Regards,
Sy

SPlatten

Can you suggest a partno. or retailler?  My searches have only shown up very expensive components, I'm looking for something very cheap.
Kind Regards,
Sy

keeper63


Hi -
I think it should be doable.
I suggest you use reflex light sensors in order to pick up the barcode. Since the car is in motion it should not be too difficult to pick up a pattern of bright and dark stripes.


What you mean is a "reflective light sensor" (I know English is not likely your main language - so no biggie - but the OP might be looking this stuff up in google, and having the right term will help). Basically, a photodiode/phototransistor and IR LED pair pointing "up" toward the bottom of the car, spaced somewhat closely together, so that the sensor (photodiode/transistor) can see the reflection from the IR LED.


In your program you probably would have to make a "normalization" in order to compensate for the differences in speed.
Are you bound to real barcodes at all?
Otherwise you could just print little stickers with a number of black stripes and put those to the underside of your cars. Then you simply would have to count them...


I think this is a good suggestion, if viable for the project; there is also a number of other possible issues to keep in mind:

1) Speed of the cars vs speed of reading - you might want to use an interrupt for the detection of the light/dark areas
2) You might want/need wide spacing of the areas
3) Speed of the photodiode/phototransistor might be an issue - get the one with the fastest transition (light to dark to light) state speed you can afford
4) Make sure you match up the wavelength of the IR LED with the photodiode/phototransistor - your LED should have an output as close to the "peak" wavelength of the detector as possible

One thing about this project - if it works out - you could even judge the speed of the cars, based on how fast they pass the sensors...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

SPlatten

Kind Regards,
Sy

SPlatten

Kind Regards,
Sy

EWo_ge

The working distance of 1-5 mm could be an issue, depending on the design of the cars...

SPlatten

I couldnt see a rise and fall time...though I did see a max distance of 12mm
Kind Regards,
Sy

fburg


Dear all,

here's a newbie question with regard to this question. We plan to read a code as described in this thread with the OSRAM SFH9202. The code would be moved manually along the receiver, i.e. we can't determine or control the speed of the movement. We are looking to encode number in the range of 1 ... 1.000.000.
My question is, can we use a third color other than black and white (e.g. 50% black) and use the black as a separator, and white and grey as the code information, like in the attached picture. This would encode "01101000" or 22. Would that work with this sensor? Are there better approaches to solve this challenge?

Thanks and regards,
Florian

apepper

Is this working for reading barcodes? I tried with a TRCT5000 and it was far too coarse; it spots a piece of paper, but not the individual stripes - how are you getting on with the Osram part?

Go Up