Waveshare Barcode Scanner Module User manual

Barcode Scanner Module User Manual
1/ 57 Rev1.0 Date:180621
Barcode Scanner Module
User Manual
OVERVIEW
This is a small 1D/2D codes reader, by using the intelligent image recognition
algorithm, it will decode the barcode or 2D code on paper or screen, fast and
accurately.
Through the onboard USB and UART interface, it can be directly plugged into a
computer, or be easily integrated to kinds of devices due to its small form factor.
FEATURES
⚫Easy to use, requires no knowledges of image recognition
⚫Decodes various common 1D/2D codes such as Barcode, QR code etc.
⚫Onboard micro USB and UART serial port, allows to connect with computers or
embedded devices
⚫Configurable via scanning 'configuration code'
⚫Onboard light source, works in the dark

Barcode Scanner Module User Manual
2/ 57 Rev1.0 Date:180621
SPECIFICATIONS
Operating voltage
5V
Operating current
135mA
Standby current
58mA
Sleep current
2mA
Operating temperature
0℃~60℃
Operating Humidity
5%~95%(Non-condensing)
Interfaces
UART、USB
Light source
White
Scan angle
Tilt 360°,Skew ±65°,Pitch ±60°
FOV
28°(Horizontal),21.5°(Vertical)
Dimension
53.3mm × 21.4mm

Barcode Scanner Module User Manual
3/ 57 Rev1.0 Date:180621
CONTENT
Overview....................................................................................................................................................... 1
Features................................................................................................................................................ 1
Specifications ..................................................................................................................................... 2
Support barcodes ..................................................................................................................................... 5
Scanning Instructions .............................................................................................................................. 6
Scanning Area.................................................................................................................................... 6
Scanning Way .................................................................................................................................... 7
Setting Instruction .................................................................................................................................... 9
Hardware connection...................................................................................................................... 9
Setting Codes..................................................................................................................................... 9
Setting code ............................................................................................................................... 9
Restore Factory Setting........................................................................................................10
Users Default Setting.....................................................................................................................11
UART Communication ..........................................................................................................11
USB Communication .............................................................................................................12
Scanning Mode .......................................................................................................................13

Barcode Scanner Module User Manual
4/ 57 Rev1.0 Date:180621
Lighting and Targeting.........................................................................................................18
Ouput indication.....................................................................................................................19
Data Edit ....................................................................................................................................23
Barcode types Enable/Diable .............................................................................................34
Appendix A: Default setting table ....................................................................................45
Appendix B: Common UART command .........................................................................47
Appendix C: CODE ID List....................................................................................................48
Appendix D: ASCII table.......................................................................................................49
Appendix E: Data Code.........................................................................................................55
Appendix F: Save and Remove ..........................................................................................57

Barcode Scanner Module User Manual
5/ 57 Rev1.0 Date:180621
SUPPORT BARCODES
Barcode
Support
Support(Factory)
Codabar
✓
✓
Code 11
✓
×
Code 39/Code 93
✓
✓
UPC/EAN
✓
✓
Code 128/EAN128
✓
✓
Interleaved 2 of 5
✓
×
Matrix 2 of 5
✓
×
MSI Code
✓
×
Industrial 2 of 5
✓
×
GS1 Databar
✓
✓
QR code
✓
✓
Data Matrix
✓
✓
PDF417
✓
✓

Barcode Scanner Module User Manual
6/ 57 Rev1.0 Date:180621
SCANNING INSTRUCTIONS
SCANNING AREA
Scanning distance: These values are all be measured indoor (250 lux)
Barcode
Density
Min
Max
Code 39
0.125 mm
(5 mils)
6.0 cm
11.0 cm
0.375mm
(15 mils)
6.0 cm
25.0cm
UPC/EAN
0.375mm
(15 mils)
6.0 cm
25.0cm
Code93
0.254mm
(10 mils)
6.0 cm
21.0cm
The min distance is based on the length of barcode and the scanning angle.

Barcode Scanner Module User Manual
7/ 57 Rev1.0 Date:180621
If you want to house the scanner with window, please note that:
⚫The window should be colorless
⚫Check the surface of window carefully, make sure they are clean, smooth and have
not scratch.
⚫Let the windows cave in the case
⚫Paralleling window with scanner without skew. If you locate the window
improperly, it will down the scanning performance.
⚫The window should close to and be in front of the scanner reader (don’t touch)
The distance between window and scanner protect the scanner from drop and crash.
SCANNING WAY
While using the Barcode Scanner Module to scan 1D/2D barcodes, it allows
some tilt, skew and pitch. However, you had better to reduce them for better and
faster scanning result.
Tilt
You must keep the barcode inside the
area of white light. If the barcode is inside the
scanning area, the tilt angle could be 360°. To
improve the scanning rate, recommend to
keep vertical scanning.

