Build a single button?

Status
Not open for further replies.

Synomenon

Lifer
Dec 25, 2004
10,547
6
81
Anyone know how to build a single button that connects to a PS/2 keyboard port and simulates / acts only as the letter "z" on a standard PS/2 keyboard?
 

Ben90

Platinum Member
Jun 14, 2009
2,866
3
0
If you know how to wire your own circuit boards this will probably be all the information you need:
http://www.computer-engineering.org/ps2keyboard/

Another option would be to take the controller out of a standard keyboard and figure out which traces need to be connected for the desired button operation. It would be kinda a pain in the ass, but less work that building your own controller.

A third option would be a company like mentioned above build your own controller.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Not a really an easy thing to do. http://www.burtonsys.com/ps2_chapweske.htm

PS2 works on serial connections, to make a z only key will require a microcontroller to send programmed to send a z sequence whenever one of the input of the inputs go hi (or low, depending on how you role)
 

C1

Platinum Member
Feb 21, 2008
2,387
113
106
There are people who do this every day. It would involve use of a PROM and driver chips put together on a custom circuit board. If you want a slick compact integrated design then you will need to subcontract this job out if you dont have the skills already to do it unless, of course, you're the "birdman of Anandtech".
 

Synomenon

Lifer
Dec 25, 2004
10,547
6
81
Doesn't have to be fancy. I'll I'd need (besides the programming skills which I don't have) is a small project box, the circuit board and ROM chip, a momentary switch and the PS/2 connector / cabling.
 

PottedMeat

Lifer
Apr 17, 2002
12,363
475
126
Another option would be to take the controller out of a standard keyboard and figure out which traces need to be connected for the desired button operation. It would be kinda a pain in the ass, but less work that building your own controller.

This is what I'd do. Find junk keyboard, note where 'z' key is, disassemble, find relevant traces, disconnect ribbon cable, test with momentary switch.
 

Daedalus685

Golden Member
Nov 12, 2009
1,386
1
0
The how is all well and good.. I'm more interested in the why though :D.


That being said, the actual electronics of a keyboard is nearly nil these days. The buttons themselves take up all the space and are just leads that trace to the controller which is in most keyboards no larger than. You can simply trace out the z key and carefully disassemble around it leaving quite small bits behind on any old junker far easier than you could make your own. You'd end up with a card about the size of 5 or 6 keys and provided you were careful to note the z leads any old switch will work.
 
May 11, 2008
22,424
1,453
126
A simple mcu like the 16f675 would be sufficient. But you have to program it in pic assembler(software is free available at www.microchip.com).

Another option might be to use the ic that comes with the TI launchpad.
Then you have a free compiler(Look at the the TI launchpad thread here in HT).
It will cost you 4.30 dollars and you will be able to program it in C.

Together with the information on this page from ben90 :
http://www.computer-engineering.org/ps2keyboard/

Send scan code of z key pressed and afterwards send scan code of z key released.

And you are ready to go.

Perhaps Modelworks and Cyclowizard have some ready set software examples for you...
It never hurts to ask...
Maybe even an USB example is possible.

Here is the link to the thread :
http://forums.anandtech.com/showthread.php?t=2087844
 
Last edited:

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
It is very easy to interface a ps/2 keyboard with a micro, they only need 2 pins for communication, data and clock. It gets a bit more complicated when you want to make a micro look like a keyboard to the host.

Follow the links given in the post above for the proper codes to send and you basically will have to send those to the host pc to even get it to accept the micro as a keyboard before you can begin sending it actual keys.

Here is a rundown of how to do it with a pic :
http://www.piclist.com/techref/microchip/picboardasm.htm

To get the codes for your specific pc then you are going to need to sniff the traffic. The easiest and cheapest way to do this is with a buspirate. It can use a ps2 keyboard out of the box and decode the data being sent on the lines.
http://dangerousprototypes.com/docs/Bus_Pirate
 
Last edited:

Synomenon

Lifer
Dec 25, 2004
10,547
6
81
Thanks for all the reference material guys. Now I just need to find someone that knows what to do with all of it.

I'm not a programmer and I don't know how to work with circuit boards.
 

Synomenon

Lifer
Dec 25, 2004
10,547
6
81

ModestGamer

Banned
Jun 30, 2010
1,140
0
0
Pic has alot of small device application support. I'd bet somebody already has sample code that could easily tweak for the application if not a key mapping to I/O utility with ps2 port com library already built in. You could use a custom key mapping application "there are a few" and put the request in over serial port even easier.RS 232 is stupid easy.

A simple mcu like the 16f675 would be sufficient. But you have to program it in pic assembler(software is free available at www.microchip.com).

Another option might be to use the ic that comes with the TI launchpad.
Then you have a free compiler(Look at the the TI launchpad thread here in HT).
It will cost you 4.30 dollars and you will be able to program it in C.

Together with the information on this page from ben90 :
http://www.computer-engineering.org/ps2keyboard/

Send scan code of z key pressed and afterwards send scan code of z key released.

And you are ready to go.

Perhaps Modelworks and Cyclowizard have some ready set software examples for you...
It never hurts to ask...
Maybe even an USB example is possible.

Here is the link to the thread :
http://forums.anandtech.com/showthread.php?t=2087844
 
Status
Not open for further replies.