TMCnet News

Design and Implementation of Video Barcode Scanning Based on ARM [Sensors & Transducers (Canada)]
[April 22, 2014]

Design and Implementation of Video Barcode Scanning Based on ARM [Sensors & Transducers (Canada)]


(Sensors & Transducers (Canada) Via Acquire Media NewsEdge) Abstract: In view of the phenomenon of common infrared or laser scanning barcode in the market, a method of scanning barcode through the camera is proposed. The MB9F506 is used as the main control chip, whose kernel is the popular Cortex-M3 kernel. 30-megapixel digital image information of barcode is collected by using an OV7670 camera. This color image is changed into black and white image through binarization methods. The barcode is decoded by the barcode decoding algorithm. 4.3-inch liquid crystal display (LCD) screen with SSD1963 as the core chip is drive. Digital image of barcode and its value are respectively displayed on the LCD screen. The results prove that the system has some features such as simple operation, high stability, fast response, high technical content, widely application, and so on. Copyright © 2013 IFSA.



Keywords: ARM, Camera, Barcode.

1. Introduction At the present stage, the barcode scanning product is very much from the market procurement of barcode scanning devices [1-4]. It can be divided into three categories: handheld scanner, drum scanner and platform scanner based on the scanning device operation method. With the rapid development of embedded technology [5-15], because infrared or laser scanning barcode on the market at present is not convenient for each user input the commodity information in the hand, a method of scanning the barcode by the mobile phone camera is proposed. It changes barcode scanning mode from the current laser or infrared scanning into ordinary camera scanning, and can be embedded into any mobile phone with a camera. Thus, it is convenient for every user in commodity classification, management, and record. It can make everyone easy input each kind of commodity information, and has a broad development prospects in the field such as preventing fake and shoddy goods, combating smuggling, ensure food production date and shelf life, and so on.


2. The Overall Design of the System 2.1. The Overall Block Diagram of Hardware System The hardware of the system is divided into three modules: camera module, main control module and touch screen module. The relationship between each module is complicated. The overall block diagram of hardware system is shown in Fig. 1. The main control module is the core of the whole system. Because the designed system will be applied to the mobile phone terminal, the choice of MCU must be based on popular smart phone MCU to select. Cortex-M3 is one of the ARM processor series [16-24]. The ARM Cortex-M3 processor is the industry-leading 32-bit processor for highly deterministic real-time applications, delivering robust computational performance, exceptional system response to events while meeting the challenges of low dynamic and static power constraints. It is highly configurable enabling a wide range of implementations from those requiring memory protection and powerful trace technology to cost sensitive devices requiring minimal area. A broad range of devices include microcontrollers, automotive body systems, industrial control systems and wireless networking and sensors. It uses the Cortex-M3 core Fujitsu series MB9F506 which has abundant resources, fast speed, the cheap price, and so on. The camera module is based on the Omnivision OV7670 color camera [25].

The communication between master control module and each module can be seen from Fig. 1. Firstly, the main control module sends a command to the camera receive in order to receive image information. Secondly, after it receives the image information, the main control module sends a command and the image information to the touch screen module. Lastly, the touch screen receives the image information and displays it.

2.2. The Overall Block Diagram of the Software System The software of the system is divided into four parts: system operation, camera driver, touch screen driver and barcode decoding algorithm. The internal operations of every part is not visible, but a clear communication interfaces with other modules is leaved. The overall block diagram of software system is shown in Fig. 2.

The camera driver is responsible for the control of the camera operation. It sets various parameters of camera based on the command from system operation, and transfers effective video information to the barcode decoding algorithm. The touch screen driver is responsible for the control of the touch screen. It provides for touch screen hardware to display information based on the needs of the system operation and eventually accepts effective digital information from barcode decoding algorithm. Barcode decoding algorithm is responsible for transfer information from camera driving to effective digital information according to the barcode coding rules.

3. Schematic and PCB Design of the System 3.1. Schematic Design of the System The design of video barcode scanning lies in the ARM core board design, the LCD screen interface design, and camera interface design.MB9F506 has 120 pins in the ARM core board. The minimum system which only needs to configure the high-speed and low-speed oscillator can be normal operation. Of course, the normal filtering is essential. Because the information about the LCD screen and camera is more, the design of its interface and circuit does not go into details.

3.2. PCB Design of the System It is completely impossible to achieve function, if circuit boards are not made. Because the system is not super-100 M high-speed system, we use the Altium Designer software for PCB design. This software has some advantages such as simple operation, high production efficiency, high flexibility, and so on. The PCB design diagram is shown in Fig. 3.

