Creating Your Own Keyboard From Scratch – Arduino Uno and Power Part 1

Summary Page

At the beginning of this project I had only little experience regarding microcontrollers. As a teenager I programmed the basic stamp controller, automating a model of the V2 teststand and launchpad for the Peenemünde Historical and Technical Information Centre. But this was more then 15 years ago and since then I focused on desktop and web programming. I had heard of the Arduino long before and was intrigued. But I needed (as always) some more motivation – some concrete goal I would like to achieve – then just to play around with it.

So as an Arduino and microcontroller beginner I decided to buy Arduino Unos, as suggested by different sources. Because the keyboard should have a somewhat appealing look I soon realized – when holding the Arduinos in my hand – that this was a rather bad choice. The Arduino Uno is really big and overall the board was to high to be integrated in an as-flat-as-possible case. Actually I had the same problem with the LiPos I ordered in the first place. They had high capacity but they where to big. Instead of making the case more complicated I decided to remove or cripple all extruding parts from the Arduino and get some smaller batteries at the local Conrad store.

Basically I ground a few millimeters from the top of the USB connectors (they are still working in case you wonder), removed the female pin headers and the power connector and cut some other pins a little shorter. I guess pictures say more than words so here is a photo from one of the crippled Arduinos inside the keyboard case.

Modded Arduino Uno 2

As I stated in another post I had to take a incremental route to build my keyboard so these hacks were absolutely unavoidable. At one point in time – I hadn’t begun to make the keycaps, but both bottom side cases where finished, the matrizes and Arduinos where soldered and I was struggling to get RF communication between both sides working – I had forgotten to turn the keyboards off (back then through disconnecting a jumper wire). The result: a bloated LiPo.

That made me think: “Is it really such a good idea to use LiPos in a wooden case? Can I guarantee to get them under control?” I thought I already had LiPos with some protection circuits integrated. The same day I removed them from the keyboard and ordered NiMh batteries (Sanyo Eneloop AAA) with external chargers (because I couldn’t find a breakout or simple circuit for charging NiMh batteries through USB).

Modded Arduino Uno1

At the same time I gave up on the RF communication (this is a story on its own), connected both parts with an old USB cable and used SoftwareSerial for sending key presses across. I needed only one wire because only one way communication was necessary. Now it was possible to power both circuits from one battery pack using two other wires from the USB cable. As there was not more space in the keyboard case, I decided to put 6 batteries under the wrist rest of the left side. I made three batteries in series and two of those packs in parallel. I thought that would be power enough. Unfortunately not. When I first tried to use the keyboard itBattery pack under lefhand side wrist rest 1 took a few hours (when I remember correctly around 3 hours) and the batteries were exhausted. The next project appeared: making “TheTasTaTur Mark1” saving energy when possible. Another point against the Arduino Uno because its energy saving capabilities are quite limited. In the end it was possible to quench a hole workday out of the batteries. That again is a story on its own.

Summary Page

Advertisements

9 thoughts on “Creating Your Own Keyboard From Scratch – Arduino Uno and Power Part 1

  1. diredesire says:

    Hello, are you missing a few posts and/or were they deleted? I’m looking at doing something similar and I’m looking at where you struggled, pitfalls, etc. Please e-mail a response if you get a chance! Your summary page has pointers to links that don’t work anymore, and they don’t show up in your timeline!

    1. Dirk Porsche says:

      Hi there. I’m sorry that things aren’t working. Unfortunately my provider has some issues at the moment. I will look into this, as soon as possible. Thanks for reading.

    2. Dirk Porsche says:

      Actually I just tested the links to the pages and everything seems to be available. Or are you talking about embedded code examples? I haven’t finished fixing the syntactic change WordPress.com introduced some weeks back. I will be working on it as soon as everything runs fine again.

  2. diredesire says:

    Hey Dirk, thanks for the response. The posts I’m referring to are here: https://shiggyenterprises.wordpress.com/thetastatur-mark1/

    If I open the links in new tabs, some of the links are dead – Post #3, #4, etc. I don’t see them manually going through the wordpress history, either.

    Thanks for looking into it. I’m currently looking at using the Teensy 2.0 with AVR-keyboard firmware as a basis, but I’m curious to look at your code samples. I wanted to see how you handled polling the matrix, debouncing, etc.

    Cheers!

    1. Dirk Porsche says:

      I’m still having no trouble opening the links. Please try this ones:
      #3 https://shiggyenterprises.wordpress.com/2012/10/18/creating-your-own-keyboard-from-scratch-keyboard-matrix-and-key-layout/
      #4 https://shiggyenterprises.wordpress.com/2012/10/19/how-to-create-your-own-keyboard-from-scratch-key-debouncing/
      #5 https://shiggyenterprises.wordpress.com/2012/10/19/how-to-create-your-own-keyboard-from-scratch-the-final-version/

      But most parts of the code are hosted on github as gists. Here is the earliest: https://gist.github.com/Crenshinibon/3915145

      I began building a second version of the keyboard and decided to go with a teensy as well. But I didn’t get very far and the project is on hold for some time now. I wish you luck with yours and would be really interested to hear/read about your results.

  3. diredesire says:

    #3,4 are both dead for me. Can you try opening them in incognito or private browsing mode? Maybe log out of word press? I suspect you can see them but they are hidden or unpublished…

    Thanks for the git link, I’ll check it out. Cheers!

    1. Dirk Porsche says:

      Hey, you are right. I couldn’t see them in incognito-mode, either. I guess they were unpublished when I fixed the github references lately. I hope I didn’t forget any.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s