Jump to content

Ducky keyboard repair and USB Type C introduction/explanation

minibois
 Share

While this topic is relatively image heavy, I tried to keep the images as small as possible. All pictures together are just over 4.6MB in size.

Table of contents (be sure to use Ctrl+F to navigate through the thread):

Spoiler

[0] Introduction to this topic
     [0.1] Naming used in this topic
[1] USB protocol and connector
     [1.1] USB basics and its various connectors
     [1.2] Internal wiring and back- and forwards compatibility
             [1.2.1] USB Power
             [1.2.2] USB Data
             [1.2.3] USB 3.0 and its name change
             [1.2.4] USB 3.2 Gen 1 (and above) and their backwards compatibility
[2] USB Type C
     [2.1] Connector pinout
             [2.1.1] Pinout on the board
             [2.1.2] USB Type C 2.0 PCB pinout
     [2.2] USB Type C reversibility, source/sink capability and different power levels
             [2.2.1] USB Type C receptacle/connector pinout
             [2.2.2] Resistors and the CC pins
                        [2.2.2.1] Source/sink identification and providing power
                        [2.2.2.2] Connector reversibility
                        [2.2.2.3] USB Type C Power Delivery
                        [2.2.2.4] “Wait, but can’t I just use one resistor for both CC pins?"
             [2.2.3] The type of resistors used on a keyboard
[3] The Repair
     [3.1] Background information
     [3.2] Assessing the PCB damage
             [3.2.1] Testing the functionality of the board using test pads
     [3.3] Soldering a USB Type C port in place
     [3.4] USB Type C breakout boards
             [3.4.1] Designing a breakout board PCB
     [3.5] Attempt two at repair: with a USB Type C breakout board
     [3.6] The screws/standoffs
[4] End result and pictures
[5] (Re)sources / Further reading / Links
[6] Frequently Used Terms
[7] Frequently Asked Questions
[8] License
[9] Changelog

[0] Introduction to this topic
One of my colleagues knows I’m a fan of (mechanical) keyboards, so handed me a Ducky One 2 Mini keyboard and told me to not flip it over. Of course that was the first thing I did, which is when I noticed all the screws were missing on this board.
This keyboard seemed to have suffered a rough fate, as not only were all screws missing, one of the standoffs on the board was slightly damaged, but I hadn’t noticed the worst yet. The USB Type C port was missing, it seemed to have been pulled off the board as some of the pads on the PCB were gone too.

z3.thumb.jpeg.28183356ec7f6cec5ef18d1e747d4553.jpeg

This thread will cover my experience of repairing this keyboard, while at the same time also giving some information on how the USB (2.0) Type C port and specification works.

Any thoughts, corrections and criticism will as always be appreciated.

[0.1] Naming used in this topic

This section is here to make certain the wording and terms in this topic are clear.

Receptacle / Connector

A device which supports USB Type C will have a receptacle on it, which allows you to plug a cable into it. The connector on your device (i.e. on your phone/computer/etc.) will be called a ‘receptacle’ and the plug on a cable will be called a ‘connector’. A receptacle receives a connector and two connectors with a cable in between is used to connect two receptacles together.

USB Naming

With 25 years of evolution on the USB specification together with the introduction of new technologies within this standard, name changes are inevitable. This thread will use the current version of all the terms and technologies in the USB specification.

 

For example, after USB 2.0 we got USB 3.0, which was later renamed to USB 3.1 Gen 1 and then to its current name of USB 3.2 Gen 1. The latter of these three - the current name - will be used.
Another example is how USB has been designed originally as a ‘Master/Slave’ protocol, which describes a protocol where one device (master) controls one or more devices (slave(s)). Especially in the last years this term has grown outdated and controversial, being replaced by Host/Device, Source/Sink and DFP/UFP (Downstream-/Upstream Facing Port) for the various parts of communication.

‘Device’ is a word commonly used to describe any type of physical apparatus, instead of “Host/Device”, this thread will describe it as “Host-/Sub-device”. Device will describe any and all devices, no matter their Host/sub roles.

 

These terms and technologies will be explained further in their respective sections. This section is here to explain any possible discrepancies with your own knowledge of these terms and the words used in this thread.

 

[1] USB protocol and connector
After years of progression towards the USB specification, USB now exists in many shapes, sizes and speeds. The physical connector decides what cables fit in what receptacle, while the connections within these cables/connectors/receptacles decide the speed and extra features available (such as charging and Displayport alternate mode).
[1.1] USB basics and its various connectors.
USB works with a host- and sub-device approach, where the two devices connected both have a different role in communication. It’s either a host- or sub-device and the way this communication used to be achieved was through the physical connectors present. The most famous USB connector is ‘USB Type A’, also known as ‘regular USB’ thanks to its near ubiquitous use over the last 25 years. This rectangular connector has been used on a myriad of devices, such as desktops, laptops, TV’s, etc.


