Which Arduino should I get for this project?


I'm working on a project where I need to convert keyboard input (PS/2) to a 20-pin output (Kindle), remapping the keys in the process. I have Kindle's 20-pin key map (Breadboard Confessions: By request: Frankenkindle demo code) and the base Arduino code with which I can start (Breadboard Confessions: By request: Frankenkindle demo code) and I have a couple of questions.

First, which Arduino should I get? Since I'll need to output 20 pins (plus pins for PS/2), it looks like Arduino Nano is the one for the job. Is that correct or is there a different Arduino-compatible solution that would work better? Micro-USB for power is ideal.

Second, what are my keyboard options? I'm wanting to minimize power consumption and from reading various posts on this forum, I came to conclusion that getting a PS/2-compatible keyboard is the way to go. Is that correct?

Thanks much,

The nano has 14 digital input pins, 6 analog input pins that can also be used as digital inputs and 2 pure analog inputs (you can simulate.digital inputs using analogRead on those)

For debugging purposes, you are advised to keep the TX pin free.

So I think that an Nano will not do it. Arduino Mega might be the better choice.

PS for easy upload, both TX and RX pins need to be available; it depends a bit on what will be connected to them if you need to disconnect before uploading.

Thanks for the suggestion. I’m leaning toward getting Teensy++ 2.0. It has plenty of pins for PS/2 keyboard and the 20-pin output, plus it looks like it can be programmed like Arduino. It also seems to have lower power consumption, although I haven’t researched that last point too deeply. Any reason not to go with it?


No experience with it. And your original description does not mention any other requirements than PS2 and 20 pins :wink:

You can always use shiftregisters (e.g. 74HC595) or (I2C or SPI) portexpanders (e.g. mcp23017 or mcp23s17). But they do add a little to the power consumption.

While there are 20 pins in the connector it appears that the code you are using uses only 12 of them, 7 inputs and 5 outputs.

 //set up the digital inputs from the V.Reader
pinMode(PIN_B0, INPUT_PULLUP); //Down, marked "Replay" 
pinMode(PIN_B1, INPUT_PULLUP); //Home, marked as "Exit" 
pinMode(PIN_B2, INPUT_PULLUP); //Up, marked as "Play" 
pinMode(PIN_B3, INPUT_PULLUP); //(Not connected) 
pinMode(PIN_B4, INPUT_PULLUP); //Right 
pinMode(PIN_B5, INPUT_PULLUP); //Select (Enter), marked as "Bookmark" 
pinMode(PIN_B6, INPUT_PULLUP); //Left //set up digital outputs to control the mux 

pinMode(PIN_C0, OUTPUT); //IN1_1 
pinMode(PIN_C1, OUTPUT); //IN2_1 
pinMode(PIN_C2, OUTPUT); //IN1_2 
pinMode(PIN_C3, OUTPUT); //IN2_2 

pinMode(PIN_D6, OUTPUT); //LED, for testing //Set control signals to unused states

This can be done with any Arduino. The Arduino UNO is probably easiest to work with.

While there are 20 pins in the connector it appears that the code you are using uses only 12 of them, 7 inputs and 5 outputs.

Which code? What did I miss?

I linked to the code in the first post. In the original Frankenkindle project, the guy is using this technique to program giant buttons for basic Kindle operations (next page, prev page, etc), so his disabled sister can read books. (What an awesome brother!) He is only using a few pins. I would like to map the entire keyboard, so I will need all 20.

I'm new to Arduino, so I'll start with Teensy++ 2.0 via Teensyduino (Teensyduino - Add-on for Arduino IDE to use Teensy USB development board) and perhaps play with shift registers on one of my next project.

Many thanks! :smiley:

I linked to the code in the first post.

Ah, those non-clickable urls ;). I did miss them, sorry. I was looking for attachments and code in the post.

If you use the below, it becomes a real hyperlink


Just for the next time that you want to link something :wink:

I made the changes in the original post so the links show up, thanks! :slight_smile: