The Problem:

Many of my arduino projects need keyboard data entry. The library needed to process keyboard scan codes is hefty, not leaving much space and cpu time for the "real" project.

The Solution:

Off load the scancode processing to another Arduino, that can then pass characters to a host microcontroller (Arduino, Pic, Basic Stamp, etc.)

Welcome to the world of smart shields!

To start this project you will need two Arduino boards and a PS/2 Keyboard Jack. At the end, you can build a DIY Barebones Arduino to host the keyboard interface and code.

Step 1: Reading the Keyboard Scans

For this step you will need a ps/2 mini din, full size (xt) din, or usb jack (only some usb keyboards are backwards compatible). Connect it to an Arduino using 4 wires, for Interrupt (Clk - D3 on the arduino or pin 5 on the atmel328P-PU), Data (D4 or pin 6) , +5v, and Gnd.

Download the keyboard library and upload the TX sketch to the Arduino. Check to see that you are reading the keystrokes in the serial monitor. 

The schematic shows D5 as the TX port to the host Arduino, but we will be using D10 (Atmel pin 16) eventually. Just make sure you edit the code for whatever digital pin you choose to use.

Hi, it seems that you are using something a female ps/2 breakout. Could you tell me where you got it from?<br><br>Thanks!
I got mine from Sparkfun. They have since retired the product. I'm producing a dual ps/2 breakout with icbreakout.com in the near future.
OK thanks :)
<p>Nice work.</p><p>Have you thought of adding to this to make the host interface I2C and/or SPI compatible as well? That would be great for people already using the serial port on their host controller. </p>
<p>I'm using Soft Serial, so any I/O ports can be used.</p>
Sweet! thanks for publishing this.

About This Instructable




Bio: Professionally, I'm an IT Engineer (Executive Level) and Electronics Tech. I'm a Amateur Radio Operator (KK4HFJ). I lived off grid, with Solar (PV ... More »
More by sspence:DIY I2C LCD Display with Inputs Raspberry Pi & the Neo 6M GPS Earthquake / Vibration Sensor 
Add instructable to: