The barcode based product classification system using arduino

54 0 0
The barcode based product classification system using arduino

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

THE BARCODEBASED PRODUCT CLASSIFICATION SYSTEM ABSTRACT With this product classification system project based on barcode, classifying products will become easier and more accurate, leading to a reduction in labor force within the factory. The GM65 scanner is used to recognize barcode types, send data to the ATmega328 microcontroller on the Arduino board to control the sensors and servo motors accurately to set up the products. Finally, the output data is displayed on the LCD screen for easy monitoring of the operation process. TABLE OF CONTENTS ACKNOWLEDGMENT II LIST OF FIGURE XI LIST OF TABLES XIII CHAPTER 1: OVERVIEW OF THE TOPIC 1 1.1 INTRODUCTION OF THE TOPIC: 1 1.2 RESEARCH PURPOSE: 1 1.3 RESEARCH OBJECT: 2 1.4 RESEARCH SCOPE: 2 1.5 EXPECTED RESULTS: 2 CHAPTER 2: THEORETICAL BASIS 3 2.1 OVERVIEW OF THE ARDUINO UNO CONTROLLER BOARD: 3 2.1.1 Introduction to Arduino Uno: 3 2.1.2 Arduino Uno R3 Structure and Hardware: 4 2.1.3 Pinout diagram of Arduino Uno R3: 5 2.1.4 Power supply: 5 2.1.5 IO Pins: 6 2.2 ARDUINO IDE SOFTWARE OVERVIEW: 8 2.3 GENERAL ABOUT BARCODES AND SCANNERS GM65: 8 2.3.1 Barcode concept: 8 2.3.2 Common types of barcodes: 9 2.3.3 How Barcode works: 13 2.3.4 Classification of barcode scanners and barcode recognition methods: 13 2.4 SERVO DC MOTOR OVERVIEW: 16 2.4.1 What is a servo motor? 16 2.4.2 Working principle of servo motor: 16 2.5 OPERATING PRINCIPLE OF INFRARED SENSORS: 18 CHAPTER 3: DESIGN AND CONSTRUCTION 19 3.1 THE BLOCK DIAGRAM OF THE SYSTEM: 19 3.1.1 Power Block: 19 3.1.2 Code Scan Block: 21 3.1.3 Processing block: 23 3.1.4 Sensor Block: 23 3.1.5 Motor Block: 24 3.1.6 Display block: 26 3.2 GENERAL PRINCIPLE DIAGRAM: 29 CHAPTER 4: PROCEED TO IMPLEMENT 30 4.1 SYSTEM OPERATION: 30 4.2 ALGORITHM FLOWCHART OF THE SYSTEM: 30 CHAPTER 5: EXPERIMENT 32 5.1 EXPERIMENTAL PROCESS: 32 5.1.1 Designing printed circuit: 32 5.1.2 Printed circuit construction: 33 5.1.3 Load the program and run the printed circuit: 35 5.2 EXPERIMENTAL RESULTS: 37 5.3 EXPERIMENTAL CONCLUSIONS: 38 CHAPTER 6: CONCLUSION 39 6.1 ADVANTAGES: 39 6.2 DISADVANTAGES: 39 6.3 DIRECTION OF DEVELOPMENT: 39 REFERENCES 41 APPENDIX 43 CHAPTER 1: OVERVIEW OF THE TOPIC 1.1 Introduction of the topic: Nowadays, our country is entering the era of industrialization and modernization, according to the trend of automation and rapid development. Therefore, it requires us to focus on improving and building production systems in order to reduce production costs, enhance labor productivity and produce highvalue products. It can be seen that product classification is a simple but essential requirement in factories, especially product classification based on various criteria to replace human labor. Product classification brings many benefits, such as replacing and reducing labor force, avoiding boredom at work, improving working conditions, creating opportunities to access advances in science and technology and working in a new and increasingly civilized environment. In addition, product classification helps to improve labor productivity, create a premise for reducing product costs, and quickly change product models. It also simplifies management and monitoring, as it not only changes the working conditions of workers but also minimizes the number of required workers. There have been many automated systems applied and implemented, all of which are relatively complex systems. With their knowledge and understanding of reality, they have undertaken the project The barcodebased product classification system. 1.2 Research purpose: The design consists of a product classification system tailored to the requirements of the production line, which uses The GM65 barcode reader module capable of scanning both 1D and 2D barcodes to input data into the central processing unit, the Arduino Uno microcontroller, to control two servo motors to properly sort the scanned product. 1.3 Research object: Understanding popular barcode standards: Understand popular barcode standards such as UPC, EAN, Code 128, Code 39, etc. to understand how products are identified and classified using these codes. Barcode reading technology: Learn about modern barcode reading technologies such as optical scanning, image sensing, RFID, etc. to increase reading speed and accuracy. Learn about capacitor components, voltage regulators, and ICs. Learn about GM65 barcode scanner. Learn about the Arduino Uno microcontroller, Atmega328 chip, and Arduino software. Learn about the sg90 servo motor and its operation. Learn how to connect and operate the LCD 1602 display. 1.4 Research scope: The device uses 12VDC power, used anywhere with small items that can be sorted. 1.5 Expected results: The system has the ability to read and process information stably when facing different situations such as scanning multiple barcodes in a short period or scanning different types of barcodes. It can classify three different types of products. The sensor and servo motor only operate when the correct product is detected. The display shows the barcode and the number of products that have been classified. CHAPTER 2: THEORETICAL BASIS 2.1 Overview of the Arduino Uno controller board: 2.1.1 Introduction to Arduino Uno: Arduino is an opensource platform used for building electronic projects and a microcontroller board used for programming to interact with hardware devices such as sensors, motors, lights, and many other devices. The highlight of Arduino is its extremely easytouse application development environment with a programming language that can be quickly learned, even by beginners in electronics and programming. Arduino is widely used globally and is increasingly proving its power through countless applications, unique systems of opensource community users. Arduino is opensource from hardware to software, with a very low cost. With a small amount of money, users can own an Arduino board with 20 IO ports that can interact and control about that many devices. Arduino has strengths over other microcontroller platforms, including: Runs on multiple platforms (programming can be done on different operating systems, including Windows, Mac OS, Linux on desktop, and Android on mobile). Simple and easytounderstand programming language; open platform, as it is developed based on opensource, allowing software to run on Arduino to be easily integrated on different platforms; hardware expansion is easy, as Arduino is designed and used as a module; it is simple, quick to assemble, program and use the device; easy to share, as people can easily share source code without worrying about the programming language or operating system they are using. Arduino has many eye catching applications, including 3D printers, robots, UAVS, interactive games, lighting controls and high speed photography triggers. Arduino Uno R3 microcontroller board is one of the most popular committees in the Arduino family. It was launched in 2011 and is the latest version of Arduinos board. This kit circuit is based on the ATMEGA328P microcontroller to control and operate the microcontroller. The United Nations Board is the first product in the series of boards used by USB for communication. Arduino has many notable applications, including 3D printers, robots, unmanned aerial vehicles (UAVs), interactive games, light controls, and highspeed photography triggers. The Arduino UNO R3 microcontroller board is one of the most popular in the Arduino family. It was introduced in 2011 and is the latest version 3 of the Arduino board. This kit circuit is based on the ATmega328P microcontroller to control and operate the microcontroller. The Uno board was the first product in the series of boards that used USB for communication. 2.1.2 Arduino Uno R3 Structure and Hardware: About Arduino, Arduino Uno R3 is the most popular version of Arduino. The United Nations version is a revised version 3 (R3), which is currently the latest version. Compared with the old version of Arduino Uno, accuracy and durability are much higher. Arduino Uno R3 is equipped with three types of 8 bit AVR microcontrollers, including Atmega8, Atmega168 and Atmega328. Table 2 1 Specifications of Arduino Uno R3 Operating voltage 5V (USB) Recommended operating voltage 6 to 9V Number of digital IO pins 14 pins ( 6 pins PWM) Number of analog IO pins 6 pins Maximum output current per pin IO 30 mA Maximum output current (5V) 500 mA Maximum output current (3.3V) 50 mA Flash memory 32KB (ATmega328) with 0.5KB used by bootloader SRAM 2 KB EEPROM 1 KB Operating frequency 16 MHz 2.1.3 Pinout diagram of Arduino Uno R3: Figure 2 1 Pinout diagram of Arduino Uno R3 An Arduino Uno R3 board consists of 20 input and output pins, of which 6 function pins are PWM inputs and 6 function pins are PWM inputs. 2.1.4 Power supply: Arduino Uno is powered with 5V through USB connection or external power supply. The external power source (not from USB) can be obtained from ACDC converter module or battery pack. To connect with converter module, we can plug a 2.1mm centerpositive plug into the power jack on the board. When using battery pack, the pack is connected between Vin and GND pins to supply power. Arduino Uno can operate with external power source from 6 to 20V. If using lower voltage, typically 7V, the 5V pin may supply less than 5V, but it may cause unstable operation. When using power source above 12V, the voltage regulator will become hot and may get damaged, therefore it is recommended to use power source from 7 to 12V. The energy pins are as follows: • Vin (Voltage Input): is where external power source is supplied to Arduino UNO (from 7V12V), we can supply power through Vin pin or via a power jack which is connected to this pin and the negative pole of the supply is connected to the GND pin. • GND (Ground): is the negative pole of the power supplied to Arduino UNO. When we use devices with separate power sources, their negative pins must be joined together. • 5V: is the output voltage supplied by Arduino UNO. The maximum current allowed on this pin is 500mA. • 3.3V: is the output voltage of 3.3V. The maximum current allowed on this pin is 50mA. • IOREF (Input Output Reference): is the operating voltage of the microcontroller on the Arduino UNO. It can be measured at this pin and is 5V. However, it is not used to supply power from this pin. • RESET: Pressing the Reset button on the board resets the microcontroller. It corresponds to connecting the RESET pin to GND via a resistor (10KΩ). 2.1.5 IO Pins: The Arduino UNO R3 kit has 14 digital pins that can be used as input or output pins by using functions such as pinMode(), digitalRead(), and digitalWrite(). They have only 2 voltage levels which are 0V and 5V, with a maximum inputoutput current of 40mA on each pin. Each pin has pullup resistors built into the ATmega328 microcontroller (these resistors are not connected by default). Some digital pins have special functions as follows: • 2 Serial pins: 0 (RX) and 1 (TX): used to send (TX) and receive (RX) TTL Serial data. Arduino Uno can communicate with other devices via these pins. Wireless serial connection, such as Bluetooth connection, is often referred to as wireless Serial. If serial communication is not needed, it is not necessary to use these pins. • PWM (Pulse Width Modulation) pins (~): 3, 5, 6, 9, 10, and 11: these pins allow you to output PWM with 8bit resolution (values from 0 to 255 corresponding to the voltage range of the pin from 0V to 5V) using analogWrite() function. In other words, you can adjust the output voltage of this pin from 0V to 5V, instead of just fixing it at 0V and 5V like other pins. • SPI (Serial Peripheral Interface) pins: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK): In addition to their normal functions, these 4 pins are also used to transmit data using the SPI protocol with other devices. • LED 13: there is a orange LED (with L label) on the Arduino UNO board. When you press the Reset button, you will see this LED flash as a signal. It is connected to pin 13. When this pin is used by the user, the LED will be turned on. • Arduino UNO has 6 analog pins (A0 to A5) that provide 10bit signal resolution (0 to 2101) to read voltage values ranging from 0V to 5V. With the AREF pin on the board, you can provide a reference voltage when using analog pins. That is, if you supply 2.5V to this pin, you can use the analog pins to measure voltage values from 0V to 2.5V with a resolution of 10bits. Particularly, Arduino UNO has 2 A4 (SDA) and A5 (SCL) pins that support I2CTWI communication with other devices. 2.2 Arduino IDE Software Overview: Arduino IDE stands for Arduino Integrated Development Environment, which is an opensource software environment primarily used to write code on a compiler similar to CC++ and load them into microcontroller boards. The programming environment is simple and easy to use, the programming language is easy to understand and based on the familiar CC++ platform for technical people. And importantly, the number of prewritten and shared code libraries by the open community is incredibly large. Figure 2 2 Interface of Arduino IDE 2.0.4 2.3 General about barcodes and scanners GM65: 2.3.1 Barcode concept:   Barcode (or also known as a barcode) is a method of storing and transmitting information using a symbol called a barcode symbology. A barcode symbology or simply barcode, is a symbol composed of a combination of straight bars and spaces that represent patterns of characters, symbols, and numeric digits. Variations in the widths of the bars and spaces represent data in the form of digits or characters that can be read by a machine. As an automatic identification technology, barcode allows for quick and accurate data collection.

