1

What is the cheapest way to interface a USB 2.0 keyboard to an Arduino Uno?

The keyboard does not support PS/2 emulation (interfacing a PS/2 keyboard to Arduino is easy). So this means the Arduino will read the USB keyboard's keystrokes - whatever their speed of input is.

If it can be solved using an IC then DIP is preferred as it quicker to work with for soldering and pluggin into breadboard.

asked Oct 29, 2016 at 17:12
11
  • Have you considered USB/UART bridges, like FTDI ones? I might be wrong but lots of them are used in UART communication and other stuff Commented Oct 29, 2016 at 17:33
  • Don't it's a bad idea. Or if you must, use a teensy LC in place of the Uno. Commented Oct 29, 2016 at 17:36
  • @ChrisStratton I know it possible to do becuase thheres a one chip solution-its here hobbytronics.co.uk/usb-host-board-v2 Commented Oct 30, 2016 at 0:09
  • but I cant figure out the circuit from that photo-maybe iots based around a max 3421e? teensy LC at its cheapest is a cost of a few arduino Unos-so I dont think its that cheap. Commented Oct 30, 2016 at 0:09
  • 1
    What to figure out? The description text says: "The USB Host Board is based around the Microchip 24FJ64GB002 microcontroller which contains a built-in full-speed USB host controller". Commented Oct 30, 2016 at 0:21

1 Answer 1

1

The cheapest way is to get a plain PS/2 (or PS/2-USB convertible) keyboard instead of USB1.1 (I hope you mean the standard LS keyboard, since USB2.0 HS keyboards hardly exist), and interface it to GPIOs in accord with known solutions.

The Arduino Uno is designed around Atmega8u2 and ATmega328P chips, which can act as USB device only, FS and LS. To interface it with a dedicated USB keyboard (which is a USB device), the you need to have the Arduino as a USB host. Probably it is possible to emulate some limited hardware host functionality for LS mode (1.5Mbps) over GPIOs, but it will be a remarkable effort.

answered Oct 29, 2016 at 23:57
2
  • For the senario I am interested in I cant switch over to PS/2 unfortunately-as I mentioned in question if it was PS/2 it would be easy to do. I have a guess it can be done with using a single chip that acts as USB host in conjunction with arduino uno. Commented Oct 30, 2016 at 0:04
  • You asked for a cheap way. Of course, you can use a dedicated USB host controller based on MAX3421E chip (to SPI), aka "Arduino USB Host Shield", but it will cost you 20ドル-30,ドル instead of an old junk PS/2 keyboard from some trash. Commented Oct 30, 2016 at 0:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.