Shop OBEX P1 Docs P2 Docs Learn Events
DIY barcode scanner? — Parallax Forums

DIY barcode scanner?

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2008-06-13 20:54 in Propeller 1
Barcode scanners are generally expensive. I am wondering if the Propeller could provide a hack to make your own. There are laser diodes readily available, but I am not clear on the fundamentals of the bar-code reader.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PLEASE CONSIDER the following:

Do you want a quickly operational black box solution or the knowledge included therein?······
···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

Comments

  • SpinHeadSpinHead Posts: 28
    edited 2008-06-13 07:36
    I wonder if the trouble / packaging of the final product would be worth it, I have gotten several of these http://www.provantage.com/unitech-ms210kb~7UNIT00E.htm only 3 left after I just bought 2 more, but only 47usd
  • AleAle Posts: 2,363
    edited 2008-06-13 08:58
    You mean those nice scanners that have a laser and a vibrating mirror (old ones had a motor) ?... Unless you want to make them in the thousands range it may be a better idea to get a part already built and tested.
    If it is for fun, the magnetic system that controls the mirror should be quite interesting to build and to drive smile.gif
  • ForrestForrest Posts: 1,341
    edited 2008-06-13 09:35
    The CueCat is a discontinued, inexpensive barcode scanner that may work. Here's a link to a new USB CueCat www.halted.com/commerce/catalog/product.jsp?product_id=20936&czuid=1213349690535

    The PS/2 version may be easier to interface to a Propeller - you'll find them on ebay occasionally
  • Agent420Agent420 Posts: 439
    edited 2008-06-13 13:20
    +1 on the CueCat.· I'm sure it's possible to build a scanner from scratch, but you'd be hard pressed to be able to do so for $9.95 or less (materials and design time).

    The output is encoded for use with their original software, but if you Google around you'll find simple algorithims to decode in software.· There are some hardware hacks you can do to some models of the Cat that also disable the encoding.· Because of their low cost, these were very popular with hackers for quite a while, so there's a lot of resources available on the net.

    They work fairly well considering their low cost design, but like other wand scanners they pretty much need to be swiped with close physical contact, unlike other readers that can can be read some distance away and don't require swiping.

    I grabbed several myself when RatShack was giving them away free in their promotional campaign.

    Post Edited (Agent420) : 6/13/2008 1:28:53 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-06-13 15:26
    Well, it seems a hand barcode scanner would just require a laser diode and a photo diode.

    One swipe of the barcode would be collected by the photo diode as pulses and the width of the pulse would be reconciled as digits between 0 and 9.

    Yes - It would be nice to pick up a PS-2 barcode scanner for cheap. All I am seeing are ones that have USB interface. The PS-2 interface would allow me to use it directly with the Propeller without all that USB overhead.

    There are a lot of different bar codes. I am not really interested in trying to use all and everything. I'd just like to be able to generate lable with my computer printer [noparse][[/noparse]I guess code 25 is a good one] and read them as numeric code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Computer Geek 101Computer Geek 101 Posts: 179
    edited 2008-06-13 15:35
    I've used this one on several projects. It works well for the price.

    http://www.pos-printer.com/datalogic_qs2500_quickscan_barcode_scanner.html

    Also, I made a barcode font if you have need for it.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2008-06-13 16:17
    It's interesting how ordered chaos can produce seemingly parallel events.
    ·
    About a month ago I was looking into a "cheap" barcode scanner for a youth function at the church I have volunteered myself in.· Anyway I have a PS/2 style Cue-Cat and created some very basic Spin code to read the Cue-Cat.· I basically used the 'keyboard" object, but needed to make a slight modification to the code (and renamed the "keyboard" object to "CueCat")·because it doesn't respond like a standard keyboard upon initialization.
    ·
    It will read standard UPC, ISBN, and several others.· What I haven’t gotten to yet, is the ability to create my own barcodes.· I have tried various "free" barcode creators, and even a barcode font, but as of now, I have not found anything compatible that the Cue-Cat can read from a create-your-own barcode perspective.· Any ideas would be welcome.
    ·


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 6/13/2008 4:24:49 PM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2008-06-13 16:53
    I second Kramers suggestion, it doesn't even have to be a laser.

    Another option for a swipeable reader would be an optical mouse, they contain a small camera array.

    Graham
  • Computer Geek 101Computer Geek 101 Posts: 179
    edited 2008-06-13 16:55
    I spent several months working with barcodes.· I found the same problem you did Beau, so I made my own font.· I have used it for over 2 years with no problems.· Here is the font and a sample of how to encode it.· Let me know if you have any problems.· I think its 128 if I remember.· The font is BTI_barcode.··This is in crystal basic but should give an example of how to make the checksum and the such.

            Dim a As number
            Dim MyData(100) As number
            Dim MyVal As number
            Dim Complete As number
            Dim MyText as string
            MyVal=0
            MyText={?parData}
            For a = 1 To Len(MyText)
                MyData(a) = a * (Asc(Mid(MyText, a, 1)) - 32)
            Next
            For a = 1 To Len(MyText)
                MyVal = MyVal + MyData(a)
            Next
            MyVal = MyVal + 104
            Complete = MyVal Mod 103
            Complete = Complete + 32
            If Complete > 126 Then Complete = Complete + 68
            if complete=32 then complete=207
            formula= Chr(204) & MyText & chr(Complete) & Chr(206) 
     
    
    

    ·······

    Post Edited (Computer Geek 101) : 6/13/2008 5:00:38 PM GMT
  • scottascotta Posts: 168
    edited 2008-06-13 18:14
    I just tore one apart. It was based on
    a PIC16C54-RC.

    This was based on a linear ccd array. It used
    fixed led lighting and had a filter optic and a
    line shaping optic. Output was ttl to a converter
    box that outputs keyboard wedge data.

    Scanning a laser eliminates could eliminate the
    optics, a big cost.
  • Jim FouchJim Fouch Posts: 395
    edited 2008-06-13 20:54
    Beau,

    I can make you a stand alone Bar Code printing utility for Windows in VB.Net in a few minutes. I have a component that prints all kinds of Barcodes. Just send me a PM with the details and I throw something together for you.

    Jim Fouch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
Sign In or Register to comment.