Electronic KVM USB Switch for PC Keyboard
by Milen in Circuits > Computers
686 Views, 5 Favorites, 0 Comments
Electronic KVM USB Switch for PC Keyboard
I have few computers on my desk and to make chaos smaller for all of them I use only one keyboard connected to USB KVM switch. The original was cheap mechanical - based on a push button. Few months it was working fine, but some time ago it started to make problems - the commutation was broken - I had to press and press again the button until it connects properly the keyboard to the desired computer. It is known that the weakest parts in electronics devices are always the mechanical parts. So... I decided to make fully electronic KVM USB switch. This Instructable describes its creation.
Original KVM Switch Reverse Design
I wanted to use the same housing of the old mechanical switch. Its extracted PCB is shown on the pictures. The new electronic one has to have the same dimensions and all USB connectors have to be placed on the same positions. In this way the new PCB would fit directly in the old KVM case. For that purpose I measured precisely all the dimensions of the old PCB, whole holes coordinates and parts positions. All this was drawn on sheet of paper used after that a base for the new PCB design.
Electronics Design
The main part of the electronic KVM USB switch is the Texas Instruments TS3USB221E High-Speed USB 2.0 (480Mbps) 1:2 Multiplexer – Demultiplexer Switch Chip. (The datasheet is attached). That solved the problem with the 2:1 Multiplexing. Now there was sought a solution how to omit the mechanical switch. Instead it I decided to use a touch sensor. I chose the TTP223 module. It can be found almost in all electronics online shops. Its advantage is that it has programming solder bridges, which can define its working mode. I needed to force it in triggering mode - one touch on, next off...and etc. For that purpose the bridge "B" have to shorted. Because the TI chip TS3USB221E works on 3.3V supply, which is also accepted by the TTP223 I added a 3.3V Voltage regulator AMS1117-3.3V with all needed surrounding caps. The TTP223 controls which USB connector is passed to the output one. On its output I put also both LEDS indicating the active USB channel. The power supply USB lines from the computers sides are separated by use of Schottky diodes ( PMEG3050EP - 5A, low voltage drop). The KVM switch has also micro-USB supply port, which I never used and omitted in some of the designs.
The PCB
The view of the PCB can be seen on the attached pdf file. The PCBs were produced in PCBWay. They are known with their high quality production. (They were recommended to me also by ChatGPT). The whole production and delivery was done within a week! The gerber files are available for production here.
Downloads
PCB Assembling
Of course PCBWay offers also assembling services. The TS3USB221E is difficult to solder with normal soldering iron - you would need hot air soldering station or hot plate one. If you do not have such instruments at home, may be it would be easier for you to use their assembling service. ( you can request to be soldered not all the parts, but these, which are more difficult for you). The USB connectors used are through hole ones - you can find such in Aliexpress or other online platforms. On the second picture can be seen a comparison between the original mechanical board and the new electronic one (the touch sensor is mounted on the housing and further connected with wires to the board)
Works on the Housing
For active USB channel LED indicators I used 2mm green LEDs bought from Aliexpress. I have to cut the light leading tubes for the old ones and to fix the new ones inside the rests of them.
I wanted also to change the colour of the touch sensor and to hide its labels. For that purpose I used a yellow paint spray. I fixed the touch sensor on the hole off the mechanical switch by the use of epoxy glue. The LEDs were connected with tiny wires.
Final Assembling
After soldering of all cables to the board, it was placed on the right position. The bottom cover was mounted and fixed with its screw. On the included video you can see the performance of the switch. Have in mind that after switching of the USB channel, you have to wait few seconds for the new keyboard initialization.