geekhack
geekhack Projects => Making Stuff Together! => Topic started by: HotKillerZzz on Sat, 05 July 2014, 07:38:45
-
Hi, I would like to know how to hardwire a keyboard. I would just like to make some with like 5-10 cherry keys. A very mini project like the business card from techkeys.
How do I go about? How do I wire the switches together?
Thanks for helping!
-
It has been done before. Do check around in the forum.
I would recommend a Teensy 2.0 chip as controller because there are lots of firmwares for it that you could adapt to support your layout, plus it is very small.
With such a small keyboard you could easily connect each switch to its own pin on the controller board, doing in effect a 1×5 matrix.
-
Yes I have found some posts that can help me, but I do not know what are the materials I need.
Currently what I know I need:
All the soldering equipment
Teensy
Hope you will be patient with me as I am still very new to this hardwiring concept.
Tell me what you need from me to help me, I am planning to give this mini keyboard to my brother
-
You need:
- keyswitches, keycaps, maybe stabilizers
- something to use as a plate (could be cut out of acrylic, metal, wood, ...)
- wire
- USB cable
- through-hole 1N4148 diodes
- resistors
- a microcontroller board (I recommend Teensy 2.0)
- soldering iron
- solder (get the leaded kind, either 63/37 or 60/40)
- flux
- ventilation (e.g. one of those solder fume extractor thingies, or a nearby window)
- some needle-nose pliers, some tweezers, and some tiny flush cutters (nail clippers work in a pinch)
Also helpful:
- multimeter
- panavise
- wire stripper
- nice desk lamp
- desoldering wick/braid
- solder sucker (e.g. Soldapullt)
- some dental picks
- heat-shrink tubing (and maybe a heat gun)
- hot glue gun
- jeweler’s loupe
Check out http://geekhack.org/index.php?topic=42824.0
-
You need:
- keyswitches, keycaps, maybe stabilizers
- something to use as a plate (could be cut out of acrylic, metal, wood, ...)
- wire
- USB cable
- through-hole 1N4148 diodes
- resistors
- a microcontroller board (I recommend Teensy 2.0)
- soldering iron
- solder (get the leaded kind, either 63/37 or 60/40)
- flux
- ventilation (e.g. one of those solder fume extractor thingies, or a nearby window)
- some needle-nose pliers, some tweezers, and some tiny flush cutters (nail clippers work in a pinch)
Also helpful:
- multimeter
- panavise
- wire stripper
- nice desk lamp
- desoldering wick/braid
- solder sucker (e.g. Soldapullt)
- some dental picks
- heat-shrink tubing (and maybe a heat gun)
- hot glue gun
- jeweler’s loupe
Check out http://geekhack.org/index.php?topic=42824.0
Nice list. Thanks for taking the time to put the list together. I will be hand wiring a keyboard with the Enabler PCBs, so this is a good checklist for me. :)
-
Ok so I have everything in that list, except for the diodes and resistors. Do you have a link to where I can get them? I searched but there were so many different types.
I have basic experience in soldering so it should not be a problem, now I just need to know which part to solder to. Do anyone have a diagram that you can provide? I saw some online but I don't understand, would be great if you could label them.
I will post a layout of the keyboard soon. Thanks!!! :blank:
-
What do you need the resistors for?
-
I guess you don’t need any resistors for just this project. (The internal pull-up resistors in the Teensy will suffice.) But they’re pretty generally useful if you want to build anything else (e.g. make protocol converters for old keyboards, or even just add a blinking LED). I dunno. I wouldn’t bother gathering together a few hundred dollars of electronics tools without also tossing in a few dollars of resistors, capacitors, diodes, LEDs, maybe some transistors, some random I/O devices, ...
-
Also, you only need diodes if you have multiple rows and columns in your matrix. If you only have one row or one column, there is no need for diodes.
-
Ok, I'm not very clear on this yet. :-\
So diodes and resistors are optional?
Under what kind of situation would you need the diodes or resistors and what are they for?
What kind of wire should I use too?
I went to here : http://wiki.geekhack.org/index.php?title=Hard-Wiring_How-To
I don't really understand.
If you don't use diodes then how do you connect?
Thanks!!
-
You need diodes if you have matrix which has both number of rows and columns bigger than one and (at the same time) you want to detect 3 or more simultaneous key presses correctly (without ghosting). This seems to explain it in detail: http://www.dribin.org/dave/keyboard/one_html/
-
You need diodes if you have matrix which has both number of rows and columns bigger than one and (at the same time) you want to detect 3 or more simultaneous key presses correctly (without ghosting). This seems to explain it in detail: http://www.dribin.org/dave/keyboard/one_html/
Oh Thanks!!
now i understand, how about resistors?
-
You need resistors only as pull-ups so that signal level is defined when input is disconnected (i.e. when no keyboard switch is pressed). We connect each input using a resistor to Vcc. You typically do not need separate resistors since the micro controller (e.g. ATmega32u4) typically has internal pull-ups. So you configure your micro controller input ports with internal pull-ups enabled and you do not need discrete resistor components.
In other words you always need pull up (xor pull down) resistors when scanning a keyboard matrix but your micro controller may have them built in and, in such case, they do not need to be bought separately.
BTW, if you would decide that you do not mind ghost key presses and go without diodes then you need a micro controller which provides open collector output. AFAIK, ATmega32u4 does not have open collector output option built in so you would need to convert TTL to open collector. Maybe there are chips just for this but if not then a simple cmos transistor array will do.
-
What do you need the resistors for?
You need resistors if you are going to put LEDS on the board. Even ones like caps lock, num lock, etc.
-
Oh ok, I get it.
So i am going to make a 5 by 5 keyboard. How should I wire them up?
It would be best If you can provide a diagram as I have 0 experience in this.
Thanks.
-
Check out http://deskthority.net/workshop-f7/brownfox-step-by-step-t6050.html
-
Ok I get it, then how do I connect to the pins on the teensy?
-
ok i figured how to solder the teensy and the wires but how do you program it. is there like a templatee for a 5x5 matrix?
-
http://geekhack.org/index.php?topic=51252.0
Can use that.
-
http://geekhack.org/index.php?topic=51252.0
Can use that.
Won't work for this project as nothing in the list for supported boards is a simple 5x5 layout and the software doesn't support custom layouts. Custom written firmware is going to be the way to go.
Search on how to write and compile a firmware using tmk.
-
http://geekhack.org/index.php?topic=51252.0
Can use that.
Won't work for this project as nothing in the list for supported boards is a simple 5x5 layout and the software doesn't support custom layouts. Custom written firmware is going to be the way to go.
Search on how to write and compile a firmware using tmk.
it really wouldnt work?
Wont it like just read the first 5x5 box?
-
I think hasu’s tmk_keyboard firmware is your best bet:
https://github.com/tmk/tmk_keyboard
http://geekhack.org/index.php?topic=41989
-
I much prefer soarer's keyboard controller firmware. It was very easy for me to set up, use, and test, and you dont have to compile code or whatever.
http://geekhack.org/index.php?topic=50437.0
After some frustration, I gave up on TMK_firmware. I have no further experience with it.
-
I much prefer soarer's keyboard controller firmware. It was very easy for me to set up, use, and test, and you dont have to compile code or whatever.
http://geekhack.org/index.php?topic=50437.0
After some frustration, I gave up on TMK_firmware. I have no further experience with it.
so which file do i edit in the config?
-
Thank you everyone for their help, I have built my own firmware using (http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html).
When my teensy arrives in my mail box, I will be able to start building.
THANKS!
-
Ok, so now i want to add leds, how do i go about doing it?
-
Ok, so now i want to add leds, how do i go about doing it?
Help?