Shop OBEX P1 Docs P2 Docs Learn Events
Serial Barcode Scanner — Parallax Forums

Serial Barcode Scanner

Duane DegnDuane Degn Posts: 10,588
edited 2014-02-12 19:54 in General Discussion
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 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.

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 looks like it should work the same way.

Comments

  • skylightskylight Posts: 1,915
    edited 2012-08-15 12:31
    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 DegnDuane Degn Posts: 10,588
    edited 2012-08-15 12:48
    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.
  • skylightskylight Posts: 1,915
    edited 2012-08-15 12:50
    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 DegnDuane Degn Posts: 10,588
    edited 2012-08-15 13:42
    skylight wrote: »
    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 DegnDuane Degn Posts: 10,588
    edited 2013-04-09 15:53
    I decided to give this old thread a bump. The scanner I purchased from eBay is no longer listed. This scanner 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.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-04-09 20:28
    So what are the advantages of using this with a Stamp or Prop over using the computer?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-04-09 20:44
    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.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-04-09 20:50
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-04-09 21:10
    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.
  • ercoerco Posts: 20,256
    edited 2013-04-09 21:15
    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 DegnDuane Degn Posts: 10,588
    edited 2013-04-09 21:22
    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.
  • nathsenwenathsenwe Posts: 1
    edited 2013-09-24 19:56
    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.
    Can you suggest a good barcode scanner for this?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-24 20:28
    nathsenwe wrote: »
    Can you suggest a good barcode scanner for this?

    What is "this"? Loopy mentioned a lot of things in the post you quoted.

    If you want to use a barcode scanner with a microcontroller with a serial (TTL) interface then this scanner looks like the one I use with a Propeller.

    To use the scanner with a TTL interface rather than the USB interface, you'll need to make a cable to connect the scanner to your microcontroller. The links in post #1 lead to instructions to make this cable. You can't modify the cable that comes with the scanner since there aren't wires in the correct positions in the connector that plugs into the scanner. The connector is actually a ten position connector but the eight position connector on ethernet cables will work.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2020-03-07 21:48
    I had a request for a copy of the bar code scanner manual.

    The file is too large to attach to the forum but for now it can be found in my Dropbox.

    If anyone wants to find a copy in the future and the above link doesn't work, just send my a private message and I'll make it available again.

    Here are a few quotes from the SparkFun product page about how to use the scanner.

    I explain which wires to use with a serial connection in this post.
    [COLOR=#333333][FONT=Arial]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.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]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.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Arial]Using barcodes with my work is going to save me a lot of time.[/FONT][/COLOR]
    

    Here's a post about configuring the scanner with barcodes from the manual.
    You can use this with a microcontroller. You do need to make a different cable. A Cat5 cable works fine. You also need to configure the barcode scanner with the “Serial Mode” barcode on the bottom of page 10 in the User’s Manual. I also used “Serial Handshake-None” on page 13 (so I didn’t have to figure out which pins to use for flow control). There are also barcodes to set the baud rate on page 13. An earlier comment of mine lists the pins of a Cat5 connector to use with a microcontroller. Since the barcode scanner uses TTL to communicate you may need a series resistor on the data line if you’re using a 3.3V microcontroller. I’m using a 10K ohm resistor with my Propeller chips.
Sign In or Register to comment.