Barcode Scanner Module User Manual
8/ 57 Rev1.0 Date:180621
Skew
Skew will reduce the width and space of barcode (scanned), it is the threshold
dimension of high density barcode. It supports up to 65°. However, you’d better
reduce the skew for better and faster scanning.
Pitch
Pitch will decrease the height of barcode. 2° to 3° is the best scanning angle,
which could avoid the direct reflection of barcode. Barcode Scanner Module supports
up to 60° pitch angle. But you should reduce it for better and faster scanning.

Barcode Scanner Module User Manual
9/ 57 Rev1.0 Date:180621
SETTING INSTRUCTION
Setting commands are provided, you could refer to this chapter to configure the
Barcode Scanner Module. The factory setting could meet the requirement of common
using, users need not more setting.
HARDWARE CONNECTION
This module supports two communicating interfaces. You can connect the USB
interface to your device with micro USB cable. Or you can connect the UART interface
to your device. If you want to test the UART interface with PC, you require an TTL to
USB board like our CP2102 (should be purchased separately).
VCC: 5V
Tx: Transmit Pin (Connect to Rx of MCU/CP2102)
Rx: Receive Pin (Connect to Tx of MCU/CP2102)
GND: Ground
SETTING CODES
Users could scan the setting codes to configure the Barcode Scanner Module
SETTING CODE
You can scan these two codes to enable/disable the setting code function. Enable
it, you could scan setting codes for configuration. And setting code is invalid if disable.

Barcode Scanner Module User Manual
10 / 57 Rev1.0 Date:180621
Open/Close:
Output content:
RESTORE FACTORY SETTING
You can scan this setting code to restore to factory setting if require.
Open Setting Code Function
Close Setting Code Function
Don't Output Content of
Setting Code
Output Content of
Setting Code
Restore Factory Setting

Barcode Scanner Module User Manual
11 / 57 Rev1.0 Date:180621
USERS DEFAULT SETTING
Except the factory setting, users can save the setting as user default setting. By
scanning the “Save Current Setting as User Default Setting” code, you can save your
current setting as default setting. If there was default setting, and this operating will
cover the old information.
By scanning the code “Restore User Default Setting” can restore the module to
user default setting.
UART COMMUNICATION
If you connect the module to MCU by UART interface. You must set the correct
UART communication parameters for success communicating. The default parameters
of UART interface of module are that: Baud rate: 9600bps, Data bit: 8, Stop bit: 1
Scanning this setting code, it switches the communication interface to UART.
Save Current Setting as User
Default Setting
Restore User Default
Setting
UART Output

Barcode Scanner Module User Manual
12 / 57 Rev1.0 Date:180621
1. Baud rate Setting
USB COMMUNICATION
1. USB PC Keyboard
When you connect the module with USB cable, you can set the module to
keyboard input mode by scanning this code.
2. USB Virtual Port
1200bps
4800bps
*9600bps
14400bps
19600bps
38400bps
57600bps
115200bps
USB PC Keyboard

Barcode Scanner Module User Manual
13 / 57 Rev1.0 Date:180621
You can set the module to USB virtual port mode by scanning this code.
SCANNING MODE
1. Manual Mode
Manual Mode is default scanning mode. In this mode, user should press the
button to begin scanning, and it will finish after scanned or button release.
Sleep
In manual mode, module could enter sleep mode if it being idle for some time.
You can scan this code to configure this function.
Default setting is that the module will enter Sleep mode after 30s if module keeps
idle. And you can wake it up by press button, module will restart after waking.
2. Continuous Mode
USB Virtual Port
Manual Mode
Enable Sleep Function
Disable Sleep Function

Barcode Scanner Module User Manual
14 / 57 Rev1.0 Date:180621
In Continuous Mode, the module will keep scanning automatically. After it success
scanning and output result, or reach the timeout of scanning time, the module will
begin its next scan after a certain time (configurable). User should single press the
button to stop the scanning and single press again to continue.
Single Scanning Time
In Continuous Mode, this parameter set the max scanning time for per scanning
behavior. If the module success scanning or the its scanning time reach the max
single scanning time, module will enter the non-scanning interval. The range of
single scanning time should be 0.1~25.5s. If it is set to 0, it means that scanning
time is infinite. It is 5.0s by default.
Continuous Mode
1000ms
3000ms
*5000ms
infinite

