On Wed, 7 Oct 1998, Sean Breheny wrote: > Hi all, > > I have received an email in spanish from someone in Spain who monitors the > piclist, but is usually unable to ask questions because of the language > barrier. So, once again, I have translated the message into english and > will translate any relevant replies back to spanish for him. He is Jose > Antonio Gracia. > > 1. To mark the balls with colors and identify them. But this > system raises the price of the balls excessively, Why ? Dumping ping-pong balls into a vat of paint should not be a serious problem. After all, Easter Eggs pass this test every year. Ok, you need a different paint base, but it is the same idea. Getting 90 consistent nuances of color right, and consistent over time, is another matter. > 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. 90 combinations < 2^7 == at least 7+1 symbols to print. With ECC for such a $$$-related application, at least 12. For a RZ code, double that == 24. For ease of printing and detection, the symbols should be linear, binary, and not smaller than 0.5 mm each, giving a code area length of at least 12 mm, and probably as wide. You'd probably print more than one copy of it per ball. You have to think about the fact that printing anything on a ball shaped surface is a major challenge, even if it is a barcode (that can be printed by rotating the ball in front of the head, for example, together with a human-readable number, with an ink-jet printer). I can see some possibilities here, but the ball printer will be a major project imho. > Has someone done something with PICs and bar codes and can he help me? I have done a prototype barcode reader with a PIC 54 and a LM 324. It does not care about the barcode system used and has RS232 output. With the head I'd used it worked for bars down to 0.5 mm wide each, but 0.5-1 mm is a better idea. If you want to know more, please contact me privately. The reader is meant to be of the swiped wand type but it can be used with an auto-scanned unit. > I don't know how the scanner detects the bar code, nor whether it is > adaptable to a PIC, or I can position an LED with a phototransistor and > identify the code myself [without a premade scanner], provided that it can Not a good idea. Bar code reader heads are special. Almost none work 'from any position', excepting automatic conveyor belt packet sorters, which are a little bit over your budget I presume (they use 3 to 5 CCD cameras to look at a package from all 5 free sides and analyze the image for the barcode using a computer). Non-laser heads need to get very close to the object (0.5 cm and less), or use OCR-related technology and 2-dimensional raster scan CCDs (expen$ive like the conveyor system). > be in any position, for which I will probably need three detectors. imho start thinking about a channel, or tube, or through you drop the ball into, such that it moves in front of a sensor(s). Otherwise I can see problems that are not easily conquered. The other way is a laser scanning barcode reader and the operator holding the ball in front of it, or one of the expen$ive camera+image analysis methods. Peter