4. The Software Design of the System 4.1. The Software Design of the LCD Module A 4.3-inch LCD screen is used whose resolution is 480*272 according to system requirement. The core control chip of LCD screen is the SSD1963 LCD. Writing LCD driver is important for LCD display. The underlying driver interfaces directly with hardware, so the operation such as initializing, drawing point, setting window, and so on is realized. While the top layer interfaces with application, the operation such as drawing line, drawing point, drawing circle, drawing button, and so on is realized. The basic operation is an assignment operator for a pixel point in the underlying operations. This assignment format of LCD pixels is RGB565 format. For example, pure red is 0xf800 in RGB565, and its (R,G,B) value is (255,0,0). We only need to program according to the timing requirements of SSD1963 by understand the single pixel assignment value method.

4.2. The Software Design of the Camera Module The camera driver need to reference the OV7670 read and write timing. MCU is allowed to read data from FIFO only completing the output of a frame data in the camera. When we read the data from FIFO each time, we must put the data pointer to 0 in the FIFO. Camera data read timing diagram is shown in Fig. 4.

VSYNC is frame synchronization data, whose falling edge represents the end of a frame output. WEN is write enable, whose high level represents allowing the camera to write data to the FIFO. OE is read enable, whose low level represents allowing ARM to write data to the FIFO. RRST is read reset, whose data pointer is back to 0 after the low level is more than one cycle. RCLK is read clock. ARM can determine the current reading data which is a pixel data according to the clock. D0-D7 is data bus. The length of read data every time is 8 bit. Two consecutive read data form the RGB565 information.

43. Barcode Decoding Algorithm We design barcode decoding algorithm based on the barcode encoding and the natural resources of the system. The decoding algorithm flow chart is shown in Fig. 5.

When the camera is at the barcode, we hold down the key. After ARM receives external trigger request key, ARM carries out barcode decoding program. Firstly, the 300 pixels are loaded into memory and binaries, and the binarization data is got. Secondly, the binarization data is analyzed and processed, and 95 barcode data is got. Lastly, the barcode data is decoded according to encoding rules. If it is right, the barcode is displayed in LCD. Otherwise, barcode pixels are regained by key, and the above operation is performed.

5. Combined Testing and Verification We combine all software modules. The whole system software flow chart shown in Fig. 6 is designed. We can write embedded software program based on the whole system software flow chart, and then test on the hardware. Lastly, the decoded correctly barcode value is shown in Fig. 7.

It can be seen clearly from the Fig. 6 that the demodulated number and the value of camera barcode are respectively 787040177893, 787115272959, 787121029714, 787121007002, 787509900048 and 787509900024. The results show that the system can decode the barcode.

6. Conclusion The design of the video barcode scanning can quickly and easily obtain barcode value. The value of the barcode can be shown when the barcode put the camera above. It provides another kind of quick and convenient way for the commodity barcode input. At the same time, the cost will be reduced further. The results prove that the system has some features such as simple operation, high stability, fast response, high technical content, widely application, and so on.

Acknowledgements This work was supported in part by a grant from the national college students' innovative entrepreneurial training program in 2012 (No. 201211664014), the scientific research project of Shaanxi provincial education department (No. 2010JK823 and 2012JK0493), the teaching reform project by Xi'an university of posts and telecommunications (No. JGC201116) and the scientific research foundation for young teachers by Xi'an University of posts and telecommunications (No. ZL2013-20 and ZL2013-21).

References [1]. C. S. Chen, A. C. Kot, H. J. Yang, A two-stage quality measure for mobile phone captured 2D barcode images, Pattern Recognition, Vol. 46, Issue 9,2013, pp. 2588-2598.

[2]. X. X. Song, Integrated RFID and barcode identification for information acquisition, Advanced Materials Research, Vol. 628,2013, pp. 253-259.

[3]. Y. Zhang, L. B. Qiao, Y. K. Ren et al., Two dimensional barcode-inspired automatic analysis for arrayed microfluidic immunoassays, Biomicrofluidics, Vol. 7, Issue 3,2013, pp. 110-121.

[4]. Q. Song, L. Liu, Research on key technology of 2D barcode in identity authentication, Applied Mechanics and Materials, Vol. 278-280,2013, pp. 1197-1200.

[5]. M. R. Narayanareddygari, R. K. Nagabhushan, M. C. Chandra et al., ARM cortex processor based closed loop servo motor position control system, Sensors & Transducers, Vol. 141, Issue 6, June 2012, pp.45-51.

[6]. Jin Ge Sang, Guo Li Yu, Ya Nan Wang, Jun Zhang, The design of temperature measuring system based on ARM, Applied Mechanics and Materials, Vol. 325-326, pp. 899-902.

[7]. N. M. Yayavaram, S. D. Rajan, V. Vardhan, ARM processor based multisensor system design for the measurement of environmental parameters, Sensors & Transducers, Vol. 136, Issue 1, January 2012, pp. 59-71.

[8]. W. Xiang, Design of location and tracking system for special crowd based on ARM, Advanced Materials Research, Vol. 662,2013, pp. 922-925.

[9]. K. Gan, X. W. Peng, Z. D. Zhao, Design of intelligent display meter based on ARM, Applied Mechanics and Materials, Vol. 241-244, 2013, pp. 525-528.

