19 April, 2010

Barcodes

Abstract
This paper is about the use of barcodes, how they are used in today's world of stock control at the point of purchase and their relative advantages over more conventional methods of storing information. Bar coding by its very nature demonstrates the versatility of digitally encoded systems as opposed to their analogue counterparts including their in-build ability to allow error correction on the fly. I will go through in detail, a variety of different types of barcode, both linear and two dimensional as well as talking about the origins of the different barcode systems, how they are read, and how they work.

 1.         Introduction
Barcodes are the series of black lines and white spaces printed on product packages or attached as tags which you would have noticed on consumer products. Information on a product or a consignment like its item code or serial number, expiry date, consignor/consignee etc. can be represented through such barcodes. When these barcodes are scanned using a scanner, it enables instantaneous data capture with 100% accuracy and at great speeds.

2.          What is a barcode?

A barcode is data that is machine readable, yet it is usually nothing more than blobs of ink on a sheet of paper. A scanning device compares the blobs of ink to the background, and converts that into a series of 1s and 0s, a binary code, to read the data. The barcode was patented in 1952 by Joseph Woodland and Bernard Silver, originally created to identify railway carriages, and became commercially used in 1966, but only became popular in the 1980's.


Today linear barcodes are mainly used to identify products in supermarkets. Originally, they could only hold numerical data, but later they were developed to store any ASCII (American Standard Code for Information Interchange) character.
Figure 1. Code 128 Barcode.
The above image shows a CODE128 Linear barcode, if scanned, it should decode and print the message “This is a Barcode!”  
In this paper, I hope to investigate the different types of barcode, and their benefits in the information age. Barcodes are essentially another way of inputting data into a computer system, when used in supermarkets; the code is usually a reference to a product stored on a database. The scanning system itself saves the user having to type in a 12 digit product code every time they sell an item. The database would then send back the data of what the item is, and how much it costs, almost instantly.


Another set of barcodes are 2D (2-Dimensional), this means instead of long “bars” of code, the data is made up of dots. This naturally means one can store a lot more information in a smaller space.
Figure 2. QR Code
The above Figure 2 is an example of a 2D barcode, known as QR Code, (when this one is scanned, it should output: “This is a 2D barcode system known as QR Code”), I will be looking more into different types of barcodes later on, including a more in depth explanation of both CODE128 and QR Code.


Barcodes can be used to track items, a barcode would be placed on the item, and when it reaches destinations, it can be checked with a database for information like, where it's come from, where it's supposed to go, when it was sent. The same sort of system can be used to sort documents too, a user could encode data like, what category a certain document would be filed under, and then when scanned, the user would be told where the selected document should be filed.

3.         Why do you need bar coding?

Bar coding can have a significant impact on the timely and accurate capture of product information and its communication electronically across the supply chain ahead of physical product flow is critical to lowering inventory costs. Bar coding not only facilitates the exchange of information between buyers and sellers, but also provides the potential for better visibility and sharing of information across an entire Supply Chain.


4.         Reading a barcode

There are a variety of ways of reading barcodes:
·         CCD Scanners – A CCD (Charge-Coupled Device) is at the heart of this system. The scanner is essentially just a miniature camera (like the ones found in most camera Mobile phones), that will simply look for light and dark patches and recognise it as a barcode, it will then de-code what is written in the barcode and sent it to the target machine. For them to work, the scanner needs to be quite close and needs a good light source.
·         Laser Scanners – This time, a laser provides the light, and a set of mirrors or prism deflects the returning light to the sensor (a photo diode). Laser is an acronym for “Light Amplification by Stimulated Emission of Radiation” and is a device that emits a bright light at a specific wavelength.
·         Camera based Scanner – This is almost like a CCD scanner, only usually the target machine has the software to decode the code.
 None of these examples can be classed as “the best” way to scan a barcode, as the different kinds of code and where they are found can be a factor, for instance, U.P.C.'s (the barcode that's used by supermarkets to track products) are better scanned with laser readers.

