Arduino Mechanical Keyboard



The keyboard transmits CMD + control + shift + F1 - F12 and 1 - 3, to cover all the keys. Using BetterTouchTool, these inputs can be mapped to various actions for each app. Besides this, the top left key 'master', when long pressed, transmits CMD + control + shift + option + F1 and puts the keyboard. Keypads are generally used as input devices that take input from the users and process it. Membrane keyboards are characterized by the use of keys that are pressure pads with symbols printed on them. This is in contrast to a mechanical keyboard, which features separate and individual keys. Because of their design, membrane keyboards are smaller and more compact than their mechanical counterpart.

  1. Use Arduino As Keyboard
  2. Arduino Nano Mechanical Keyboard
  3. Arduino Keyboard Example
  4. Arduino Mechanical Keyboard Download

The Hardware

Assembly

Use Arduino As Keyboard

  1. Solder the 500mah jumper on the trinket backpack for batteries larger than 500mah
  2. (Optional) Cut the switch trace on the trinket backpack and solder a micro switch between the two contacts. See https://learn.adafruit.com/adafruit-pro-trinket-lipoly-slash-liion-backpack for more details
  3. Solder the trinket backpack to the Bluefruit micro
  4. Solder the micro USB power connections to ground and 3.3v on the Bluefruit Micro
  5. Solder the Data ( + ) pin(PS2 clk) of the micro USB to pin 2 on the Bluefruit micro
  6. Solder the Data ( - ) pin(PS2 data) of the micro USB to pin 3 on the Bluefruit micro
  7. Solder all batteries in PARALLEL to the trinket backpack
  8. Plug the micro USB into the keyboard and double stick tape the electronics

Battery life and charging Create games for mac.

  • Battery life depends on the size of your battery, power consumption of your keyboard, and the power level of your bluetooth
    • I haven't tested my battery life with 6000mah battery nor have I measured the power consumption( multimeter broken :( )
    • I can run a 12 hour work day with stock bluetooth power settings and medium backlight with no problems
  • You can charge the keyboard through the micro USB on the bluefruit.
    • I usually charge mine when I leave work

The Software

Setup

  1. Download my git repo
  2. Install the proper drivers
  3. Download the adafruit Bluefruit library
    1. Add to your arduino library
  4. Add Adafruit board support in Arduino IDE


Update your BLE module

  1. Download the adafruit app
    1. https://play.google.com/store/apps/details?id=com.adafruit.bluefruit.le.connect&hl=en
  2. Follow this procedure
    1. REMEMBER TO GROUND THE DFU PIN
Arduino matrix keyboard


Arduino mechanical keyboard

Upload the Firmware

Arduino Nano Mechanical Keyboard

  1. Open this project in the Arduino IDE
  2. Select Bluefruit Micro as your board
  3. Select the proper serial port
  4. Click upload


Configure and connect

  1. Hit shift + ctrl + esc on your MODIFIED keyboard
    1. This will reconfigure your bluetooth module for keyboard use
    2. Bluetooth is now named 'BLE_WASD'
    3. Do this again if your keyboard ever stops working randomly
  2. Connect your keyboard to your computer or phone
    1. I have only had luck with Windows 10(it was able to solve the funky driver errors from the adafruit bluefruit module)
    2. Windows 7 was a no go
    3. Windows 8 is untested
    4. Android only works upon first pairing
    5. Apple products untested

Arduino Keyboard Example

Hacking

Arduino Mechanical Keyboard Download

  • This code will work with any arduino and bluefruit module, you just need to change the pinouts and stuff.
  • This code supports 100% of the PS2 receiving protocol(one way communication) and has some extra features for a WASD keyboard(media keys)
  • Use the `special_functions( )` function to do custom things with your keyboard. Like make a T9 number pad.
  • You can change the power output of the Bluetooth module to increase range or save battery