3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How To Connect a PS/2 Keyboard to the iPhone

How To Connect a PS/2 Keyboard to the iPhone
«
  • step9-800x600.jpg
  • step1-800x600.jpg
  • step2-800x600.jpg
  • step3-800x600.jpg
  • step4-800x600.jpg
  • step5-800x600.jpg
  • step6-800x600.jpg
  • step7-800x600.jpg
  • step8-800x600.jpg
  • last photo ←
»

Although I’ve seen many pictures of PS/2 keyboards plugged into iPhones on the Internet, no one has yet published a detailed howto on how to get this working yourself.  Until now, that is.

In this Instructable I will show you how you can make a PS/2 keyboard to iPhone converter, including all hardware and software instructions.

Prerequisites

  • Jailbroken iPhone – The official SDK doesn’t allow access to the serial port due to the Elf Conspiracy, so the jailbreak is required.  All you need to know about jailbreaking is at the iPhone Dev Team Blog.
  • Arduino Diecimila or Dumilanove (or clone), available from many places.  This howto assumes that your Arduino is assembled.
  • An iPod Breakout board, like this one from Sparkfun.  Any similar product will work.
  • A Female PS/2 (Din 6) Keyboard connector.  Pull one off an old computer or buy one from Digikey or similar vendor.
  • Wire, preferably several colors and about 24 gauge.  I’m using a spool from RadioShack in the pics below.
  • One 500k Resistor.  I’m using an axial through-hole resistor from RadioShack, but you could add this to your Digikey order as well.
  • Soldering Iron and Solder.  If you don’t know how to solder, you can learn here and here.
  • (Optional) Pin Headers, like these.  I break these off and solder them to the ends of wires, so that they plug nicely into the Arduino.
  • (Optional) Sweet 9v Battery harness so your Arduino becomes portable available from the Maker Store.
  • (Optional) Stereo Headphone Jack from RadioShack or Digikey.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Solder the iPhone Breakout - Part 1

Solder the iPhone Breakout - Part 1

Once all your ingredients arrive, fire up the soldering iron and have a quick look at the iPod Connector Pin-Out.

We’ll be making use of four of these pins for the keyboard: 11, 13, 16 and 21.  The definition of pin 21 says we need to place a 500k resistor between pin 21 and ground to enable serial communications to the iPhone, so we’re going to stick a resistor between pin 21 and pin 16, which is the serial ground.  We’re also going to be adding pin headers to pins 11 and 13, which will act as the TX and RX pins for serial communications.  Since we’ll ONLY be sending to the iPhone, we only make use of the iPhone’s RX pin, so we’ll also be adding a piece of wire to connect pin 11, the unused TX pin,  directly to the ground at pin 16.

You can also optionally add the stero headphone jack to pins 2, 3 and 4 right now and it will work whenever the breakout is plugged in.  This has nothing to do with the keyboard, but if you have a 1G iPhone with the lame non-standard headphone jack, this will fix it.

« Previous StepDownload PDFView All StepsNext Step »
16 comments
Mar 16, 2011. 6:08 AMadruna says:
Having issues with installing iPhone 2.0 Toolchain, Cydia keeps telling me it can't install because there is dependencies and conflicts that can't be identified xD
Anybody knows a way around?
Mar 14, 2011. 6:13 PME_MAN says:
This is great! I modified the code am currently using through USB to transfer text to putty through the COM port. Nice Instructable!
Jan 14, 2011. 2:47 PMMACKattacksnipe says:
you should have a scematic and make a Arduino Shield
Jan 12, 2011. 2:53 AMnickboy98 says:
wow i could have bought a neat and tidy bluetooth keyboard and linked that to my iphone than waste that much time and money and ruin the aesthetic appeal of my iphone
Mar 24, 2010. 10:20 PMalexand3rS says:
omg win
Feb 16, 2010. 1:43 AMLance Mt. says:
 lol, Im sorry but i really must insist. WOW, I've had some experience with jailbreaking but does that look complicated and a hlaf!
Jan 18, 2010. 7:34 PMtompaige says:
WILL IT WORK ON ANY TYPES OF IPODS
Dec 5, 2009. 11:08 AMyonsje says:
Hi,
When I type "gcc -static-libgcc -o TouchClient TouchClient.c -lvncclient"
I get:

ld: library not found for -lSystem
collect2: ld returned 1 exit status

What do I do?
Dec 2, 2009. 9:31 PMguitarist24000 says:
did any1 figure out backspace or how to hit send from the keyboard?
Nov 26, 2009. 8:10 AMguitarist24000 says:
I would like to make my own dock using this, the only information I cannot find is exactly what pins I have to put wires into to charge it and how much voltage and amps should be on those pins. by any chance would you know?
Oct 15, 2009. 4:17 PMmacattackct says:
Is it possible to do this with a regular either graphic or basicLCD?  if so, where can I get the codes?
Oct 21, 2009. 3:33 PMmacattackct says:
ya. that is what I was planning on doing. Making a word processor.  Thanks for responding.  Is it harder to do it with a graphic LCD, or even a graphic touch screen LCD so that you can use the screen as a cursor?
Oct 16, 2009. 11:37 AMjeeab says:

Will this work with the ipod touch too? if so, do you know how much all of this costs? (besides the ipod)   thanks : )


Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:awgh