/slowiki-30-keys-keyboard

Handheld tactile switch keyboard for Teensy 3.2 compatible boards.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

30-keys-keyboard

Handheld tactile switch keyboard for Teensy 3.2 compatible boards. It consists of a modified fork of:

v1.0 Photo

./hardware/v1.0/images/wikiboard.jpg

Features

  • 30 keys arranged in a 3x10 matrix (uses 13 pins on the microcontroller).
  • Silkscreen has a qwerty layout, the first row keys act as a number if pressed longer.
  • Lead free ENIG-RoHs surface finish with 2oz copper.
  • SPI, I2C, and 2 additional GPIOs broken out.
  • Each pin along the edge of the Teensy is connected to one extra pin in the prototyping area.
  • Beginner friendly through hole soldering.
  • Layout is completely customizable in the firmware.

Parts list for a fully working keyboard

  • 1x Teensy 3.2 or Teensy LC. A Butterfly STM32L433 will also work (though not as a USB keyboard).
  • 10x 1N4148 Zener Diodes
  • 30x Panasonic EVQ-PAC04M Tacticle Switches. These are the quieter and higher quality switches. Some are available at digikey. If you wish to use the 3d printed faceplate the overall switch height must be 4.3mm. These models will also work: EVQ-PAD04M EVQ-PAE04M EVQ-PAG04M. Otherwise any standard 6x6mm momentary switch will work.

Firmware

  • The layout for USB keyboarding is defined in the usb_key_matrix variable in LayoutThumbKeyboard.h
  • If you don’t need a USB keyboard and are rolling your own hardware project then you can focus on the layout defined by the ascii_key_matrix variable in LayoutThumbKeyboard.h
  • USB can be disabled by commenting out define USE_TEENSY_USB_KEYBOARD.
  • All the keyboardy goodness is handled by the keyboard_update(); function called from inside the standard Arduino loop().
  • If you don’t need the keys to behave like a keyboard you can gut most of that example and just use key_matrix.update(); The KeyboardMatrix class handles reading the button states.

Compiling on Windows machines

  1. Using a Teensy 3.2 or Teensy LC follow these directions for downloading and installing the teensyduino add-on to the Arduino environment: https://www.pjrc.com/teensy/td_download.html
  2. Once you have both installed. Launch the Arduino IDE and check what version of teensyduino is installed by going to Help > About Arduino. The about window for me shows Arduino 1.8.9 in the upper left and Teensyduino 1.46 in the upper right.
  3. Download the code archive from the firmware folder
  4. Extract that folder and move the firmware folder to: C:\Users\Username\Documents\Arduino\firmware
  5. Rename the firmware folder to teensy32_thumb_keyboard

    The full path should be: C:\Users\Username\Documents\Arduino\teensy32_thumb_keyboard

    And these files should exist inside there:

    KeyboardMatrix.cpp
    KeyboardMatrix.h
    LayoutCommon.h
    LayoutThumbKeyboard.h
    LinkedList.h
    slowiki-30-keys-keyboard.ino
        
  6. Open C:\Users\User\Documents\Arduino\teensy32_thumb_keyboard\teensy32_thumb_keyboard.ino in the arduino IDE.
  7. In the Tools menu select USB Type > Serial + Keyboard + Mouse + Joystick
  8. Click the verify or upload buttons in the toolbar. If compilation is successful you should see a message like:
    Sketch uses 27920 bytes (10%) of program storage space. Maximum is 262144 bytes.
    Global variables use 6680 bytes (10%) of dynamic memory, leaving 58856 bytes for local variables. Maximum is 65536 bytes.
        

Alternate Versions