go_away

Author Topic: Hacking PS2 keyboard for 100 inputs.. Ideas?  (Read 872 times)

0 Members and 1 Guest are viewing this topic.

Offline diskmanTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 1
Hacking PS2 keyboard for 100 inputs.. Ideas?
« on: February 26, 2012, 01:34:37 AM »
I updated my old 'bot to a newer mainboard and I lost 2 of my 3 parallel ports.  I multiplexed the 1 parallel port to 32 outputs, but I no longer have inputs in real time.  I WAS reading LPT2 for the wheel encoders and the I/R "bumpers" in the code at the same time as the output on LPT1.

Is there any way to interface an old PS/2 Keyboard?  There is like 100 juicy inputs available from each key.  I need some way to simulate a keypress for different sensors. 

Any ideas?  I'm searching all over the 'net.  I'm finding ways to simulate the PS/2 protocol from the Arduino and such.. But why re-invent the wheel?  I have TONS of old keyboards.. Just need a way to trigger a keypress with TTL levels.


Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Hacking PS2 keyboard for 100 inputs.. Ideas?
« Reply #1 on: February 26, 2012, 11:18:33 AM »
Hi,

Not the best subject line - unless you are thinking of using something from a Sony PlayStation ;)
I base the following on the assumption that you're using a PC keyboard with PS/2 protocol/connections.

[...]
Is there any way to interface an old PS/2 Keyboard?  There is like 100 juicy inputs available from each key.  I need some way to simulate a keypress for different sensors. 

Just need a way to trigger a keypress with TTL levels.
PC keyboards will be slower than a parallel port, especially if you run a multitasking OS, but if you can live with that, it's quite easy to use them.
The keys are scanned in a matrix, so you need to poke around in the circuit and try cridging a row and a column with a signal diode (1N4148, 1N914 etc.) to find which lin is the most positive.

When you have established the direction the diode needs to be in, each node can be replaced with an NPN transistor with the emitter where the cathode of the diode was (when it gave an input).
In case neither of the lines is at ground potential when scanned, you'll need to use an optocoupler to avoid shorting the keyboard processor, but it's not very likely to happen.

To "press" a key, just put the logic level (not TTL level) via a base resistor to the transistor.


Even though you have the keyboards, it might not be the best solution, but hey, you decide :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here