- Thu Jan 26, 2012 8:43 am
#138834
I have some notes on how to use SparkFun's Barcode Scanner USB (SEN-09166)with a microcontroller in the comments section of the product page. I thought it would be easier to answer questions about using the scanner here in the forum instead of within the commnets.
Here's a link to the product page: http://www.sparkfun.com/products/9166
Here's what I've written about it so far:
There was a recent question in the comments from "member#261580":
http://en.wikipedia.org/wiki/TIA/EIA-568#Wiring
The data pin will change after scanning the "SERIAL MODE" barcode on page 10 of the manual. I also used the following barcodes on page 13 "SERIAL HANDSHAKE-NONE" and "SERIAL BAUD RATE-9600(DEFAULT)"
I found a less expensive barcode reader on eBay that will work with the same modifications.
http://www.ebay.com/itm/ws/eBayISAPI.dl ... OU:US:1123
The eBay reader doesn't look as nice as SF's but it is faster at reading barcodes. The connector at the bottom where I plug the Cat5 cable is rotated 180 degrees from the orientation of the socket on the SF reader. This shouldn't matter unless you're trying to add a battery/transmitter module to the bottom of the reader (like I am) and you're using the connector to help hold the module in place.
I'm using this reader with a Parallax Propeller microcontroller. Since the Propeller is a 3.3V device I use a 10K Ohm resisitor in series with the scanner's data line.
I'm adding a link to this thread in the scanner's comment section.
Here's a link to the product page: http://www.sparkfun.com/products/9166
Here's what I've written about it so far:
This barcode reader can also transmit data using a serial connection. I just got this to work with a microcontroller. I used a Category 5 cable to plug into the reader. Power (5V) is pin 6 (of the 8P8C modular plug). Ground is pin 3 and the data line is pin 8. I turned the handshaking off so I didn’t need any other wires. There might be CTS and RTS wires as well. This is great. I’m going to put barcodes on everything.I was correct, this barcode scanner has saved me a lot of time. It has completely changed the way I run my chemistry lab. All my vials and bottles have barcodes on them so I can scan the two containers when I'm transfering from one container to another.
Don’t modify the cable that comes with the barcode reader to use it as a serial cable. The cable it comes with doesn’t have enough wires (or at least not in the right place) for a serial connection. Use an eight wire Cat5 cable. The reader needs to be configured with the barcodes in the manual to switch to serial mode.
Using barcodes with my work is going to save me a lot of time.
There was a recent question in the comments from "member#261580":
You said you are using pin 8 for the data line with UART output correct? I am not receiving serial on that line, but rather pin 2. Is the serial output from that line in LSB first or MSB first and is it inverted or not? Also, does the serial start with the first part of what is read by the barcode scanner or do you get a bunch of nonsense data first?I used the pin numbering found here:
http://en.wikipedia.org/wiki/TIA/EIA-568#Wiring
The data pin will change after scanning the "SERIAL MODE" barcode on page 10 of the manual. I also used the following barcodes on page 13 "SERIAL HANDSHAKE-NONE" and "SERIAL BAUD RATE-9600(DEFAULT)"
I found a less expensive barcode reader on eBay that will work with the same modifications.
http://www.ebay.com/itm/ws/eBayISAPI.dl ... OU:US:1123
The eBay reader doesn't look as nice as SF's but it is faster at reading barcodes. The connector at the bottom where I plug the Cat5 cable is rotated 180 degrees from the orientation of the socket on the SF reader. This shouldn't matter unless you're trying to add a battery/transmitter module to the bottom of the reader (like I am) and you're using the connector to help hold the module in place.
I'm using this reader with a Parallax Propeller microcontroller. Since the Propeller is a 3.3V device I use a 10K Ohm resisitor in series with the scanner's data line.
I'm adding a link to this thread in the scanner's comment section.