View Full Version : Serial Barcode Scanner
Duane Degn
01-26-2012, 08:11 PM
I've been using barcode scanners in my chemistry lab for several years.
They have been immensely useful.
I've mainly used the scanner SparkFun sells (http://www.sparkfun.com/products/9166)but I have since found a less expensive scanner on eBay that will work as a serial device (single data pin).
I've posted details of how to make a cable to use the scanner in serial mode in the product page's comments and in SparkFun's forum (http://forum.sparkfun.com/viewtopic.php?f=14&t=31250).
Since my post in SparkFun's forum isn't likely to be seen by the majority of you, I thought I'd post a link here in case it could help a fellow forum member.
I've used the scanners with a Propeller, but they should also work with a Basic Stamp.
Edit: The eBay scanner I have is no longer listed. This one (http://www.ebay.com/itm/USB-Laser-Scan-Barcode-Scanner-Bar-Code-Reader-White-Hand-Held-/380607686662?pt=LH_DefaultDomain_0&hash=item589dfc6806) looks like it should work the same way.
skylight
08-15-2012, 07:31 PM
The reason I wanted a laser rather than Led array type was for distance scanning , I also think they are more reliable at scanning less hit and miss compared to the Led types though the link to your cable is very useful thanks.
Duane Degn
08-15-2012, 07:48 PM
The ebay page does say it uses a "LED array" but both scanners I linked to use a laser. The laser light bounces off a vibrating mirror to produce the scan line.
IMO, the ebay scanner works better (recognizes the barcode faster) than the one SparkFun sells.
skylight
08-15-2012, 07:50 PM
i must have got a different page as it said Led array in the description further down?
apologies Duane I seem to have replied to the older thread and confused things, now we have two threads about the same thing.
Duane Degn
08-15-2012, 08:42 PM
i must have got a different page as it said Led array in the description further down?
It does say "LED array". I don't know why is says that that though since it uses a laser.
Duane Degn
04-09-2013, 10:53 PM
I decided to give this old thread a bump. The scanner I purchased from eBay is no longer listed. This scanner (http://www.ebay.com/itm/USB-Laser-Scan-Barcode-Scanner-Bar-Code-Reader-White-Hand-Held-/380607686662?pt=LH_DefaultDomain_0&hash=item589dfc6806) looks like it should work the same way.
You'll need to make your own cable to use with a microcontroller. Follow the links in post #1 for instructions on how to make a cable.
NWCCTV
04-10-2013, 03:28 AM
So what are the advantages of using this with a Stamp or Prop over using the computer?
Loopy Byteloose
04-10-2013, 03:44 AM
The advantages of using the barcode scanner with a Propeller likely come from two directions.
a. Portable data logging. If you have your bar codes printed on sheets of paper, it is easier to input data that can be logged into an SDcard
b. Simpler input interface. You don't have to fumble with buttons and menus to select input.
I don't really think that bar code scanning would be worthwhile with a BasicStamp. It might be made to work, but limits of speed and capacity are likely to be too much.
In some cases, you can use the Spinnerette to have barcodes evoke routines that are sent over a LAN. That would be more cost effective than a whole computer being dedicated to such a task.
NWCCTV
04-10-2013, 03:50 AM
OK, I see your point. In my case though my computer and entire work bench are in very close proximity to each other. A bar code scanner with a 6 foot cord and a 3 foot extension pretty much covers my area that I work within. I just keep the program minimized until needed. Having a 3 monitor setup also helps.
Loopy Byteloose
04-10-2013, 04:10 AM
I suspect that the more you use barcode, the more the likelihood that you eventually will want a portable data logging device.
If a database is really working well for you, it just may expand and it is much more pleasant to scan barcodes than to have to key in tedious details. One can create a book of entries with pages and pages of cataloged bar code.
Another option is to have a wireless link, such as an Xbee wireless serial.
I don't really think that bar code scanning would be worthwhile with a BasicStamp. It might be made to work, but limits of speed and capacity are likely to be too much.
Them's fightin' words, Loopy! :)
Duane Degn
04-10-2013, 04:22 AM
I generally would rather use a Propeller over a PC when practical. My data logging system isn't put in jeopardy whenever I download the newest update to my PC. I like knowing I can easily replace my system without worrying about software compatibility with latest required OS. Besides a Propeller board costs a lot less than a PC and uses a lot less power.
Another advantage is by adding a small Propeller board, RF module and battery to bottom of the barcode reader, it becomes a wireless barcode reader.
I use my barcode readers for data logging. I scan the barcode on a vial and then weigh the vial. The balance has a RS-232 port so that also gets logged to the same SD card. (Lots of scientific instruments have serial ports.)
I also use barcodes to indicate transfers from one container to another container (usually for diluting). Barcodes have made my work much faster and much more accurate.
It's made keeping track of data so much easier in my lab. I also don't have to try to decipher my employee's handwritten notes in a notebook anymore.
After all the data has been recorded to a SD card I transfer it to a PC to do the number crunching. I may move the number crunching aspect over to the Propeller to make my job a bit easier.
I use a Brother label printer to print barcodes. There are lots of much less expensive ways to print barcodes than using a Brother label printer but the Brother labels are very durable. I have bottles and vials (which are frequently washed) that have had a Brother label on them for several years without any sign of the labels coming off.
Last time I computed how much the labels cost me, I figured they were about 3.5 cents per five character label. Some paper barcode labels cost less than a penny each but you wouldn't be able to wash them.
Edit: I missed erco's post. Since erco joined the thread, I'll mention my intention to use the Propeller to control a robot arm for weighing samples and moving cuvettes to and from the spectrometer.