Summary: this article describes a practical barcode scanner hardware system design.
The scanner can quickly scan a one-dimensional or two-dimensional bar code, also has local display, store, information, external features such as wireless communications.Keyword: barcode; wireless transmission; mPSD3254BV SCM
In the modern industrial society to an information society, industrial economy to a knowledge economy development process, automatic identification technology is playing an increasingly important role.
The need to identify items, data scanning, information landing areas of the business, the use of automatic identification technology that can improve on the articles and related information management efficiency and reliability. Bar code data scanner is designed for this.This wireless scanner to SCM mPSD3254BV as core, through scanning subsystem can scan a one-dimensional or two-dimensional bar code, keyboard and display system user-friendly human-machine communication, wireless transmission module can be field-collected data is sent to the other device, while the scanner is able to store thousands of data information, the entire system uses lithium cell supply power inside, you can continuously work 40 hours, when collecting data exception status, the system automatically beep, vibrating alerts the user.
System structure is shown in Figure 1.
Figure 1 system architecture diagram
Hardware design
The system's main control chip selection SoC chip mPSD3254BV.
MPSD3200 MCU is ST company 51 kernel and PSD (programming system devices) modules grouped together in a typical SoC chips. It's a chip integrates 8052 kernel, expanded I/O port PA ~ PD, adds USB, I2C, PWM, ADC, and other features and two UART interfaces, also increased the PLD (PLD); at the same time, on-chip including two large-capacity FLASH memory blocks and SRAM, and according to the actual need to be configured as data storage or to use the program memory.Power supply module
Power supply module consists of two parts, 1AH lithium battery and power supply voltage chip MAX604.
MAX604 chip is a low dropout, low-power linear regulator that is used to guarantee the stability of the system operating voltage. Lithium battery with an increase in the use of time, the power will be gradually reduced, cannot effectively ensure system stability. Therefore in lithium battery back-end and a MAX604, voltage always stable at 3.3V.MAX604 chip OFF side, you can use to control whether output voltage regulator ICS.
When OFF-end on a high level "1", the module will have the output voltage when the OFF-side is the low level of "0", the module has no output voltage. The system uses this property to achieve the power switch and sleep wake up. Its hardware schematic diagram shown in Figure 2.
Figure 2 power control circuit
Charging module
Charging module is used in battery shortage, timely charging the battery.
Lithium battery parameters: normal voltage is lower than the voltage 3.6V 2.5V, is charging the battery, charging the highest voltage can reach 4.1V.
In the system to detect the battery voltage in real time, when the battery voltage is too low, timely alerts the user charge, to prevent the battery voltage is too low to damage the battery when it is used. This design uses the LM317 components constitute a constant current charging circuit, in the charging process real-time detection of battery voltage, when the battery is full, you can automatically cut off power supply to prevent over-charging without damage. Charging power supply switching MOS control, thereby avoiding the use of relay switch Sparks, the scanners meet the requirements of the explosion-proof design.Wireless data transfer modules
Wireless transmission module using STR-11 micro-power wireless data transfer modules.
The wireless module have received emission in one, small, peripheral devices, built-in antenna, can directly touches with serial MCU, etc., this scanner uses a TTL mPSD3200 microcontroller serial ports directly controlling the wireless transmission module, the module is in a sleep state, when the wireless transfer request, SCM uses an IO signals to activate it, responding to wireless transfer request.Bar code scanning module
System selection of barcode scanner is SE-923 II class laser scanning engine.
The scan engine is small, light and bright, the fastest scanning speed. The laser scanner scanning with low power consumption, high speed, high precision, automatic recognition, one-dimensional bar code Peugeot, etc.This scanner uses the mPSD3200 microcontroller using another TTL serial port communication directly with the scanning module, the user via the key to trigger the scanning, the scan module to a one-dimensional or two-dimensional code of information through the serial port to the microcontroller.
Scan module to scan was not successful when the microcontroller send error voice prompts; the long time without scanning, the scan module automatically hibernation to reduce power consumption.Keyboard input module
This scanner total design 28 press; mPSD3200 MCU PA, PB port is set to normal I/O interface to form a determinant keyboard matrix.
Will PA0 ~ 6 set to seven root column lines, PB0 ~ 3 to four rows of lines, and will set into logical input PA7. Use PA7 mouth to detect column line for keys pressed. When detected a key is pressed, the CPU applications interrupt PA7, specifically by the CPU to determine which key is. Specific electric circuit as shown in Figure 3.
Figure 3 the keyboard
Control circuitLCD display module
This scanner display LCD with the chip KS0741 chip itself since the belt-driven module, driver module and CPU interface with a serial or parallel two control modes, this scanner uses the parallel control.
The LCD power consumption is low operating current of only Ma-level. It can display text and picture, the LCD screen can display up to 816 characters. To display a variety of information for users.Alarm module
Alarm modules are mainly responsible for the sound and vibration of the scanner.
When the bar code scanner Scan end or when an error occurs, the scanner will give out the corresponding sound or vibration. Audible signal devices using piezoelectric buzzer, the buzzer with push-pull circuit driving, when loading a different frequency square wave, can make different sounds. Vibration device is the use of coin motor, the motor is driven by triode, when transistor breakover coin type motor vibration, resulting in a noisy environment through the scanner's vibration to prompt the user.Conclusion
This scanner system hardware design has passed the test, the scanner and the system software to run the program, you can achieve with barcode scanning, data wireless transmission, press ENTER, LCD display and alarm functions.
This scanner can not only thousands of pieces of information stored locally by wireless transmission or RS-232 serial port to communicate with the computer, facilitates user information data management requirements.
Reference documents:
1. the Golden City, Li collar, Ma Chao, mPSD32XX high-speed SOC51 SCM theory and application, Tsinghua University Press, 2005.1-52
2. Wu Shaojun, Liu Bin, practical and low-power design, telecommunications press 2003, 33-91
No comments:
Post a Comment