5.         Digital Data

Data on barcodes are digital, meaning that the information is either “on” or “off”, this is known as binary data. “On” is usually represented by the number 1, whilst “off” is usually 0. When printed, each bit marked as “1” would be printed as a black dot; whitest “0” would be a white dot. Some systems are able to tell when the images is inverted, this means in some cases, if the barcode system knows what is representing a 1 and a 0, it should be able to decode it regardless.
The advantage of using a digital system over an analogue system (I.e. Using a high density barcode to archive a picture, than scanning a photograph) is when the barcode is decoded; it will be an exact (1:1) copy of the original file that used before being encoded. The analogue version is susceptible to dust, dirt and “noise”. The down side is that the digital version is limited as to its size, and compression, so the quality is never as good as its analogue equivalent.
This can be compared to a Compact Disc (CD) and a Vinyl Record, whilst a Vinyl has almost an infinite range of frequencies, CDs can only reach a maximum of 22.05 kHz. per channel. The downside to vinyl (or any analogue standard) is that any small blemishes, can still be heard (pops, crackles, hiss, etc.)
But the main advantage of the digital technology is that it is far more resistant to background noise, as there are only supposed to be two signals (black and white), in this case, noise can be filtered out with a threshold filter.

6.         Linear Types of Barcode

6.1     U.P.C. (Universal Product Code)

This is by far the most common type of barcode, used in almost every supermarket, book store, music shop, or anywhere that sells stuff using bills.
Figure 3. UPCA Barcode.
Above is a UPC-A barcode, used in most stores, if the above is scanned, the output should be “012345678905”, the leading 0 and the end 5 represent the “quiet zones” (and are shown outside the barcode to let a human know where these quiet zones are) which are needed for a scanner to read UPC-A codes correctly as it tells the scanner where the beginning and the end of the barcode is.
12 Digits are encoded into a UPC barcode, these can only be numbers. The start and end patterns take the form of 101 (three bits of binary data), and a middle section 01010 (five bits), this and 12 digits at seven bits each total 95 bits in each barcode.
Below is a table showing exactly what each decimal number represents. 


Digit
Pattern
0
0001101
1
0011001
2
0010011
3
0111101
4
0100011
5
0110001
6
0101111
7
0111011
8
0110111
9
0001011
Table 1. Digit pattern for UPCA Barcodes.
As you can see, there are a lot of unused codes, seven bits could be used to encode up to 128 characters.


6.2     CODE 128

This barcode is a little different to the UPC we saw above, this time, instead of being limited to the digits 0-9, CODE 128 can encode any one of the 128 characters in the ASCII (American Standard Code for Information Interchange) system, and is able to store up to 128 characters on one code. This is where the 128 in the name comes from. If the above example is scanned, it should output “CODE128 Barcode” and is able of encoding 2 characters in the space of one, making it “double density”
Figure 4. A CODE 128 barcode.

6.3     ITF (Interleaved Two of Five)

The Interleaved 2 of 5 (or ITF) is a numeric only symbology that is relatively compact because information is encoded in both spaces and bars.
ITF code was developed from an earlier symbology called simply Code 2 of 5. Code 2 of 5 is numeric and has bars which can be wide or narrow. Spaces carried no information, and therefore their width was not critical.
The Interleaved two of five symbology was suggested as a way of shortening the length of the code by using the spaces to carry information. Data is encoded in pairs of digits with the bars representing the first character of a pair and the spaces representing the second character.
Figure 5. ITFI Barcode and encoded data
The ratio of narrow bar width to wide bar width can be between 2:1 and 3:1 but in the UPC and EAN specifications for 14 digit shipping (or traded unit) symbols it is fixed at 2.5:1 and this has become the norm.
Interleaved 2 of 5 was chosen for the standard outer carton bar code because it's printed tolerances are sufficient for the highly variable printing techniques used for corrugated cartons.