When USB Type A was launched, a connector for sub-devices was also introduced, named ‘USB Type B’, which in modern times would be called a “printer connector”, because of their use on printers - both back then and still now - but this connector is also used on other USB devices, such as scanners, hard drives, USB hubs and much more. These USB Type A and B ports are great for desk equipment, but when portability became a much more important aspect in devices - such as external hard drives and at a later point mobile phones - it was important to make a smaller USB standard. That meant the introduction of smaller USB host- and sub-device connectors, namely USB Mini A, Mini B and at a later point Micro A, Micro B and Micro AB.

 

Though the smaller host-connectors (Mini/Micro A) and the host-/sub combination connector (Micro AB) didn’t see wide-spread use, the same cannot be said for the smaller sub-connnectors: Mini B and Micro B.  Mini B was the default connector for many smaller peripherals - such as the PS3 controller, various hubs, etc. - but Micro B was definitely the better known small sub-connector as the de facto standard for (non Apple) smartphones and tablets for years, until USB Type C was made.

 

USB Type C sought to unify the host- and sub-connector types, to create one default connector for any type of device to use. This connector achieves this feat by following the default USB wiring and adding some wires and components as needed. To effectively discuss these differences, we must first discuss the default USB wiring.
[1.2] Internal wiring and back- and forwards compatibility
USB provides data-communication and also power transfer between devices. 
Power is handled through one more positive voltage and ground pins. Data is transferred through one or more differential pairs, which are wires of equal length working as a pair to transfer the data from or to a device.

The way power and data work will be discussed in separate chapters, as well as the ways how USB achieved higher speeds above USB 2.0.
[1.2.1] USB Power
USB provides its power through a positive voltage pin(s) (colored red) and creates a circuit using its Ground (pins) (colored black). Without both positive voltage and Ground, a circuit is not completed and power cannot be transferred. This power is typically 5V, but higher voltage modes exist using the “Power delivery” standard of USB Type C (discussed later).

The amount of current USB supports will depend on the version (2.0, 3.1 Gen 1, etc.), its mode (low- vs. high-power) and whether it is Power Delivery compliant. The total power is decided by the combination of the voltage and current and lies somewhere between 0.5W and 240W.

 

Most desktop peripherals will be somewhere in the neighborhood of 0.5 - 15W, as the higher power targets are either for charging devices (like phones, laptops and tablets) or for larger devices (such as monitors).
[1.2.2] USB (2.0) Data
USB works with differential pairs for the transfer of data. The amount of pairs a receptacle, cable and connector has depends on the version of USB used. USB 2.0 has a single data pair, which are colored green and white for Data+ and Data- respectively.

 IMAGE1.thumb.png.96b87522ff5537d99f299de208eedee8.png
Together with the positive voltage and Ground a USB 2.0 cable will have four wires on the inside and has a maximum of 480Mb/s of transfer speed.
[1.2.3] USB 3.0 and its name change
After wide-spread adoption of USB 2.0 in the market, USB 3.0 was released to address higher speeds and more power in 2011. The theoretical max speed went from 480Mb/s on USB 2.0 to 5Gb/s on USB 3.0, a roughly 10x increase. This feat was achieved by adding two data pairs (4 wires) which would be used for USB 3.0 data transfer

Later USB IF released an even faster version than USB 3.0 using the same pinout, which doubled the speed from 5Gb/s to 10Gb/s. They named this version of “USB 3.1 Gen 2” and also renamed USB 3.0 to “USB 3.1 Gen 1”.
When introducing the doubling in speed with USB 3.2 Gen 2x2 (‘2x2’ being pronounced as “Two by Two”) they again renamed the previous 5Gb/s and 10Gb/s USB versions to their current names of “USB 3.2 Gen 1” and “USB 3.2 Gen 2” respectively.

 

Whether or not this renaming of 5Gb/s and 10Gb/s was a good idea I will leave up to you to decide. Regardless, this thread will use the current names of USB 3.2 Gen 1 and USB 3.2 Gen 2, to conform to the current standard.
[1.2.4] USB 3.2 Gen 1 (and above) pinout and their backwards compatibility
One of the beauties of USB is its backwards and forwards compatibility, when it comes to using older/newer cables with older/newer connectors.
Newer versions of USB include more data pairs for higher speeds and incorporate higher power levels, while still retaining the original data pair of USB 2.0 for flawless backwards compatibility.

 

USB 3.2 Gen 1 was the first iteration on USB 2.0 - originally being named USB 3.0 - and it increased the speed from 480Mb/s to 5000Mb/s (5Gb/s) using two data pairs (TX+/- and RX+/-):
IMAGE2.thumb.png.cd2c7310b1d765d83da8dbaea78e5579.png

USB 3.2 Gen 1 also increased maximum power consumption, in the low and higher power bracket of devices. Going from 0.5W to 0.75W on low power devices and increasing from 2.5W to 4.5W on high power devices. Forward compatibility - plugging a USB 3.2 Gen 1 device into a USB 2.0 port - is made possible by USB 3.2 Gen 1 devices having a USB 2.0 mode, where the trade-off might be slower charging and data transfer. Although not all USB 3.2 Gen 1 devices will work on USB 2.0, it is generally expected for a USB device to have backwards- and forwards compatibility.

USB 3.2 Gen 2 doubles the speed compared to USB 3.2 Gen 1 - from 5Gb/s to 10Gb/s - while using the same pinout of USB 3.2 Gen 1.

 

USB 3.2 Gen 2x2 yet again doubles the speed, but now only exists in a USB Type C connector. To facilitate its reversible connector - more on this in [2.2] -, USB Type C has the USB data pairs duplicated on the top and bottom row and during USB 2.0/3.2 Gen 1/3.2 Gen 2 simply either uses the top or bottom data pairs. As the 2x2 (pronounced as ‘2 by 2’) implies, instead of using either the top two or bottom two pairs, this standard now uses all four data pairs as individual data pairs, allowing for speeds of up to 20Gb/s.


[2] USB Type C
USB comes in many varieties of host- and sub-connectors and in different generations, allowing for different speeds. The goal of USB Type C is to provide a single connector appropriate for all scenarios. USB Type C can be either a host- or sub-connector, while previously most connectors were either one or the other, but not both.

USB Type C can also be all different generations of USB, allowing for different speeds from 480Mb/s to 20Gb/s. Its extra features - such as higher power levels and extra modes such as audio/displayport adapter modes - make it a highly versatile connector.

This thread will focus on the USB 2.0 implementation of USB Type C, as that is overall still the standard on keyboards, including the Ducky One 2 Mini which is the repair subject. The newer USB modes work in mostly the same way, just with different and more data pairs.
[2.1] Connector pinout
USB Type C has 24 pins, 12 on either side of the connector:

Compared to USB Type A 2.0’s 4 pins, or USB Type A 3.2 Gen 1/2’s  9 pins, that is a plethora of pins of various uses. While power and data pins are of course still included, USB Type C also has certain pins dedicated to host-/subdevice detection, reversibility and extra modes.
The reversibility and different modes of Type C shall be discussed in [2.2] and [2.2.1].
[2.1.1] Pinout on the board
The part of the USB Type C receptacle always has to be the same for the cable to plug into, it’s still possible to vary with the design of the receptacle in the way it mounts on the board and how the pins are connected on the PCB.
In what way the USB receptacle mounts to a PCB is known as a ‘footprint’, which will have a resulting ‘pinout’.

A USB Type C uses up to 24 pins. With the receptacle being 9mm wide (compare that to your pinky finger’s nail) it’s simply not possible to have all those pins next to each other. Most footprints use two rows of pins to account for the amount of connections needed. These connections can be through-hole (THT) - so visible on the other side of the board - or surface-mount (SMD), which means the pads are underneath the receptacle.
The THT approach allows the receptacle to be soldered in place using an iron, where-as the SMD approach requires the use of more advanced equipment (hot-air station or oven).

IMAGE3.png.63572a2c3167c6b6f849215667e4f938.png

Note the double row of gold SMD pins. These Type C receptacles also exist in a through-hole variety.

 

My previous thread* goes into much more detail about the general anatomy of a PCB, including the differences between SMD and THT.

While all 24 pins are needed for USB 3.2 Gen 1 and above functionality, USB 2.0 doesn’t use all of Type C’s pins, so the connector on the board can be made using fewer pins, allowing for easier hand soldering and a smaller footprint on the PCB.
This previous project* used a USB Type C footprint with 12 pins and so does this Ducky keyboard, so I had some familiarity with the footprint and the layout of pins, plus I also had some Type C receptacles fit for this keyboard laying around too.

For what I hope is obvious reasons, these accessory pins are unused on keyboard PCB’s, including this Ducky board.


*link: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/
[2.2] USB Type C reversibility, source/sink capability and different power levels
USB Type C has a plethora of advantages compared to its predecessors, such as its ability to be a host- or sub-connector and the higher power and speed capability. One of its most well-known qualities is the reversibility of the connector. Gone are the days of plugging in the cable the wrong way twice before being able to plug it in, as the connector can be plugged in both ways.

 

This feat of reversibility is achieved through clever cable and receptacle design, as well as some additional electronic components on the source and sink side devices.
[2.2.1] USB Type C receptacle/connector pinout
A USB cable has a connector on it which will plug into the receptacle on your PC/laptop/phone/keyboard/etc. USB Type C can be plugged in both ways, which means there is a ‘flipped’ and ‘unflipped’ orientation for the connector. The connector and receptacle are designed around this reversibility, using a clever setup of pins with some being duplicated and some pins dedicated to detecting the orientation of a cable.

 

Below are the pinout of a USB Type C receptacle and connector:

IMAGE5.thumb.png.918925fbe54815f94956863f8692d6f1.png

Keep in mind we’re looking at the front of both the connector and receptacle, meaning one of them is mirrored when plugging in to the other. For example, looking at the top row of the USB Type C receptacle it counts from A1 to A12, while on the connector it counts from A12 to A1.

The pinout when shown on a cable and receptacle would look like this, so just visualize the cable turning around before it plugs in, also turning around the pins:

IMAGE6.thumb.png.2579f8954108286788c37d2a351c0632.png

 

The pinout on the connector and receptacle possess a radial symmetry, so that when it’s flipped around 180° it’s exactly like not having it flipped.
When a cable is plugged in the ‘unflipped’, A6 on the cable makes connection with A6 on the receptacle and when ‘flipped’ A6 on the cable will make contact with B6 on the receptacle, both A6 and B6 on the receptacle being USB 2.0’s D+.
This symmetry in connection holds true for all the other pins too, including the power pins - GND and VBUS -, the TX and RX data pairs, SBU and CC.
[2.2.2] Resistors and the CC pins
This section will focus on pins A5 and B5. Those are CC1 and CC2 on the receptacle side and CC and VCONN on the cable side.
A device with a USB Type C receptacle needs to have these resistors, which handle a range of USB Type C features. These features include host- and subdevice detection, power level requested and the orientation of the plug. Communication between two devices will only be initiated if these resistors are detected on the CC pins.
[2.2.2.1] Source/sink identification and providing power
The USB specification in the past featured host- and sub-connectors, as discussed in [1.1]. USB Type A is a source connector, while (mini/micro) B are sink connectors. We’ve probably all had the thought once - or had someone ask us - if it’s possible to use a USB Type A to Type A cable to connect two computers together for data transfer. This isn’t possible, because the computers would both assume they’re the source device and start giving each other power.

Best case scenario, your devices would throw an error and worst case scenario it can break something, as a part of circuit suddenly gets power instead of just sending it out.
Legitimate USB Type A to Type A cables for data transfer do exist, but they have some special circuitry inside to allow for this use.

 

USB Type C on the other hand can be used as a host- or sub-connector.
It can appear on your computer or laptop, as a host-connector and can also appear on your mouse, keyboard or headphones as a sub-connector. A resistor is attached to the CC pins of the USB Type C receptacle and the other goes to either VBUS (‘pulled up’ to positive voltage) or GND (‘pulled down’ to ground).
If it’s connected to VBUS: it’s a host device
If it’s connected to GND: it’s a sub device.

 

This way the device on either side of the USB Type C to Type C cable can see if the device on the other end is a host- or sub-device. If both are a host or both are a sub, they won’t connect together. If one is host and the other is sub (or vice-versa), a successful connection is made.


This ‘handshake’ is typically done on the side of the host-device, while the sub-device is passive. This means a keyboard just has the resistors and no additional circuitry to detect a source device. Some more advanced sink devices - chargers in particular - do try to actively look for a source device. This is why a cable with a resistor to ground would work for most use-cases (as the resistors are detected on the source side and the sink side doesn’t look for them and just connects), it does give up some compatibility issues with certain devices which do require detection from itself to the other device.

 

While a lot of devices are exclusively host or sub, a third type of device exists as well, the so-called ‘Dual Role Port’ device (or DRP for short). A device like your phone might need to be a sub-device in certain scenarios - such as when it’s connected to your computer for data transfer - while in other scenarios it needs to be a host-device - like when connecting a USB Type C hub or headphones to it.
A DRP controller is used to switch between the host- and sub-device mode. These controllers work by choosing the opposite mode of what it’s connected to (so when a host-device is connected to the DRP controller, it becomes a sub-device and vice-versa). I already hear you asking - just like I did myself - “But what if two devices with a DRP controller are connected together?!”. The somewhat underwhelming answer to this question is that host- or subdevice status is chosen randomly.

 

The host-device in the relation will only start giving power to the sub-device once a successful connection is made between the two devices.
[2.2.2.2] Connector reversibility
The CC pins are also used to identify what way the connector is plugged into the receptacle, right-side ('un-flipped') up or upside-down (‘flipped’). 

The orientation doesn’t matter for USB 2.0 functionality, as the D+ and D- are simply connected together on the PCB*, but it does matter for USB 3.2 Gen 1 and above. The speeds of these newer USB standards are hindered by the so-called ‘dead-ends’ that exist when connecting two pins on the PCB together.

IMAGE7.png.1963c7c0956f3df8784a6a2abb5d91b0.png

*The two D+ and two D- pins are connected together on the PCB side, but this isn't recommended to do with the higher speeds of USB 3.2 Gen 1.

 

A nonactive USB Type C cable will have a single wire which - depending on the cable orientation - goes from CC1 or CC2 on the host-device receptacle side to either CC1 or CC2 on the receptacle of the sub-device. The orientation of the cable is based on if either CC1 or CC2 is connected to a resistor (pulled down to ground) or not.
An active USB Type C cable (which supports higher lengths) has its own circuit which will connect to the usually leftover CC pin, which is why it’s important to have two resistors on each device, more on this in [2.2.2.4].
[2.2.2.3] USB Type C Power Delivery
One of the other advantages of USB Type C is its ability for a wide range of power standards, anywhere from 2.5W to 240W. How much power a device can use is decided by the value of its resistors. A calculation is done using the value of the resistor(s) (which is measured in Ω/Ohm) to decide how much power a device can use (at most). 

The different power levels are discussed in the USB IF Power Delivery (PD) specification should you be interested in what resistors you need for your projects.
[2.2.2.4] “Wait, but can’t I just use one resistor for both CC pins?”
No, you cannot.
Or more accurately, you can, but that would not be adhering to the full USB IF specification of USB Type C, meaning (active) cables - which use both CC pins - wouldn’t work with your device.

 

When the Raspberry Pi Foundation released the Raspberry Pi 4, the first revision(s) contained a single resistor for both CC pins. USB Type C relies on a resistance value to know how much power it should provide. By having a single resistor, the equation of both resistors together wouldn’t give the right number using a single resistor. Because of this singular resistor, the device on the other side would think the Raspberry Pi 4 is an audio device, so power wasn’t provided to it.

This article goes in more depth about the issue: https://www.scorpia.co.uk/2019/06/28/pi4-not-working-with-some-chargers-or-why-you-need-two-cc-resistors/

 

Even though a single resistor for both CC pins seems like a great way to save space (and a bit of money), it shouldn’t be done to make sure all cables work with your device, as per the full USB IF specification.
[2.2.3] The type of resistors used on a keyboard
Now that we’ve figured out resistors are important to USB Type C to decide a device’s configuration of host-/sub-device mode and power level, it’s easy to find out what type of resistors are needed.

A keyboard typically uses a little amount of power (compared to what USB Type C could output), so 5.1kΩ (5100Ω) resistors which allow for up to 1.5A power output are the right choice.
Keyboards are sub-devices, which connect to a host-device (such as a desktop PC, laptop, etc.), so these resistors connect to the CC pins and are then pulled down to Ground, so a host-device can detect this is in fact a sub-device.


[3] The Repair
With all the background information on USB Type C out of the way it’s time to address the damage on the keyboard and the method of repair.
The USB Type C port of this board was ripped off - somehow - and it also took some of the pads with it. That is the biggest bit of damage on the keyboard, which will be discussed first. The broken standoff/missing screws will be discussed later.
[3.1] Background information
This part will lean lightly on the information presented in my previous thread about my keyboard eLiXiVy, specifically the anatomy of a PCB (which is discussed in section [2] of that thread). This previous thread has been updated slightly since last posting it. While the steps on how to create a PCB were accurate for hobbyist or home-use, this method of manufacturing does not reflect the steps a large-scale manufacturer takes. The layers of the PCB were accurate, so with the knowledge given in the previous thread you will be able to follow along with this thread, but feel free to check the previous thread for the corrected information.

 

The main thing to know about a PCB is that it’s a layer of fibreglass, with copper on it, but only in certain places to create traces, which act as wires to connect components together. Most of this copper is covered with a layer of soldermask, to make sure nothing can (accidentally) connect to it. Some of the copper is not covered with this soldermask however, to create a point which can be soldered to. This is what we call a ‘pad’.
[3.2] Assessing the PCB damage
This keyboard is missing its USB Type C port and it seems like the USB port didn’t come off cleanly, taking some of the (12 in total) pads off of the board as well.
Using the pinout discussed in [2.1.1] it was possible to determine what pads are gone. Most of them are in very bad shape or totally missing.

This keyboard PCB uses the same types of USB Type C receptacles as my eLiXiVy custom PCB, so while I had some receptacles laying around, I also had some familiarity with the footprint on the keyboard.

IMAGE8.jpeg.3673ec102206a27e649a420b6fe652e5.jpeg IMAGE4.png.855f510b5086e3468b45eff3ea3f23e4.png
Because this USB Type C connector is on the bottom of the keyboard PCB, going from left to right is going from pin 12 to pin 1.
The state of the pins:

  • Pin 12 (GND): Good
  • Pin 11 (VCC): Good
  • Pin 10 (CC2): Gone
  • Pin 9 (SBU2): Gone (not needed though)
  • Pin 8 (D+): Half gone
  • Pin 7 (D-): Half gone
  • Pin 6 (D+): Gone
  • Pin 5 (D-): Half gone
  • Pin 4 (CC1): Half gone
  • Pin 3 (SBU1): Half gone (not needed though)
  • Pin 2 (VCC): Good
  • Pin 1 (GND): Half gone

Which means: 3/12 are in good order, 6/12 are half gone, 3 are fully gone.

 

While I have the receptacles already, the missing pads would serve a problem though, specifically the missing D+ and CC pads. 

A missing D+ pad means a cable will only work when plugged in one way, while the missing CC pad means the detection of orientation will only work when the cable is plugged in one way, both not great to have on a reversible connector.

The half gone pads were in decent enough state to still solder to, so I did have something to work with.
[3.2.1] Testing the functionality of the board using test pads
Before spending time soldering a new connector in place, it was important to first know if it’s even worth it to put any effort in this keyboard. The USB port is broken off, the screws are missing and a screw post is a little mangled; who knows what else is wrong with the board.

 

This revision of the Ducky One 2 Mini features some pads on the board just below the USB Type C port likely meant for a JST header:
IMAGE9.jpeg.74e4003a9fdbfef19c0726f563b9f2c1.jpeg

The SMD pads on the keyboard.

Likely meant for a header like this:

IMAGE9.png.8d824abb32c1b5b2bc290598ec1cf45c.png
These types of headers make it easy to connect two PCB’s together using that header and a cable.

I had some suspicion these pads on the board would have USB functionality and by grabbing a multimeter and testing I found the four USB 2.0 pads: D+, D-, VCC and Ground.

 

Before proceeding forward with some more complicated ways of repair, it was time to do a quick test to see if the keyboard is in working order. Soldering a couple wires to these pads on the PCB and connecting a micro USB board was easy enough.

IMAGE10.jpeg.6d2a936b30f9dda0932f64bb9b70633a.jpegIMAGE11.thumb.jpeg.752f285c48a1d5b7fd1c14a3577744ba.jpeg
Plugging in a cable revealed success! With RGB and all, this board is in working order. Just had to reset it real quick, as it seemed to be stuck in some weird 'RGB-showoff' mode, but after that it’s all working.

This gave me the confidence these pads on the board would actually work for the repair, so I moved onto the next step.
[3.3] Soldering a USB Type C port in place
What seemed to be the obvious step now, was to grab a Type C receptacle and solder it in place on the board. The problem though is the missing pads, specifically CC2 and D+ (one of them), which are essential for full compatibility. My first instinct was soldering a USB Type C connector in place on the board and connecting small wires to the pins of the missing pads. This soon turned out to be a big mistake, as it proved to be impossible to solder the needed wires in place.

 

The USB Type C receptacle is roughly 9mm * 7.3mm (0.36” * 0.29”) in width and depth, or roughly the size of an adult’s pinky finger nail. Just imagine a connector of that size having 12 pins along its width and trying to solder a wire just to a single of those 12 pins. 
At some point I did have a wire attached to D+ and D- (I decided to solder a wire to both, just to be safe both are connected the same) and while it looked fine, testing what parts of the USB Type C receptacle the wires were connected to showed both wires were connected to two connection points (both to their respective data pin, but accidentally the other data pin next to it to).

 

After trying to fix up the wires for a little bit, I decided this wasn’t going to work. My tools, equipment and skills just weren’t up to what it took to solder a wire to a singular pin.
This is not impossible to do, as there are quite a few videos online of people repairing devices with USB Type C ports (i.e. phones and Nintendo Switches) using tiny wires to connect receptacles to pads, but it didn’t work out for me.

 

Unfortunately while removing the USB Type C receptacle I accidentally ripped up all the already half gone pads. Just after making this mistake I felt really stupid, but with hindsight I can say mistakes should be something you can’t be afraid of admitting, but always make it a point to learn from your mistakes.

The mistake of ripping off these pads turned out to not be a huge deal, as I already have a plan B lined up, which doesn’t involve these pads on the board, but rather involved a custom PCB.
[3.4] USB Type C breakout boards
With the USB Type C pads being mostly gone from the keyboard’s PCB and connecting tiny wires to the receptacle proving impossible, it was time to look at an alternative solution.


A USB Type C breakout board is a tiny PCB with a USB Type C receptacle soldered on it. This tiny PCB has a few pads on it, exposing the power and data pins of the USB Type C receptacle (VCC and GND for power, D+ and D- for USB 2.0 use and optionally the TX and RX data pairs too for USB 3.2 Gen 1 functionality). These pads on the breakout board would just connect to the ‘test pads’ on the board, as described in [3.2.1]. 

 

A breakout board would be easy to use, but there would still need to be a way to actually adhere it on the board. The holes on the board where the USB receptacle was originally soldered into would be perfect to use (as it ensures a proper fitment of the port, relative to the keyboard case), but all the off-the-shelf options didn’t allow for this.

After contemplating the various options, I opened up KiCAD to design something myself.
[3.4.1] Designing a breakout board PCB
When making a PCB it’s important to consider the purpose. That means keeping in mind what it should do and what physical limitations you’re working with.
In this case the purpose was quite simple. This board had to solder to the SMD pins of a USB Type C receptacle, expose D+, D-, VCC and GND, have room for the two CC resistors and most important of all: it has to be small and install on the 'wrong side' of the receptacle:

IMAGE12.png.7c29e65a5187bbe481afa4ac9b2aab3a.png

White = Keyboard PCB, Grey = receptacle, Yellow = receptacle pins, Green = breakoutboard

With those design requirements and limitations in mind, it was time to open KiCAD to first set up the schematic. That schematic was easy to make, as it just involved wiring up VCC/GND/D+/D- to four pads and placing two 5.1K Ohm resistors on the CC pins.

IMAGE13.thumb.png.17c127f75d27ff53b5461d5c213deb09.png

(I promise this all might seem a lot more complicated than it really is, in reality this is a very simple schematic).

 

After the schematic was done, it was time to start designing the PCB. With the size limitations and the overall design in mind the overall layout was quickly made. Now it was time to place the components on the board and route the traces between them, all while keeping the board as small as possible yet still easily accessible, giving me this as an end-result:IMAGE14.thumb.png.0db3631ea7f9b7a04ac305d6b9c170db.png

This is the front and the back

It was named ‘Non-standard Type C Breakout Board’ because the standard for one of these boards is to install it on the bottom of the SMD pads; not the top. Soldering the receptacle from the other side wouldn’t even work, as the D+ and D- would be switched around and CC and SBU would be switched with each other. Most of the text on this board was made way too small though, as I just didn't consider the size of individual letter when working on this. When seeing a board on a big screen it's way different than in real life!
Making this PCB - including the schematic - took about an evening's worth of time and after that it was time to wait on the PCB to arrive from the manufacturer.
[3.5] Attempt two at repair: with a USB Type C breakout board
After receiving the USB Type C breakout board, it was time to attempt the repair for the second time.
When working on a PCB in software it always looks like a normal size, but when you then receive it, it suddenly looks much smaller. It's about 7.6 x 5mm (0.3" x 0.2"), but here it is compared to a CR2032 battery for a bit of comparison:

IMAGE15.jpeg.10cceaeb3988c8847834bdeaf7e24f6a.jpeg

 

Step #1 was soldering the USB Type C receptacle to the board. This proved quite difficult, as there is very little of the receptacle’s pins that actually make contact with the pads on the board. After a bit of work, it was soldered into place; although with the minimal contact it wasn’t a connection I had much confidence in. After that, it was time to solder the two 5.1KΩ resistors and the wires, to give me a board like this:

IMAGE16.jpeg.76dc24c6a926674b0dcd91c9c9fcec36.jpeg

Definitely not the prettiest solderjob, but soldering at this size is still quite outside of my comfort zone.

At this point, this is an untested PCB design, so before soldering the receptacle to the board it was wise to first test it out by soldering the wires to the test pads (like done before with the first test). The test was a success, so it was all set to solder to the keyboard!

 

First adding some electrical tape so the Type C receptacle pins don’t make contact with the keyboard pads, afterwards soldering the Type C in place was easy. Braiding the cables together gave them a neater look and some electrical tape ensured no contact between the cables and other conductive parts of the keyboard. Electrical tape doesn’t look great and I would’ve much rather use heatshrink, but unfortunately when I used that the heatshrink and cable insulation melted (causing me to have to replace the wires).

IMAGE17.thumb.jpeg.074db88504053b978e148c6811fe6491.jpeg

Because I tested the board before soldering the receptacle in place, I knew it would work, but now it also was in place in the correct position!

Should you be interested, I’ve open-sourced this board. It can be found here: https://github.com/minibois/mini-non-standard-type-c-breakout
[3.6] The screws/standoffs
The screws leftover from a previous mechanical keyboard project unfortunately were not the right size. On forums some people said this keyboard uses M2 screws (screws with a 2mm diameter), which unfortunately I didn’t have around. After searching through a couple bins of screws, I didn’t find many screws fit for this board, as most of them were either too wide or too narrow. After a bit of searching I found three screws fit for the job. Three screws out of six total.. 50%, good enough for me!

The slightly broken standoff needed a wider screw, but otherwise it worked out well. The screws were too long for the shallow standoffs on the board, but after cutting and filing the screw the keyboard is now in place


[4] End result and conclusion
There are different goals to have in a project and it’s possible to change, adapt or drop these goals while moving through a project. In my last thread I mentioned the importance of finishing projects too. This proved to be important for myself once again in this project. 

 

One of the goals in this project was to take my overall approach to refurbishing, which can be described as “make it look like it had no work done to it”. With the USB Type C soldered into place in the original position, I think I managed to hit that goal, but you can be the judge of that! 

z4.thumb.jpeg.fa8b16afc4d53643344274301ec57030.jpeg

Of course the inside doesn’t look original though.:ph34r:

Other than the USB Type C repair, I wanted to further mod this keyboard, by putting the well-known open-source (keyboard) firmware ‘QMK’ on it (more about this firmware in my eLiXiVy thread), but unfortunately this revision of the One 2 Mini keyboard has an unsupported processor (microcontroller) for QMK.

 

This project also forced me to learn more about USB Type C, which has given me more ideas for future projects as well. More on this in the future of course!

Many thanks for reading. Any feedback, criticism and overall thoughts would be lovely to hear!

[4.1] Pictures

Here I have a couple pictures which didn't fit in the rest of the thread, but I still wanted to show off.

Spoiler

z3.thumb.jpeg.28183356ec7f6cec5ef18d1e747d4553.jpeg

 

z.thumb.jpeg.96c4f77d1bd0661116fdb58d6aafd5e5.jpeg

 

z2.jpeg.d4cb3326fb805c2b8158dce726df212c.jpeg

[5] (Re)sources / Further reading / Links
Multiple sources were used to write this thread, in no particular order:

Spoiler

USB Type C specification (official documentation): https://www.usb.org/sites/default/files/USB Type-C Spec R2.0 - August 2019.pdf
Basic overview of USB Type C and information on Power Delivery (PD): https://www.ti.com/lit/wp/slyy109a/slyy109a.pdf

Raspberry Pi 4 resistor issue: https://www.scorpia.co.uk/2019/06/28/pi4-not-working-with-some-chargers-or-why-you-need-two-cc-resistors/

My previous threads:

Spoiler

Software used:

Spoiler

Gimp, for photo editing: https://www.gimp.org/
Inkscape, for the various graphics: https://inkscape.org/
KiCAD, for the PCB design: https://www.kicad.org/

[6] Frequently Used Terms
There are many (technical) terms used, this section will quickly describe some of the most used (and optionally where they’re discussed further).

Spoiler

USB Terms:
USB: A set of industry standards around physical connectors, power transfer and data communication
USB IF: USB Implementers Forum, a non-profit organization founded and run by a few large electronics (i.e. Intel, Microsoft, HP, etc.).
USB Type A/B/C: The different USB standards, defined by a physical connector, number of pins and other features (such as power transfer, reversibility, etc.). [1.1]
USB mini/micro: smaller USB standards based on USB Type A or Type B [1.1]
USB 2.0/3.2 Gen 1/ etc.: The USB standard which defines its speed and power, through the amount of pins in a cable/connector [1.2]
USB 3.2 name change: USB has had a few names changed, discussed in [0.1], [1.2.3]
Host-/Sub-device / UFP/DFP / Source/Sink / Master/Slave (depricated term): USB works with a system of two devices communicating together with a distinct role. The different names represent different parts of the relation [0.1], [1.1]
DRP: A type of controller that can decide the UFP/DFP role based on what device it’s plugged into [2.2.2.1]
Reversibility: the option of plugging in the USB Type C cable one way or the other [2.2]
(Un-)flipped: the way to describe the USB Type C cable orientation [2.2]
Receptacle/Connector: a receptacle is present on a device and a cable with two connectors is used to connect two devices together [0.1]
Back-/forwards compatibility: devices working with a cable of a newer USB standard and vice-versa [1.2.4]
Pinout: the layout of the connection points on a PCB, receptacle, connector or cable
 

Electronics:
PCB: Printed Circuit Board. A board made from fiberglass, with its purpose in a keyboard being to hold the components in place and connecting them together with traces (wires on a PCB)
Ground: The ‘return’ part of electricity, such as Anti-static discharges and also used to create a circuit for power [1.2.2]
VCC/VBUS: Positive voltage / power, depending on where in the circuit this positive voltage is, it may have a different name.
Resistor: an electronic device used in USB Type C circuits to distinguish host-/sub-device / power level / reversibility [2.2.2]
CC pins: The pins resistors are connected to [2.2.2]
THT: Through Hole Technology components have long legs that stick through a PCB and get soldered to a plate through hole to the board. These components include the switches, header pins and diodes. [2.1.1]
SMT: Surface Mount Technology uses pads on the board to solder SMD (Surface Mount Device) components in place. SMD components can be smaller than THT components and because they don’t stick through the board, it’s possible to design a PCB with SMD components on both sides. [2.1.1]
Breakout-board: A small PCB a USB (Type C) connector is soldered to, which makes the various USB functions (such as D+, D-, VCC, Ground) available to solder to [3.4]
JST Header: a place to connect a (ribbon) wire, to easily connect a breakout-board or other type of daughterboard. [3.2.1]
Test pads: SMD pads on the board which possess various functionalities (i.e. USB 2.0 connectivity) [3.2.1]
 

Soldering:
Soldering: The process of joining two components together (like the PCB and component) with soldering tin
Soldering iron: A tool to heat up the two components, to make the soldering tin flow between them
Soldering station: A device that includes a soldering iron, but also has a base station which allows you to change the temperature of the iron.
Solder(tin): a metal (combination) used to melt between the components you want to solder together. Typically consists of Sn (tin) and Pb (lead) in a 60/40 ratio. Lead free options typically include - other than tin - metal like Ag (silver), Cu (copper), etc.

[7] Frequently Asked Questions

Feel free to ask any questions you may have about this project, if I tend to get certain questions more often I'll post them in the FAQ spoiler below.

Spoiler

Q: How did the keyboard get in this state? / How did it get damaged?
A: Unfortunately I don’t know the backstory of this keyboard.

 

Q: Can this be done as a mod to a Mini/Micro USB keyboard?
A: Micro USB is physically a different size, with different through-hole legs. While the whole breakout-board part may be possible to do, you would need to find a way to properly install the port (and probably shave away some of the case to accommodate the larger Type C port)

 

Q: Is the breakout-board open source?
A: It will be, just have to tidy up the PCB, schematic and repository to add all needed. Repo can be found here: https://github.com/minibois/mini-non-standard-type-c-breakout

 

Q: What screws did you use for the keyboard?
A: Not 100% sure. I think they're around 2mm diameter, but not sure. The lengths vary by screw post.

[8] License

Spoiler

This thread is licensed under the Creative Commons Attribution-ShareAlike 4.0 license (CC BY-SA 4.0).

The short explanation of this license can be found here: https://creativecommons.org/licenses/by-sa/4.0/ and the full license can be found here: https://creativecommons.org/licenses/by-sa/4.0/legalcode

Under this license, you are permitted to share and adapt this content how you see fit, provided you credit this guide and use the same license (CC BY-SA 4.0) for any adaptation.

[9] Changelog
Dates are noted in ISO 8601 (YYYY-MM-DD)

Spoiler

2021-10-17: Thread created

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, James Evens said:

Nice. Reminds me how I did this:

image.png.44e3f02dd73330ade0ac8cd5ebd1f20f.png

At first I thought of getting a flex PCB for a while too, as it seemed very applicable for this use too

But then again, it's not something I have experience with, so I decided to go with the more 'comfortable'/'safe' option of a normal PCB.

 

Flex PCB's are definitely on my list of things I want to experiment with in the future

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×