Arduino UNO Barcode Scanner and Programmer

by Laszlo_s Electronic Designs in Circuits > Electronics

2630 Views, 2 Favorites, 0 Comments

Arduino UNO Barcode Scanner and Programmer

barcode2.jpg

The barcode scanner was needed for my workplace, to avoid human error while the serial number of the product has burnt into the eeprom for traceability.

They asked me to build one and I quickly put one together.

This is the 1st edition with wires inside so it needed an upgrade after a while. I will show the upgrade too.

Supplies

515b4656ce395f8a38000000.png
1_0005__2_1.jpg
lcd-blue-16x2-500x500.jpg
61H6Z+Sgt-L._AC_SL1000_.jpg

Arduino UNO

USB host shield

16x2 LCD display

USB barcode scanner

and a nice box

To use the usb host shield you don't need to do anything else just push them together and install the arduino USB Host Shield Library 2.0

https://www.arduino.cc/reference/en/libraries/usb-host-shield-library-2.0/

The 16x2 LCD also no big deal, install the LiquidCrystal library.

https://www.arduino.cc/reference/en/libraries/liquidcrystal/

For the LCD connection do not use SPI or I2C pins from the arduino uno and do not use the 9th and 10th pin either, they are needed for the USB shield and I2C eeprom.

Here is my pin usage for the LCD, buttons and relay:

-LCD RS pin to digital pin 7

-LCD Enable pin to digital pin 6

-LCD D4 pin to digital pin 5

-LCD D5 pin to digital pin 4

-LCD D6 pin to digital pin 3

-LCD D7 pin to digital pin 2

-OK button to pin 14

-Cancel button to pin 15

-Relay to digital pin 8


You can change tha order as you want.

The USB shield library actually handles the usb barcode scanner as a keyboard.

When you buy a barcode scanner be sure it is a HID type scanner, after that it will work as plug and play device.

The code is flexible, I can't see the point to share it because I needed this project specifically to fit to our environment.

With little arduino knowledge, not a challenge to write a code for this, I also used a library examples with modifications for our needs.

barcode7.jpg
barcode8.jpg
barcode10.jpg

You can find here the first edition of this project:

http://laszlokovacs.bovebben.hu/index.php/39-barcode-scanner

Upgrade

Arduino UNO Barcode scanner and programmer with 16x2 LCD display
20220614_095534.jpg

Here is the upgrade, a custom PCB to replace the wiring. "Barcode scanner LCD shield"