Barcode Scanner Module User Manual
15 / 57 Rev1.0 Date:180621
Non-Scanning Interval
It is the interval between two scanning behaviors. That is module will scan nothing
after last scanning for this interval time before and begin its next scanning. The
setting range of this interval is 0~25.5s. It is 1.0s by default.
3. Sensing Mode
In Sensing Mode, the module will detect the ambient brightness, if the brightness
change, module will begin scanning after an image stabilization time (configurable).
After one scanning (success or timeout), module will enter detecting state again after
a certain time (configurable). Module will keep this cycle unless: If timeout, module
will stop scanning and in detecting state automatically. In Sensing Mode, user could
also press the button to scan and module will back to detecting after success scanning
or button release.
No Interval
500ms
*1000ms
1500ms
2000ms
Sensing Mode

Barcode Scanner Module User Manual
16 / 57 Rev1.0 Date:180621
Single Scanning time
In Sensing Mode, this parameter set the max scanning time for per scanning
behavior. If the module success scanning or the its scanning time reach the max single
scanning time, module will enter the non-scanning interval. The range of single
scanning time should be 0.1~25.5s. If it is set to 0, it means that scanning time is
infinite. It is 5.0s by default
Non-Scanning Interval
It is the interval between scanning and detecting. That is module will scan nothing
after last scanning for this interval time before and begin its next detecting. The
setting range of this interval is 0~25.5s. It is 1.0s by default.
1000ms
3000ms
*5000ms
Infinite

Barcode Scanner Module User Manual
17 / 57 Rev1.0 Date:180621
Image stabilization time
It is the time for module to stabilizing image if brightness changed is detected in
sensing mode. The range is 0~25.5s, and 0.4s by default.
4. Command Mode
In command mode, scanner will begin scanning after receive the command from
MCU. (That is set bit0 to 1 on address 0x0002).
No Interval
500ms
*1000ms
1500ms
2000ms
100ms
*400ms
1000ms
2000ms
Command Mode

Barcode Scanner Module User Manual
18 / 57 Rev1.0 Date:180621
Note: The scanning command (UART) is that:7E 00 08 01 00 02 01 AB CD. The
scanner module will response bytes (02 00 00 01 00 33 31) for the command and
begin scanning at the same time.
Single Scanning Time
In command mode, this parameter set the max scanning time for per scanning
behavior. If the module success scanning or the its scanning time reach the max single
scanning time, module will enter the non-scanning interval. The range of single
scanning time should be 0.1~25.5s. If it is set to 0, it means that scanning time is
infinite. It is 5.0s by default.
LIGHTING AND TARGETING
1. Lighting
The white LED provides light for scanning, to improve the scanning performance
and supports weak light environments. It has three states for choice:
1000ms
3000ms
*5000ms
infinite

Barcode Scanner Module User Manual
19 / 57 Rev1.0 Date:180621
Standard (default): The LED only turn on when scanning, or it keeps off.
Keep lighting: The LED will keep lighting after powering on scanner module
No light: The LED is turned off all the time.
2. Targeting
The targeting light beam could help user to get the best scanning distance and
angle. User can set it:
Standard (default): The LED only turn on when scanning, or it keeps off.
Keep lighting: The LED will keep lighting after powering on scanner module
No targeting: The LED is turned off all the time
OUPUT INDICATION
1. All warning tones
*Standard
Keep lighting
No light
*Standard
keep lighting
No targeting

Barcode Scanner Module User Manual
20 / 57 Rev1.0 Date:180621
You can set the buzzer to active/passive buzzer, as well as setting the driving
frequency of passive buzzer.
Note:
LF: Low frequency;
MF: Midium frequency;
HF: High frequency
In active driving mode, user can set the working level of buzzer.
User can turn off all the warning tones by use the code “Enable silence”.
Driving frequency-
Passive LF
*Driving frequency-
Passive MF
Driving frequency-
Passive HF
Driving frequency-
Active
*Working level-
High
Working level-
Low
Enable silence
*Disable Silence
Table of contents
Other Waveshare Control Unit manuals

Waveshare
Waveshare UART TO ETH User manual

Waveshare
Waveshare 4.2inch e-Paper Module User manual

Waveshare
Waveshare Motor Driver HAT User manual

Waveshare
Waveshare RS485 TO ETH User manual

Waveshare
Waveshare 10451 User manual

Waveshare
Waveshare SIM7000E User manual

Waveshare
Waveshare UART GPS NEO-6M User manual

Waveshare
Waveshare SIM7600CE-T User manual

Waveshare
Waveshare WIFI-LPT100-B User manual