[10]. Zhen Yao, Zhong-Ning Guo; Yong-Jun Zhang, A new design of ultrasonic power based on ARM, Advanced Materials Research, Vol. 629, 2013, pp.671-675.

[11]. W. T. Xu, D. F. Yuan, J. L. Xu, Implementation of a network streaming media player based on ARM processor, in Proceedings of the Conference on Control Engineering and Communication Technology (ICCECT'2012), Shenyang, Liaoning, China, 7-9 December 2012, pp. 719-722.

[12]. G. S. Ma, X. B. Xia, Design of building energy consumption acquisition unit based on ARM processor, Advances in Mechanical and Electronic Engineering, Lecture Notes in Electrical Engineering, Vol. 177,2012, pp. 645-650.

[13]. J. Pattipati, C. M. Chakala, C. P. Kanchisamudram et al., ARM processor based embedded system for examination question paper leakage protection system, Sensors & Transducers, Vol. 141, Issue 6, June 2012, pp. 134-141.

[14]. P. Bagavathy, R. Dhaya, T. Devakumar, Real time car theft decline system using ARM processor, in Proceedings of the Conference on Advances in Recent Technologies in Communication and Computing (ARTCom' 2011), Bangalore, India, 14-15 September 2011, pp. 101-105.

[15]. D. Bull, S. Das, K. Shivashanka et al., A powerefficient 32 bit ARM processor using timing-error detection and correction for transient-error tolerance and adaptation to PVT variation, IEEE Journal of Solid-State Circuits, Vol. 46, Issue 1, 2011, pp. 18-31.

[16]. Z. Xu, Y. X. Tao, The design and realization of auto GPS navigation system based on ARM cortex-M3, Applied Mechanics and Materials, Vol. 182-183, 2012, pp. 655-659.

[17]. L. N. Roshanna, N. R. Konduru, R. P. Thommundru et al., Development of Ethernet based remote monitoring and controlling of MST radar transmitters using ARM cortex microcontroller, Sensors & Transducers, Vol. 148, Issue 1, January 2013, pp. 40-46.

[18]. S. Q. Hu, C. D. She, H. Yao, A vibration data acquisition system based on ICP sensor and cortexM3, Applied Mechanics and Materials, Vol. 303-306, 2013, pp. 1017-1020.

[19]. Y. P. Wang, H. H. Zhu, Y. Zhang, et al., Hardware design and research of intermittent pressure thrombotic treatment controller based on Cortex M3, Applied Mechanics and Materials, Vol. 170-173, 2012, pp. 3329-3333.

[20]. R. Sobti, G. Geetha, S. Anand, Performance comparison of Grestl, JH and BLAKE - SHA-3 final round candidate algorithms on ARM cortex M3 processor, in Proceedings of the Conference on Computing Sciences (ICCS' 2012), Phagwara, Punjab, India, 14-15 September 2012, pp. 220-224.

[21]. Q. Zhang, Z. Y. Chen, Y. B. Song, Transplant method and research of muC/OS-II on ARM cortexM3, in Proceedings of the Conference on Intelligent Computation Technology and Automation (ICICTA '2011), Shenzhen, Guangdong, China, 28-29 March 2011,pp. 546-548.

[22]. Y. P. Jiang, L. Wang, H. L. Zhang, et al., Research of roots flow meter based on ARM Cortex-M3, in Proceedings of the Conference on Consumer Electronics, Communications and Networks (CECNet'2011), XianNing, China, 16-18 April 2011, pp. 582-585.

[23]. L. J. Zhang, J. Chang, S. Z. Lv, Development of a tilt measurement system based on MEMS sensor and Cortex-M3, in Proceedings of the Conference on Electronic Measurement and Instruments (ICEMI'2011), Chengdu, China, 16-18 August 2011, pp. 139-142.

[24]. T. H. Won, H. C. Cho, S. J. Park, An omni-directional underwater acoustic modem based on cortex-M3, in Proceedings of the Conference on Embedded and Ubiquitous Computing (EUC'2011), Melbourne, Australia, 24-26 October 2011, pp. 433-437.

[25]. T. Mercè, F. Davinia, P. Tomás et al., An embedded real-time red peach detection system based on an OV7670 camera, arm Cortex-M4 processor and 3D look-up tables, Sensors (Switzerland), Vol. 12, Issue 10,2012, pp. 14129-14143.

1 G. H. LI,1 H. YANG,2 L. CHEN 1 College of Electronic Engineering, Xi'an University of Posts and Telecommunications, 710121, China Suzhou Raycan Technology Co., Ltd.

215163, China 1 Tel: +86-029-88166274, fax: +86-029-88166263 E-mail: [email protected] Received: 9 September 2013 /Accepted: 25 October 2013 /Published: 30 November 2013 (c) 2013 International Frequency Sensor Association

[ Back To TMCnet.com's Homepage ]