I have an old laptop keyboard like the one shown below:

It has a 24-wire flat cable coming out of the back. Would it be possible to use this as a keyboard for the Pi (I assume with some microcontroller in between)?
|
I have an old laptop keyboard like the one shown below:
It has a 24-wire flat cable coming out of the back. Would it be possible to use this as a keyboard for the Pi (I assume with some microcontroller in between)? |
|||||||||||||
|
|
There is no easy or simple way to achieve what you ask. The simplest answer is just ignore this keyboard and get a USB one. However, if you really want to do it, it's a DIY job through and through. Your solution will be custom to this keyboard and may or may not be easily adapted to accommodate keyboards from other manufacturers. Laptop keyboard connectors are not standard. They vary across manufacturers. Typically, they also lack any electronics to process the keypresses and convert them into simpler data messages, e.g. key codes or button codes etc. Therefore, first you need to figure out what happens each time you press a key, i.e. which electrical signals get activated (get shorted together). Then you have two options, both very tricky: Option 1 - Very advanced: You need to construct an electronic interface which will connect between the keyboard and the USB port on the Pi. It needs a microcontroller to emulate a USB keyboard when it's plugged into the USB port and you will need to write software to map the key pressing signals into USB keyboard presses. The microcontroller needs to do all the work. You might want to read this related question: Can I make a full USB keyboard with Makey Makey + Raspberry Pi Option 2 - Insanely advanced: Raspberry Pi has a connector with 17 GPIO (general purpose input output) pins. You need to design a circuit to reduce the 24 keyboard lines and interface them to the GPIO pins. Then you need a custom keyboard driver for the Pi operating system. Hint: Some of the 24 connector lines will be inputs and others outputs. Each time a key is pressed, some of the inputs connect to some of the outputs. Some of the lines may be unused. It will take patience and a continuity checker to figure out exactly what happens. Also consider searching for keyboard encoder chips. This is an example: http://www.ti.com/product/tca8418e These chips take out the hard work of encoding. |
||||
|
|