Optical Mice as Cheap Barcode Scanners?
Ikester asks: "I've been evaluating a couple of barcode scanners including the CueCat (which some of you may recall from the failed off- online marketing stint by Digital Convergence) for a cataloging application. However, getting ahold of these 'free' wands is not that easy these days and it occurred to me that an optical mouse's hardware may be able to perform a similar function with the right mouse driver. For example, it could work as a regular mouse until it 'recognizes' a valid barcode. It could then send the code as if the user had typed it. I Googled the web and newsgroups but I didn't find anything relevant. I'm wondering if anybody from the Slashdot crowd has come across such an approach. With the recent proliferation of optical mice I'm thinking this could be the next best input device for linear barcodes. I have limited knowledge about mouse drivers and the actual design of these mice. Is this even possible?"
Anyway, mine works with a mouse pad that's got a picture on it, the desktop, magazines, etc. -- I don't see how it can tell it's now on a barcode and to switch "modes." I think the barcode reader software is going to have to work with the mouse's output and you'll have to manually tell it when it's over a barcode.
I'd suggest writing an app that logs the stream of mouse movements sent from the mouse driver to your OS, and see what the stream looks like when you pass your mouse over a barcode. It could be made to work, but you'll probably have to do it yourself. Good luck, and let us know if you get it working.
If all this should have a reason, we would be the last to know.
Too baad optical mice don't send back data telling the computer the "color" or "opacity" of the serface they are on, they just tell the computer how long it stayed in the same place.
Actually, it sounds pretty cool.
However, is the mouse too unwieldy? I can't imagine putting it up next to some of those bar codes on the side of small packages or on some that isn't flat.
Think about it... when you plug in an optical mouse, you don't need a special driver. So all the optical vs. wheel circuitry must be in the mouse, not the driver. All the mouse is sending over the USB cable is position information, same as a wheeled mouse. All the "take a picture and evaluate the changes" happens inside the mouse.
As a side note, I'll sell you my Cue Cat for $50.
_sig_ is away
How does an optical mouse work
I doubt this could be done (at least with any kind of reliability) at the driver level. It definately could be done with a little creative rewiring, but I would not be the right person to ask how to actually accomplish this.
Thoughts on tech, Software Engineering, and stuff
Sorry, no. The mouse would have to scan the data for you, and the hardware just isn't capable of doing that. There's no way to change the way the mouse works with a driver.
If tits were wings it'd be flying around.
Tried an Auction Site?
I make 34 entries on alone. 24 individual sales, 2 lots of 2, 2 lots of 5, 1 lot of 8, 3 lots of 10 and 2 lots of 100. Ranging in price from around a buck each to 5 bucks each.
How many do you need? More than 276?
best web host ever
I think this is proof that the function representing the quality of "Ask Slashdot" questions over time is a strictly decreasing function
Now even if it could work (which it wouldn't) It would be cheaper buying a scanner then writing the software to so this sort of thing.
Optical mice work by sending out pulses (not constant) of light and analysing the way it comes back (angle, phase, brightness) and uses that do determine how the mouse has moved.
The mouse then turns this signal into a standard "mouse" signal to send to the computer. As far as the computer is concerned it doesn't care how the mouse works out how it moves. An analogy is inheritence and polymorphism in OO programming. ie, "I don't care how you implement this datastructure, as long as I can do x,y,z and get r)."
So as far as the computer is concerned it cannot tell the difference from the mouse going over a desk, barcode or picture of Claudia Schiffer. (On a side note, optical mice do not work on mat black surfaces as the light does not reflect.)
I am getting more and more annoyed at the morons that are allowed to post to slashdot, yet alone post to Ask Slashdot.
If an optical mouse was programmed to be a barcode scanner...it would be a CueMouse of course! That is assuming that the fat cats who run the CueCat company don't sue...
I worked for a P.O.S. Company (in more meanings than one) Ill sell you a few or just go Borrow a couple a couple from your locale c-store.
check out SDLcam. I haven't used it yet but it looks sweet.
Screen Shot
Perhaps not the way you intend however. I own two logitec optical mice (30 snaps and works really well) What I've noticed however, is that dragging the mouse over disparate color regions i.e. bright blue and subsequently bright green causes the mouse to jump. My guess is that the mouse jump corresponds to the "difference" (luminocity or hue perhaps?) between the colors. in the case of black and white, it is very great and therefore easily detected. Your task would be to rewrite the mouse driver to detect and process these jumps. Provided the data was valid - you could "easily" route the information off to where you needed it and have the mouse continue on it's business of being a mouse. A beep or some other audible notification would probably help reduce the users frustration with the interface. I think it's a great idea!
You may know about peripheral hardware but based on your "analogy" with OO programming comment, it is clear that you have a lot to learn in that field. I promise that if you ever post a question about OO, I'll give you an honest and mature answer, and I won't call you a moron for asking (even if you are one).
It's a nice idea... Unfortunately, optical mice do all their processing onboard. They don't send any raw data to the PC. I also doubt any use flash memory, and so are capable of a firmware upgrade; and even if they were, it's unlikely they'd have sufficient space to be able to handle both tasks. I suppose the right firmware could make the mouse simply dump raw data upstream and let your PC do the decoding, but that'd also make it incompatible with regular mouse drivers.
The original was invented at Xerox PARC. I learned this five years ago as a Docutech Production Publisher technician. You can still see them - old blocky looking things - attached to those big 1500 'aircraft carrier' looking machines. Some of the earliest "desktop publishing" concepts came from the Docutech, from what I've read, learned and heard.
I think with the interesting people, their lives can't possibly be wrapped up into a nice little package.
Your optical mouse works by reflecting the light from the LED to the surface and getting a reflection (angle of incedence, etc) from the surface. It works on paper but not on a perfectly smooth surface. It "sees" bumps and irregularities in surfaces and interprets their movements as mouse movement. Unfortunately, not all printing methods produce any irregularities that can be read by a mouse. Try this: set your mouse on a large barcoded printout. Move the mouse very slowly past the bars and see if it jumps as it crosses a bar. Unfortunately, I tried it and it didn't jump. This means that there are still enough surface anomalies for the mouse to see. It just ignores the barcode. Disassembly of the mouse is your best bet. Change the angle that the LED strikes the paper with. It's a good idea, and can be made to work, but it'll probably make the mouse a little jumpy.
I agree. Getting the raw data would probably be the most likely scenario. I wonder what kind of bandwidth we're talking about. Integrating the decoding function done by the hardware in the mouse driver itself will probably be too resource consuming. But if it's possible, the driver would have to accomplish both tasks: decode movement AND barcode data (if present).
1. It can't be done with an optical Mouse.
2. Even if it could be done why all the trouble for a crappy scanner. Do yourself a favor, go to eBay and search for "barcode scanner" find one you like and spend $20.
3. Just so you know, CCD scanners are Ok. Laser scanners are far more accurate but, they cost a bit more. Oh, don't forget a splitter for your keyboard cable, if it doesn't come with one.
Makes just as much sense.
Don't listen to the nay-sayers Bubba. You will probably have to perform your own mod to the hardware, but the general optical hardware would work EXTREMLY well as a scanning platform .. for roll over or scan over uses. You will probably have to write your own USB driver, or if you could get the specs on the cue-cat you will have to mod the hack the mouse to emulate the cue-cat and use it's driver.
"Anything is possible, its all just a matter of time." - me
Have you tried Pricewatch? It now has a barcode selection for input devices. I find wands with keyboard wedges starting at USD$55.
email me your physical address and i will send it to you, i never did use it for anything. it is still in the original packaging.
chris at punchit dot net
If it ever got massified, barcodes could have a renewed life for consumers.
Huh. I suppose you get all your music off Napster too.
That's more in line with what I thought when I posted. Not that it would make a great scanner, but that if it becomes ubiquitous, new and cool applications could be devised for barcodes at the consumer level. Getting people to install yet another peripheral just to scan barcodes doesn't work, as proven by the CueCat. But if the functionality is there, it will be used!
Random posting from the Slashdot Meetup in Madison, Wisconsin!!!
-Aetrix
-hurtfulpotato
-zImage
-laweinberger
See you folks later!!
"One touch of Darwin makes the whole world kin." George Bernard Shaw
You don't need a special driver in most cases, but nothing is stopping you from writing one. Barcode scanners work on the exact same principles as optical mice, and all the hardware is there; it's just a matter of writing a driver that'll do the trick.
You can get a Modified CueCat for pretty cheap on ebay. They plug into your PS2 port and type out the bar code as plain text as soon as you swipe somthing. No special driver needed, your computer thinks its just a keyboard.
Hacker Media
What's the point of using a mouse? I've seen Barcode scanners for around AUD$15, where as the cheapest optical mouse i've seen is AUD$35 or so. Seems to be easier and cheaper the buy the wand and get the driver, rather than buy a mouse and kludge it together. It's like using a hairdryer to dry dishes, it might work but a hairdryer costs more than a tea towel!
i hate pansy republicans
I would bet it is a lot easier to design software for either a webcam or a handheld scanner and they would be much cheaper and accurate.
Yes, the optical mouse just sends "movement" information, but it might be possible to write a driver that would recognize a special, purposely-erroneous set of movement data and then begin interpreting the following data as barcode information which it (the driver) then, somehow, types like a keyboard. It would probably need to be a mouse/keyboard driver pair.
Yes, no?
cygnuhchur
Which is cheaper than any optical mouse I've seen.
Ah am not a crook! (\(-__-)/)
Realistically, what is the point of even trying this hack? Just to see if you can do it? Why not just spend the 50 or so dollars it would cost to buy an actual barcode scanner? They are simple to use, and simple to install. All you need to do is plug the thing into a PS/2 keyboard port. You can even connect your keyboard at the same time. Scan a barcode when you need to, and type when you need to. I don't know how much an optical mouse is worth these days, but I would imagine it is probably the same cost as a cheap barcode scanner.
Obligatory link - www.pscnet.com
Is that a real poncho? I mean, is that a Mexican poncho or is that a Sears poncho?
Why the hell would you even want a barcode scanner?
...just not with an existing mouse.
:-)
This would be possible to implement in the mouse firmware.
I spent last year programming a USB peripheral...the power of USB gives it complexity, but great flexibility. You can configure any USB device to look like a standard HID (human interface device) with minimal effort. Many cheap USB microcontrollers, such as those found in optical mice, have several endpoints available. You can configure a mouse to identify both as a mouse, and a USB keyboard. From there, the mouse just has to find barcodes and send them as if from a keyboard. No special drivers, as HID should be standard for practically all currently used computer.
On a side note, having programmed a USB device gives you a whole new perspective on peripheral development. I could, if I wanted to, build a Mechwarrior cockpit with two integrated joysticks, system volume control, buttons and switches mapped to keys, all running off one microcontroller and USB port. Maybe someday when I have a LOT more time!
...
I dont think this would work, an Optical Mouse works on a tiny area, where as if you look at bar code scanners, they need to see the whole bar code in one go, (Which is why they can work out if you scan upside now, or at an angle as well).
What might work is one of those old hand scanners people had before flatbed became cheap for all. Perhaps, Im not sure but it seems more likely then a mouse.
I saw the light at the end of the tunnel... But it was just someone with a flashlight bringing more work.
"With the recent proliferation of optical mice I'm thinking this could be the next best input device for linear barcodes. I have limited knowledge about mouse drivers and the actual design of these mice."
I will let this speak for itself.
- A.P.
"Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
Troll? I mean, what the hell? Cracktards.