When you finish this tutorial you will have a working keyboard and understand how a key matrix works.
All the tutorial example sketches run on breadboard keyboards that have 2 to 8 keys. Breadboard keyboards have row-column matrices and diodes just like the big keyboards.
A breadboard is the easiest way to learn keyboard electronics. Electronics are fickle, and you won’t get everything right the first time. There is a learning curve. Compared to PCBs, breadboard keyboards are easier to learn on because:
Breadboard keyboards are useful for:
The parts needed to build all the tutorial Breadboard Keyboards are listed in breadboard_keyboard_supplies.ods.
Wire cutters (or nail clipper) is the only required tool. A multi-meter is useful for trouble shooting.
To understand the breadboard keyboard you will need to know the internal parts of a breadboard:
These are explained in How to Use a Breadboard
This excellent article explains how the microcontroller, matrix, switches and diodes work together: How a Key Matrix Work
The basic breadboard has 4 switches and a microcontroller.
The key matrix has two rows and two columns. Breadboard power rails are repurposed as matrix rows. Short bare wires connect terminal strips into matrix columns. Switch-diode pairs connect rows to columns.
The green rectangle on the right is the Teensy 2.0 microcontroller. The matrix rows and columns connect to the microcontroller via jumper wires.
Breadboard keyboard assembly instructions:
Follow the keybrd Library User’s Guide to set up the Arduino environment and to compile and load keybrd firmware onto the keyboard’s controller.
Sometimes its useful to prototype a full keyboard matrix before designing the PCB. Several breadboards can be tied together into one.
keybrd tutorial by Wolfram Volpi is licensed under a Creative Commons Attribution 4.0 International License.
Permissions beyond the scope of this license may be available at https://github.com/wolfv6/keybrd/issues/new.