PS/2 Keyboard Or Mouse using Arduino




Arduino isn’t limited to taking input from sensors: you can even connect up a full-size PS/2 keyboard just as if it were a “real” computer and type away! Connecting a keyboard to an Arduino may sound a bit odd (after all, it’s just a little microcontroller) but keep in mind that an Arduino actually has more processing power and memory than a complete desktop machine of not so many years ago. Adding some peripherals that you would normally associate with a full-size computer opens up some interesting possibilities.

ps2 keyboard mouse




Perhaps PS/2 seems a bit dated and you’d rather use a modern USB keyboard with your Arduino. After all, even finding a PS/2 keyboard can be tricky now and you may have to go dumpster-diving or hunting through that pile of old hardware in the company storeroom to find one. Using a USB keyboard may sound like the obvious solution but unfortunately an Arduino just isn’t up to the job of acting as a USB host – it’s simply not fast enough. All is not lost however because many USB keyboards are designed for backward compatibility and come with a little purple “USB to PS/2” adapter that allows them to be plugged into a PS/2 port. Keyboards that come with those adapters are designed to detect when they are plugged into a PS/2 port rather than a USB port and automatically revert to acting as a PS/2 device, so this project should work just as well with a modern USB keyboard connected via an adapter as with a genuine antique PS/2 keyboard.

PS2 Keyboard Mouse Schematic

Or if you want to go even more retro you can even use this same circuit with an old-style “AT” keyboard because even though they use a different connector they have the same electrical interface as a PS/2 keyboard.

Source Code

github.com/practicalarduino/Ps2Keyboard

github.com/kristopher/PS2-Mouse-Arduino

www.arduino.cc/playground/uploads/Main/PS2Keyboard_014A.zip

Major Components in Project

QtyDescription
1Arduino Duemilanove, Arduino Pro, Seeeduino, or equivalent
1Prototyping shield
1PS/2 extension cable or 6-pin mini-DIN socket
1PS/2 keyboard or PS/2 mouse
10cmHookup wire

For more detail: PS/2 Keyboard Or Mouse using Arduino




This Post / Project can also be found using search terms:

  • arduino bluetooth клавиатура
  • ps2 usb to arduino
  • connector output usb to playstation 2
  • how to make your own PS/2 to USB mouse
Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Arduino Ghost Climber
Laser-guided Ghost Climber using an Arduino

Almost inevitably, when I try to climb the same route I'll forget exactly what sequence of holds they used and...

Close
Scroll to top