Skip to content

rogerta/ModelM-BT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModelM-BT

ModelM-BT is an Arduino sketch used to bluetooth-enable an old IBM Model M keyboard. It is based on an original idea described at Adafruit's website.

The original project's code is based on a hacked and incomplete version of TMK Keyboard Firmware and it's huge! So I decided to write my own code with the following properties:

  1. small footprint
  2. easy to understand, very well componentized
  3. fully unit tested, have confidence it works
  4. interrupt driven solution rather than bit banging

To this end, I first implemented a fully generic and reusable library for interfacing with PS2 devices called PS2Utils.

I wrote Bluefruit, a simple class to interface with Adafruit's Bluefruit EZ-Key module. I put PS2Utils and Bluefruit together into a complete sketch to fully enable my keyboard.

Pictures of the keyboard at various stages of development can be found on my Google+ stream.

BOM

The following hardware components were used to build this project:

  1. A old Model-M keyboard (thanks Stef!)
  2. OSEPP Nano, Arduino Nano compatible
  3. Adafruit Bluefruit EZ-Key
  4. Adafruit PowerBoost 500c
  5. Adafruit Lithium ion polymer battery
  6. Wires, buttons, resistors

If I were to do this again, I'd make the following changes:

  1. Use an Arduino Pro Mini board, to make the modified keyboard as power efficient as possible. While the OSEPP is great for prototyping, it has too many unneeded components like voltage regulators, USB circuitry, and extra LEDs for a production device.
  2. Use a 3.3V Arduino rather than a 5V part. Not only would this use less power, it would obviate the need for the resistors to connect the Arduino to the Bluefruit.
  3. Put the PowerBoost 500c micro USB port much closer to the outer casing so that it would be easier to plug in for recharging.

Schematic

Schematic

Special Features

Because Model M keyboard were built long before the Windows key was added to keyboards, this sketch remaps the Caps Lock key as a Windows key. To get a real Caps Lock, press ALT+CapsLock.

Hold ALT+KeypadMinus down for five seconds to pair the keyboard with a computer. The pairing will be remembered until the keyboard is re-paired. Tested with Windows 7, MacOS 10.10.3, Ubuntu 14.04, and Android Lollipop.

This project uses a rechargeable battery, so I never need to open up the keyboard to change batteries. The keyboard only lasts 13+ hours on a single charge though, so it needs to be plugged in every day.

Building

To use this sketch, first install the PS2Utils library into the IDE. Then clone this repository as follows:

$ git clone git@github.com:rogerta/ModelM-BT.git

Open the ModelM.ino sketch and upload it to your Arduino.

Written with StackEdit.

About

Code to bluetooth-enable an old IBM Model M keyboard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages