Universal Serial Bus (USB)

There are many varying standards for USB.

USB2.0

Modern keyboards generally operate at USB 2.0 speeds.

USB (2.0) connections consist of the following four lines:

  • one for power (+/5V/VCC)
  • one for ground (-/GND)
  • a pair of data lines

Below is the pinout of a USB-A connector:

image

Micro-USB

Smaller USB connectors are preffered for devices such as keyboards or phones. Micro-USB is an example of one that used to be very popular (there is also mini-usb/usb-b).

Below is the pinout of a Micro USB connector:

image

Type-C

Many keyboards nowadays opt to use a USB Type-C connector. Type-C connectors have a few extra pins required for hitting USB 3+ speeds that aren’t important for USB 2.0 operation.

These are the pins on a standard Type-C connector required for a USB 2.0 keyboard:

image

Type-C connections running on USB 2.0 devices also require 5.1k pullup resistors between the CC pins and ground. You’ll see this in the schematic for the keyboard later in the guide.

Note: There are different types of Type-C connectors (e.g. top mount, mid mount).

Extra

This is an optional (but interesting and informative) video on USB and how it applies to keyboards.


Continue:
MCUs