Barcode scanner (USB) to BS2
Bronson
Posts: 44
in BASIC Stamp
Hi,
Is it possible to connect a USB barcode scanner or USB VFD cashier pole display to BS2?
I am asking this as it is hard to find RS232 interface for such devices nowadays.
Has anyone done this before?
Regards,
Bronson
Is it possible to connect a USB barcode scanner or USB VFD cashier pole display to BS2?
I am asking this as it is hard to find RS232 interface for such devices nowadays.
Has anyone done this before?
Regards,
Bronson
Comments
I couldn't use the cable that came with the scanner but it was relatively easy to make one with an Ethernet cable. Here's some information on this subject.
Once converted, the barcode scanner output a TTL serial signal at whatever baud I had configured it.
Since the Propeller does PS2 keyboards and mice, it may also to a PS2 barcode scanner. I have wanted to try it for ages, but never got around to commiting to the cost of a barcode scanner. Even the PS2 compatible ones used to be not cheap.
That seems to have changed.. $20-30.00 USD
http://www.ebay.com/bhp/ps2-barcode-scanner
Just be careful about the PS2 SPI interface. It is not 8bit. As I recall it is 12 bit in one direction and 13bit in the other. Parallax OBEX code for mouse and keyboard may need to be modified to get what you need.
In theory, you could use a Propeller to provide an adapter to RS232.
You can see how the USB cable has a USB connector on one end, and (what looks like) a RJ45 connector on the other end.
The cable which comes with the scanner doesn't have connections in the right location so you can't modify the cable included to work with the Basic Stamp. You can adapt an Ethernet cable to work with the scanner. I added a servo connector to one end of a Ethernet cable and I use the scanner with a Prop. The two I've used both output a 5V TTL normal serial protocol.
The first scanner I modified to use as a serial device was this one from SparkFun. I purchased a $30 scanner from ebay and the same conversion trick worked on it. The inexpensive scanner performs better than the more expensive one.
There are directions how to made the serial cable in the comments of the SparkFun scanner. Just look for my comments (ddegn).
The manual does not provide any clues on how to actually use the scanner in serial mode but opened up one of my scanners and found the pin which outputs the serial signal. Apparently flow control is possible but I didn't try to find the flow control pin(s). I just scanned the "no flow control" barcode in the manual.
Does this mean that if I go to a store and trick the cashier into scanning the right barcode, or scan it myself at a self-checkout lane, I can break/misconfigure their barcode scanner? Or do you have to put it into a special configuration mode first?
There's wasn't any sort of configuration mode. I don't know what sort of precautions retailers take but the barcode readers I used were not identical to the ones used at most stores.
I'd keep a few barcode closeby as I worked. I would often turn the beeper off or on and I also set the scanner to "continuous" or "twinkle" modes. "Twinkle" mode was almost as convenient as "continuous" mode but it used much less power.
Here are some of my frequently used modes.
I could print barcodes with a Brother label printer. Adding barcodes to my vials and bottles made my chemistry lab much more efficient. My balances and spectrometer had serial output so I could scan barcodes and press "record" buttons on the equipment and get a nice digital record (saved to a SD card) of the various tests I was working on.
Barcodes and the Propeller where huge time savers.
http://www.ebay.com/itm/SYMBOL-LS-1220-I300A-BARCODE-SCANNER/201456534354
Here's a link to the LS1220 product page:
http://www.symbol.com/product.php?productID=279&tab=Data Sheet
Thanks for all the inputs.
I will try the memory stick Datalogger first.
Bronson
I've used them loads of times, they work great.
hobbytronics.co.uk/usb-host-keyboard
Coley,
Thanks for the info.
Have you ever used it for barcode scanner or pole display?
Bronson