6.4     MSI (Modified Plessey)

MSI is also known as “Modified Plessey” based on the original Plessey standard, this kind of code only supports numerical data. It is mainly used in warehouses.
Figure 6. MSI Barcode and encoded data
Other linear barcode systems include:
Codabar: Early barcode system that was designed to be easily printable by dot-matrix printers
Code 93: Similar to Code 128, but only supports 93 Characters (made in 1982)
Plessey: Only able to display Hexadecimal numbers (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)

7.         Two Dimension Barcode Types

7.1     Data Matrix

The figure 8 below is an example of a Data Matrix code, (when this one is scanned, it reads “This is an example of a Data Matrix code!”) they can encode as little as a few byes, to up to 2kB (2 Kilobytes). When there is too much data encoded in one symbol, more are added, there is always a square number of symbols
Figure 7. A Data Matrix code
Data Matrix is a free standard, but there is no free documentation that explains how it works. It is often used for digitally summarizing documents, and product information on labels. It is often seen on the back of computer products containing its serial number.


7.2     QR Code:

QR Code is a popular barcode in Japan; it is mainly used for storing URLs for mobile website. It is also used for storing text data to read later, McDonald's (Japan) have started using it to display the nutritional information in their foods. Most modern mobile phones have applications to read both Data Matrix, and QR Code
Figure 8. Example of QR Code
The QR code reads “This is a QR Code, QR stands for Quick Response.” QR was originally used in tracking parts for vehicle manufacturing, but is now used widely across Japan, in magazines (instead of putting URLs to websites that could be mistyped), on signs and business cards (to give more information).
Different sections of a QR Code are reserved for the encoding system itself: The Sections in YELLOW represent the version information, whilst the bits in RED represent the format. The BLUE parts are the timing code. The small GREY block is an alignment section whilst the bigger GREY blocks are position.
Figure 9. QR Code Sections

 

7.3     High Capacity Colour Barcode

The High Capacity Color Barcode is a system designed by Microsoft, because colour is also a factor in the reading of the barcode, more data can be compressed into a smaller space. An 8 bit (1 byte) sample, usually taking up 8 symbols, now can be compressed into 2.66 symbols. The format achieves this by using a different barcode symbol shape in combination with multiple colors per symbol.
Figure 10. High capacity colour barcodes
The High Capacity Color Barcode format takes advantage of advanced computer imaging devices along with processing power to enable higher density storage of data on analog printed media. Currently laboratory tests have yielded using eight colors, 2,000 binary bytes, or 3,500 alphabetical characters per square inch in its highest density form using a 600dpi business card scanner. This equates to two pages of a novel. The symbol size can be changed to accommodate the differing fidelities of imaging devices. The barcode can be printed using a regular inkjet or laser jet printer.


8.         Benefits of Bar-coding

Bar-coding gives a global standard for the unambiguous physical identification of products, consignments, locations etc. It gives the supplementary information (such as batch number, date, measurements etc.) along with a product identification code. It represents a standardized business messages for Electronic Data Interchange and Electronic Commerce for sharing information between supply chain trading partners.


8.1     Other benefits

·         Automated data capture with 100% accuracy
·         Real time stock management of raw materials and finished goods
·         Fast and error free data recording on product/consignment movement
·         Easy integration with existing software, if any
·         In compliance with growing requirements of leading national markets
·         In line with requirements of international retailers
·         Also gives international look and feel
Reduced size barcodes and radio barcodes are being developed, which will allow one to attach a barcode to a smaller item, and allow it to be scanned from a distance.

9.          References


1 comment:

  1. Mr.Deepak your link is very useful for the business people and it field personal s. you shared your deep knowledge of IT with the blogers in the easy way.
    that is deepak deepam veLicham......you lighted your torch to the IT beginners and professionals.
    very good ...congrats

    ReplyDelete