Dear members, please help me I got frustrated because I bought this usb barcode scanner (photo attached) and usb to ps2 cable but was unsuccessful in outputting any thing to the arduino IDE serial monitor using the ps2 keyboard example.
when I connect the scanner directly to usb on my laptop it outputs the serial number of the barcode to word document.
please help me get the project to run, when I connect the cables to my arduino the scanners runs normally but gives a long error beep after I scan a barcode.
Is that the right USB-to-PS/2 adapter? It looks like it might be for connecting PS/2 peripherals to a PC that has a USB port and no PS/2 ports. You want one that allows you to connect a USB peripheral to a PC that has PS/2 ports and no USB ports.
I looked around and did not find any USB Keyboard to PS/2 Port adapters. The only ones I found were very small passive devices used for keyboards that can support either USB or PS/2 and only need the connector adapter. They will most likely not work on your device.
You might be able to get it to work with a USB Host Shield.
johnwasser:
Is that the right USB-to-PS/2 adapter? It looks like it might be for connecting PS/2 peripherals to a PC that has a USB port and no PS/2 ports. You want one that allows you to connect a USB peripheral to a PC that has PS/2 ports and no USB ports.
I looked around and did not find any USB Keyboard to PS/2 Port adapters. The only ones I found were very small passive devices used for keyboards that can support either USB or PS/2 and only need the connector adapter. They will most likely not work on your device.
You might be able to get it to work with a USB Host Shield.
thank you so muh for this helpful response, is there any specific usb sheild, I prefere usb breakout because I need to put it all inside a device of my design. with arduino.
thank you again, before I buy the usb breakout what do you think if I look in the market for ps/s scanner?
ahmedalot:
I am buying this usb breakout board to use with my USB scanner: https://www.sparkfun.com/products/9716
its an FTDI Basic Breakout - 5V, will it do the job?
No. That is a breakout for the FTDI USB-to-Serial chip, similar to the chips used in older Arduinos to connect the Arduino to a USB Host.
You need something with a MAXIM MAX3421E or equivalent:
ahmedalot:
I am buying this usb breakout board to use with my USB scanner: https://www.sparkfun.com/products/9716
its an FTDI Basic Breakout - 5V, will it do the job?
No. That is a breakout for the FTDI USB-to-Serial chip, similar to the chips used in older Arduinos to connect the Arduino to a USB Host.
thank you for your help, I paused the order with sparkfun. I think you refere to this shield (SparkFun USB-C Host Shield - DEV-21247 - SparkFun Electronics) but isn't there a breakout for this chip? it seems to connect to all pins and I have an LCD with touch screen and a motor and a thermal recipt printer too. what is your suggestion isn't better to order a ps2 reader or go ahead with converters?
I'm pretty sure that you can disconnect the cable and connect another cable that ends in a PS/2 connector.
The setup you have now, will never, ever work, as inside the cable, there are active electronics, and it's one-way only. If look at the polarity of the connectors, it's obvious that it's PS/2 IN and USB OUT.
You could try one of the passive adaptors for USB to PS/2 like this
There is nothing inside the adaptor apart from 4 wires connecting the pins.
If you are lucky, the manufacturer constructed the device to use the same pins for both USB and PS/2 communication, like some newer keyboards and mice do. If not, you need to get the correct cable.
The Barcode readers i have used, all use an RJ45-jack in the handle, and it uses different pins for PS/2, USB and RS232.