THE BARCODE-BASED PRODUCT CLASSIFICATION SYSTEM ABSTRACT With this product classification system project based on barcode, classifying products will become easier and more accurate, leading to a reduction in labor force within the factory The GM65 scanner is used to recognize barcode types, send data to the ATmega328 microcontroller on the Arduino board to control the sensors and servo motors accurately to set up the products Finally, the output data is displayed on the LCD screen for easy monitoring of the operation process TABLE OF CONTENTS ACKNOWLEDGMENT II LIST OF FIGURE XI LIST OF TABLES XIII CHAPTER 1: OVERVIEW OF THE TOPIC 1 1.1 INTRODUCTION OF THE TOPIC: 1 1.2 RESEARCH PURPOSE: 1 1.3 RESEARCH OBJECT: 2 1.4 RESEARCH SCOPE: 2 1.5 EXPECTED RESULTS: 2 CHAPTER 2: THEORETICAL BASIS 3 2.1 OVERVIEW OF THE ARDUINO UNO - CONTROLLER BOARD: .3 2.1.1 Introduction to Arduino Uno: 3 2.1.2 Arduino Uno R3 - Structure and Hardware: 4 2.1.3 Pinout diagram of Arduino Uno R3: 5 2.1.4 Power supply: 5 2.1.5 I/O Pins: 6 2.2 ARDUINO IDE SOFTWARE OVERVIEW: 8 2.3 GENERAL ABOUT BARCODES AND SCANNERS GM65: 8 2.3.1 Barcode concept: 8 2.3.2 Common types of barcodes: 9 2.3.3 How Barcode works: 13 2.3.4 Classification of barcode scanners and barcode recognition methods: 13 2.4 SERVO DC MOTOR OVERVIEW: 16 2.4.1 What is a servo motor? 16 2.4.2 Working principle of servo motor: 16 2.5 OPERATING PRINCIPLE OF INFRARED SENSORS: .18 CHAPTER 3: DESIGN AND CONSTRUCTION 19 3.1 THE BLOCK DIAGRAM OF THE SYSTEM: 19 3.1.1 Power Block: 19 3.1.2 Code Scan Block: 21 3.1.3 Processing block: 23 3.1.4 Sensor Block: 23 3.1.5 Motor Block: 24 3.1.6 Display block: 26 3.2 GENERAL PRINCIPLE DIAGRAM: .29 CHAPTER 4: PROCEED TO IMPLEMENT 30 4.1 SYSTEM OPERATION: 30 4.2 ALGORITHM FLOWCHART OF THE SYSTEM: 30 CHAPTER 5: EXPERIMENT 32 5.1 EXPERIMENTAL PROCESS: 32 5.1.1 Designing printed circuit: .32 5.1.2 Printed circuit construction: 33 5.1.3 Load the program and run the printed circuit: .35 5.2 EXPERIMENTAL RESULTS: 37 5.3 EXPERIMENTAL CONCLUSIONS: 38 CHAPTER 6: CONCLUSION 39 6.1 ADVANTAGES: 39 6.2 DISADVANTAGES: 39 6.3 DIRECTION OF DEVELOPMENT: .39 REFERENCES .41 APPENDIX 43 LIST OF FIGURE Figure 2-1 Pinout diagram of Arduino Uno R3 .5 Figure 2-2 Interface of Arduino IDE 2.0.4 8 Figure 2-3 UPC barocde 10 Figure 2-4 EAN barcode 10 Figure 2-5 Code 39 10 Figure 2-6 Code 128 11 Figure 2-7 QR code .12 Figure 2-8 Matrix code 12 Figure 2-9 PDF417 barcode 12 Figure 2-10 How barcodes work 13 Figure 2-11 Structure of Laser Barcode Reader 15 Figure 2-12 The principle of reading barcodes 15 Figure 2-13 Working principle of servo motor 17 Figure 2-14 Operating principle of infrared sensors 18 Figure 3-1 The block diagram of the system 19 Figure 3-2 Specifications of IC 7805 .20 Figure 3-3 Power Block diagram 20 Figure 3-4 The GM65 barcode reader module .21 Figure 3-5 Processing Block 23 Figure 3-6 Infrared sensor .23 Figure 3-7 Wiring diagram for sensors 24 Figure 3-8 Servo motor 25 Figure 3-9 Wiring diagram of servo motors 25 Figure 3-10 LCD Screeen 26 Figure 3-11 Wiring diagram of LCD with arduino 28 Figure 3-12 General principle diagram 29 Figure 4-1 Algorithm flowchart of the system .31 Figure 5-1 PCB circuit 32 Figure 5-2 PCB circuit 33 Figure 5-3 Printing circuit into paper .33 Figure 5-4 Complete printed circuit .34 Figure 5-5 Circuit after attaching component pins 35 Figure 5-6 LCD displays .36 Figure 5-7 Completed system 37 LIST OF TABLES Table 2-1: Specifications of Arduino Uno R3 5 Table 3-1 specifications 20 Table 3-2 Specifications of GM65 barcode reader module 21 Table 3-3 Specifications of LCD 27 PROJECT OF EMBEDDED SYSTEM PAGE 1 CHAPTER 1: OVERVIEW OF THE TOPIC 1.1 Introduction of the topic: Nowadays, our country is entering the era of industrialization and modernization, according to the trend of automation and rapid development Therefore, it requires us to focus on improving and building production systems in order to reduce production costs, enhance labor productivity and produce high-value products It can be seen that product classification is a simple but essential requirement in factories, especially product classification based on various criteria to replace human labor Product classification brings many benefits, such as replacing and reducing labor force, avoiding boredom at work, improving working conditions, creating opportunities to access advances in science and technology and working in a new and increasingly civilized environment In addition, product classification helps to improve labor productivity, create a premise for reducing product costs, and quickly change product models It also simplifies management and monitoring, as it not only changes the working conditions of workers but also minimizes the number of required workers There have been many automated systems applied and implemented, all of which are relatively complex systems With their knowledge and understanding of reality, they have undertaken the project "The barcode-based product classification system" 1.2 Research purpose: The design consists of a product classification system tailored to the requirements of the production line, which uses The GM65 barcode reader module capable of scanning both 1D and 2D barcodes to input data into the central processing unit, the Arduino Uno microcontroller, to control two servo motors to properly sort the scanned product 1.3 Research object: THE BARCODE-BASED PRODUCT CLASSIFICATION SYSTEM PROJECT OF EMBEDDED SYSTEM PAGE 2 Understanding popular barcode standards: Understand popular barcode standards such as UPC, EAN, Code 128, Code 39, etc to understand how products are identified and classified using these codes Barcode reading technology: Learn about modern barcode reading technologies such as optical scanning, image sensing, RFID, etc to increase reading speed and accuracy Learn about capacitor components, voltage regulators, and ICs Learn about GM65 barcode scanner Learn about the Arduino Uno microcontroller, Atmega328 chip, and Arduino software Learn about the sg90 servo motor and its operation Learn how to connect and operate the LCD 1602 display 1.4 Research scope: The device uses 12VDC power, used anywhere with small items that can be sorted 1.5 Expected results: The system has the ability to read and process information stably when facing different situations such as scanning multiple barcodes in a short period or scanning different types of barcodes It can classify three different types of products The sensor and servo motor only operate when the correct product is detected The display shows the barcode and the number of products that have been classified CHAPTER 2: THEORETICAL BASIS 1.6 Overview of the Arduino Uno - controller board: 1.1.1 Introduction to Arduino Uno: THE BARCODE-BASED PRODUCT CLASSIFICATION SYSTEM PROJECT OF EMBEDDED SYSTEM PAGE 3 Arduino is an open-source platform used for building electronic projects and a microcontroller board used for programming to interact with hardware devices such as sensors, motors, lights, and many other devices The highlight of Arduino is its extremely easy-to-use application development environment with a programming language that can be quickly learned, even by beginners in electronics and programming Arduino is widely used globally and is increasingly proving its power through countless applications, unique systems of open-source community users Arduino is open-source from hardware to software, with a very low cost With a small amount of money, users can own an Arduino board with 20 I/O ports that can interact and control about that many devices Arduino has strengths over other microcontroller platforms, including: - Runs on multiple platforms (programming can be done on different operating systems, including Windows, Mac OS, Linux on desktop, and Android on mobile) - Simple and easy-to-understand programming language; open platform, as it is developed based on open-source, allowing software to run on Arduino to be easily integrated on different platforms; hardware expansion is easy, as Arduino is designed and used as a module; it is simple, quick to assemble, program and use the device; easy to share, as people can easily share source code without worrying about the programming language or operating system they are using Arduino has many eye -catching applications, including 3D printers, robots, UAVS, interactive games, lighting controls and high -speed photography triggers Arduino Uno R3 microcontroller board is one of the most popular committees in the Arduino family It was launched in 2011 and is the latest version of Arduino's board This kit circuit is based on the ATMEGA328P microcontroller to control and operate the microcontroller The United Nations Board is the first product in the series of boards used by USB for communication THE BARCODE-BASED PRODUCT CLASSIFICATION SYSTEM PROJECT OF EMBEDDED SYSTEM PAGE 4 Arduino has many notable applications, including 3D printers, robots, unmanned aerial vehicles (UAVs), interactive games, light controls, and high-speed photography triggers The Arduino UNO R3 microcontroller board is one of the most popular in the Arduino family It was introduced in 2011 and is the latest version 3 of the Arduino board This kit circuit is based on the ATmega328P microcontroller to control and operate the microcontroller The Uno board was the first product in the series of boards that used USB for communication 1.1.2 Arduino Uno R3 - Structure and Hardware: About Arduino, Arduino Uno R3 is the most popular version of Arduino The United Nations version is a revised version 3 (R3), which is currently the latest version Compared with the old version of Arduino Uno, accuracy and durability are much higher Arduino Uno R3 is equipped with three types of 8 -bit AVR microcontrollers, including Atmega8, Atmega168 and Atmega328 Table 2-1 Specifications of Arduino Uno R3 Operating voltage 5V (USB) Recommended operating voltage 6 to 9V Number of digital I/O pins 14 pins ( 6 pins PWM) Number of analog I/O pins 6 pins Maximum output current per pin I/O 30 mA Maximum output current (5V) 500 mA Maximum output current (3.3V) 50 mA 32KB (ATmega328) with Flash memory 0.5KB used by bootloader SRAM 2 KB EEPROM 1 KB Operating frequency 16 MHz THE BARCODE-BASED PRODUCT CLASSIFICATION SYSTEM

Ngày đăng: 26/03/2024, 11:56

Tài liệu cùng người dùng

Tài liệu liên quan