Re: Barcodes & error detection

Rob Antonishen <[email protected]>
Newsgroups gmane.comp.hardware.lego.robotics
Organization None
Message-ID <[email protected]>
On 9/7/05, Brian Davis wrote:

>    To increase reliability I wanted to add error-detection. Suggestions? Right
> now the codes are made of bits (black=1 white=0) with each bit preceeded by a
> highly reflective strip (reflective thin tape used to repair flexible ducts -
> great stuff, especially if they'd ever produce it without printing). Since
> each
> bit is preceeded by a reflective flag, I can use variable length 'words' (i.e.
> -
> '0' is distinguishable from '00').
>    It turns out the errors seem to only be of the form of a '1' (black)
> mistakenly read as a '0' (white). Currently I can check by making sure any
> code
> read has "even parity" (an even number of '1's), and not using the odd parity
> codes. But that means of the 30 codes it can currently read (up to 4 bits
> long)
> I can only use 15 (the even parity ones).

One suggestion that may improve your reliability is to use colour
transitions rather than just colours.  This would mean, however, that
you would need more strips.

For example, if you currently represent B=0 and W=1 your barcode for
0110 would look like:
|B|W|W|B (using | to represent the reflective strip)

Change this logic to be a BW transition=0 and a WB transition=1, the
same 0110 would be:
|BW|WB|WB|BW

An alternate approach would be to use two light sensors and alternate
the colours in parallel:

S1 - |B|W|W|B
S2 - |W|B|B|W

(hopefully those align)  This would then be a comparison of S1>S2 = 0,
S1<S2 = 1.

Just shooting from the hip...don't know if either of these would
improve the light sensor accuracy.

-Rob A>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.