> Now, I am looking for a way to identify the ball which gets extracted[from >the randomized pot], which is shown on TV monitors (They are ping-pong balls). > I had thought of two possible forms of identification: > > 1. To mark the balls with colors and identify them. But this system raises >the price of the balls excessively, > > 2. - To put a bar code on them. This has many possibilities, but bar code >scanners >need a minimum size for the code which is very large for the available >space. Because of this, I was thinking of inventing my own code, since it >only needs 90 combinations. I've done barcode recognition, making up your own code is a BAD idea. It's not at all trivial to get something that works well in the real world. Substitution errors would be a disaster on wheels. You could adapt UPC/EAN or code 39 to this, but you have a bigger problem in that you need to orient the balls so that the reader can see the code. This could be done, but raises the cost again. Suppressed EAN is small, and you can actually shrink the code quite a bit and still read it, if your printing is accurate. Laser marking would be a good idea. Some sort of PC based image recognition ought to do well at simple jobs like "B9" printed in black on a ball, again though, it would need to be moderately well oriented. Offhand, I'm not coming up with anything that hugely workable, cheap, and that won't give you a horrible problem in altering the weight of the balls other than an optical mark like printing or barcoding. If the users would accept it, a microcontroller could eliminate the balls, and make the whole thing a non-problem. Although I've been flamed before for suggesting this, an alpha radiation source and detector enclosed in a metal box, would give you a provably random time between detected particles, and all you'd need then is a counter spinning away to say which "ball" is picked, and a list of previously picked "balls" to tell the randomizer to "pick again" when it comes up with the same number in a given set. Alpha emitters (like from a smoke detector) can't penetrate even a single sheet of paper, so I can't understand the very vocal objections I've seen to this approach. AFAIK, radioactive decay is still provably random, or at least very unlikely to be influenced by anything in the average bingo hall. Alpha particles are helium atoms with no electrons.