0

I am working on a project to collect data from a barcode scanner using an arduino which in turn is connected to a POS/laptop. So far i am able to collect the data from the barcode scanner by using the arduino as a host and in order to send the scanner data from the arduino to the laptop i am using a basic FTDI board (https://www.sparkfun.com/products/9716) that coverts serial data from the arduino to USB. However, it shows up as a COM port in my computer and i need an additional serial monitor to see the data transferred from the arduino. Is there a device that converts serial data from the arduino to "HID keyboard Device" similar to the FTDI board.

Please let me know if i have not made myself clear or if you need more information.

Edit: I forgot to add that i am using arduino MKR NB 1500 (store.arduino.cc/arduino-mkr-nb-1500-1413). I am using the board's native USB port to connect to the barcode scanner. USBHost library (github.com/arduino-libraries/USBHost) gives the board the ability to act as a USB host and connect to the barcode scanner and get the scanned data from the barcode scanner. I am using the FTDI board (serial to USB converter) and arduino's serial1 to send the scanned data to my laptop.

We are trying to build a portable device that connects to the barcode scanner and the POS. We are using the arduino to update our database (I can use the MKR board to send a POST request with the barcode data to update our database) and in addition to this the arduino should be able to send the scanned data to POS. As of now i am connecting arduino's RX and TX pins to the FTDI board which converts UART to USB. I would like to replace this FTDI board with an interface that converts UART to "USB HID keyboard". Please let me know if more information is needed.

1
  • 1
    you could use a scanner which has SPI or Serial interface and let the USB free for keypad emulation
    – Juraj
    Aug 11 at 11:56
0

I would like to replace this FTDI board with an interface that converts UART to "USB HID keyboard".

FTDI Friend and ATmega32u4 board

On the left is an "FTDI Friend" that converts serial to USB. It is similar to the Sparkfun product you are using.

On the right is a similar sized, similar priced, board that can read serial and can act as a USB keyboard (Implementing the appropriate HID). It's a Pololu A*Star micro but it's just one example of many similar devices. I used this one to implement a physical keyboard using mechanical switches but the input could have as easily come from it's serial interface.

Any ATmega32u4 or SAMD based board can act as a USB HID keyboard using the standard Arduino keyboard library

Admittedly you'll have to write and upload a sketch but that ought to be relatively straightforward.

There are also smaller, potentially cheaper, boards such as the Digispark and clones that have a separate software library to implement USB HID Keyboard functionality on a very simple microcontroller like the ATtiny85.


We are trying to build a portable device that connects to the barcode scanner and the POS.

As Juraj's comment suggests, many barcode readers started out as serial devices and only later had USB-serial capability added. If you use a Barcode scanner with serial output, you probably don't need any extra hardware and can use the MKR NB 1500's USB interface to act as a keyboard device instead of as a host for the scanner.

1
  • Thank you so much for your response. I will try with Attiny85 and 32U4 Micro boards and see how it goes. Unfortunately, i have to work with USB barcode scanners and I am using the arduino board's native USB to get the data from the barcode scanner.
    – sud.ng7
    Aug 18 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.