Skip to the content
4 layers162.6 × 99.1 mmKeyboard vero2, the printed circuit board in 3D

Schematics, board layouts, and code for adding a homebrew keyboard to your electronics projects

Size
162.6 × 99.1 mm
Copper layers
4
Thickness
1.6 mm
Parts
85
Nets
39
Pads
347
Tracks, vias
569, 187
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
8 Jun 2020
Updated
4 Oct 2022

Overview

Keyboard vero2 is an open-source printed circuit board by gfoot, from the gfoot/homebrewkeyboard repository on GitHub, published under the Unlicense licence. It is a 4-layer board of 162.6 × 99.1 mm with 85 parts on 39 nets, routed with 569 tracks and 187 vias.

It is built around the 74LS374PC. Its parts include 66 switches, 8 resistors, 8 diodes, 2 ICs and 1 connector. It belongs with the keyboards and input boards of this library.

Main components

1

README

README.md

George's homebrew keyboard

Schematics, board layouts, and code for adding a homebrew keyboard to your electronics projects

Photograph of assembled boards

This one uses a parallel interface, ideal for connecting directly to the address and data bus of something like a 6502.

I also have one with a serial interface, more tailored for Arduino - let me know if you're interested and I'll publish it as a separate project.

Schematic

Annotated schematic of George's Homebrew Keyboard (6502 edition)

Bill of materials

  • 8x resistor, 10k or thereabouts
  • 8x diode, e.g. 1N4007
  • 66x 4-pin push-switch with 5.08mmx5.08mm (0.2") pin pitch
  • 1x 74LS138 address decoder
  • 1x 74LS374 8-bit latch/register with tri-state outputs
  • 1x 15-pin header for connecting wires (ideally horizontal, with bent pins)
  • Veroboard - 39 tracks of 64 holes, or larger

General operation

Connect:

  • A0..A2 to the CPU's address bus
  • D0..7 to the CPU's data bus
  • PHI2 to the CPU's phi2 clock signal (the same one you use to time access to RAM, ROM, etc)
  • ~OE to a combination of phi2, R/~W, and some address decoding logic

~OE needs to be kept high unless all of the following are true:

  • phi2 is high (indicating the bus is active)
  • R/~W is low (indicating a write cycle)
  • high address pins map to keyboard I/O region

For the last one, my own 6502 computer simply uses an LS138 fed by the top three address lines, and one of the LS138's outputs drives this logic - the same way I generate chip-select signals for other memory-mapped parts of the computer.

Then the CPU can simply read from the mapped addresses. The lowest address - for example, $a000 - corresponds to one "row" of keys; each bit is 1 if the corresponding key is not pressed, and 0 if it is pressed. The next address, $a001, corresponds to the next "row", up to the final row at $a007. The word "row" refers to the schematic, not the physical layout.

As an example, the shift keys correspond to bit 1 of $a000; the ctrl keys correspond to bit 3. I think bit 0 is Esc, and bit 2 is the space bar. $a001's bit 0 corresponds to the tilde/backtick key; bit 1 is probably tab or Q; bit 2 is A; and so on. The exact layout was tweaked to make it easier to build on veroboard, while also ensuring that rollover works well with modifier keys in particular; as usual for this sort of thing, you need to do a lot more translation in software.

See the kbd module which contains a full table of characters by row/column.

Sample code

See sample code and kbd module.

Board layout

Physical board layout

The board layout shows the physical layout of the components. The veroboard tracks run horizontally, and - where they are used - they are shown in dark red. Green traces indicate fairly short links, mostly made with bare wire. Pink traces indicate longer insulated wire links. The (X) marks show where you need to break the existing veroboard tracks.

Some connections occur underneath switches, or pass entirely under a switch. This doesn't always work well in practice, and I ended up routing some wires differently to this diagram. It depends on the thickness of the wire and the physical shape of your switches.

Parts

85
QtyValueFootprintReferences
66SW_Push_45degkeyboard_vero2:SW_PUSH_6mmSW0, SW1, SW2, SW10, SW11, SW12, SW13, SW14, SW15, SW16, SW17, SW18, SW19, SW20, SW21, SW22 +50
810KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R2, R3, R4, R5, R6, R7, R8
81KDiode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1, D2, D3, D4, D5, D6, D7, D8
174LS138Package_DIP:DIP-16_W7.62mmU1
174LS374Package_DIP:DIP-20_W7.62mmU2
1Conn_01x15_MaleConnector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_HorizontalJ1

Similar boards

  • 2 layers231.1 × 106.7 mmSnark barker, the printed circuit board in 3D

    Snark barker

    schlae/snark-barker

    A 100% compatible replica of the famed SB 1.0 sound card

    199 parts687
  • 2 layers85.7 × 54 mmProDOS ROM Drive, the printed circuit board in 3D

    ProDOS ROM Drive

    tjboldt/ProDOS-ROM-Drive

    A bootable 1 MB solid state disk for Apple ][ computers

    17 parts77MIT
  • 4 layers337.6 × 105.7 mmISA CGA, the printed circuit board in 3D

    ISA CGA

    hkzlab/CGA_Redux

    The Color Graphics Adapter Redux board is a more or less faithful clone of the original IBM CGA, based on the original schematics

    170 parts56
  • 4 layers203.2 × 105.4 mmIBMExtender, the printed circuit board in 3D

    IBMExtender

    schlae/ibm-extender

    IBM 5161 expansion chassis extender and receiver cards

    44 parts33
  • 2 layers123.2 × 77.5 mmFMSoundGenerator, the printed circuit board in 3D

    FMSoundGenerator

    captainys/FM

    Code for Fujitsu FM-7 and FM TOWNS series computers

    58 parts27
  • 2 layers99.1 × 99.1 mmPlusd, the printed circuit board in 3D

    Plusd

    alvaroalea/plusD-clone

    Schematic of a clone of the Disk Interface +D for the ZX Spectrum

    69 parts25
  • 4 layers194.5 × 188.6 mmMyCpu, the printed circuit board in 3D

    MyCpu

    fortinsylvain/MyCpu

    Home brew CPU Hardware with 1-bit ALU implementation using 74LSxx, a micro-code and assembler coded in C#.

    162 parts18MIT
  • 2 layersCompaqportableIII, the printed circuit board in 3D

    CompaqportableIII

    raymondh2/CompaqPortableIII

    Current PCB Memory Expansion board layout is untested. The backplane for the expansion cards is tested and working.

    123 parts17

Questions

How big is the Keyboard vero2 PCB?

It measures 162.6 × 99.1 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Keyboard vero2 use?

85 parts, built around the 74LS374PC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Keyboard vero2 KiCad files?

From the gfoot/homebrewkeyboard repository on GitHub, at the commit this page was made from: the board is keyboard_vero2/keyboard_vero2.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Keyboard vero2 design in my own project?

Its repository publishes it under the Unlicense licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).