Journal 2017/03/02 #3

Project Plan

Materials

– Teensy 3.1, 3.2, LC, etc… or Arduino-based stuff like the Micro, Trinket, Due, Leonardo, etc…
– 4 x Cherry MX switch of choice (salvaged or new) (Get plate-mount if mounting via the plate; use PCB mount if your case is thick)
– 4 x Cherry MX key caps of choice (salvaged or new)
– 24-30 AWG wire
– Solder
– Soldering Iron
– Arduino IDE w/ Teensy Bootloader
– LEDs (Optional)

Creating the case

  1. Download and install a modeling program compatiable with 3d printing. (In this case I have choose blender. This gives me the chance to learn a new software program)
  2. Designing the case, The design I will be taking inspiration from will be located as a picture below. The design can be created using a variety of programs and made of different materials. The square for the cherry switches will be 14mm x 14mm and the keycaps will be 18mm x687474703a2f2f7075752e73682f6d476538562f626166643764613539352e6a7067  18mm. Its important to space your project apart accordingly.
  3. Note that the method of design for case I have chosen is 3d printing but there a variety of different methods you can choose from for example using a old case or a cnc machine. The end result could end up looking something like this.687474703a2f2f7075752e73682f6c334d794f2e6a7067

Wiring in the buttons.

Until I get more clarification or practice wiring in the buttons on the teensy board, Its difficult for me to say exactly what is required. In any case I found a wiring diagram that could be followed. As I update the project I will make sure to include pictures for every step along the way.

687474703a2f2f7075752e73682f6d4767526d2f366161353865643230322e6a7067

Programming the arduino.

This will be a task that I will have to learn about throughout the project, coding arduino is a new experience that I have no done before. In any case I have found example code for the arduino teensy that you can base your project off.

#include <Bounce.h> // this is needed to use the bounce library

#define KEYP_1 KEY_Z // here we are making it easier to change the key bindings later

// button pins
const int key_1 = 0; // input pin for your keyswitch; not necessary but helpful for doing other things like LED effects

Bounce button1 = Bounce(0, 8); // first number is pin number and second number is debounce time

void setup() {
pinMode(key_1, INPUT_PULLUP); // here we are telling the teensy what pin 0 is being used for
}

void loop() {

button1.update(); // this is reqired for your code to  actually send the keypress to the computer

if (button1.fallingEdge()) { // fallingEdge is when the key is pressed
Keyboard.press(KEYP_1);
}
if (button1.risingEdge()) { // risingEdge is when the key is not pressed
Keyboard.release(KEYP_1);
}
}

Key switch flowchart

bhho4ou

Problems

Throughout this project I expect to encounter several problems that I will have to deal with. In the meantime it comes down to me choosing parts and finding something to do while the parts come in. Luckily I have the chance to learn the code for arduino and to practice using the blender software.

References

https://osu.ppy.sh/forum/t/411237/start=0 (This website explaisn the project in an easy DIY format).

https://mechanicalkeyboards.com/mechanical_switches.php (This features a list of switches and the differences between each one.)

The point of the project

Now you might be asking yourself, why would I ever want a keypad with only four keys?

This keypad could be used for a limited application of things, therefore would not be ideal for consumers, but can be very useful to those in need of a compact keypad. It can be used for a variety of games, programming macros or as a media control keypad (play, pause volume up, volume down.) In the end the project is also customizable to your own needs allowing you to design more buttons if required.

Advertisements

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