Showing posts with label USB. Show all posts
Showing posts with label USB. Show all posts

Tuesday, 31 March 2020

Simple USB KVM adapter

With the shadow of Covid-19 hanging over our heads, I, like many others, am now working from home.

Having my home PC set up right next to my work set up has been a bit of a pain - two keyboards and two mice competing for desk space. Plus the work keyboard and mouse was a spare wireless set I had kicking about - not really comfortable enough for long-term use.

The monitor I attached to my work laptop was the second monitor I use for my home set-up - thankfully it has two inputs, so that's an easy one-button switch.

I wanted to use my main keyboard and mouse with my work set-up as well as home, but didn't want to unplug/replug each time.

I also wasn't too keen or just ordering a USB KVM adapter (a device which lets multiple computers share keyboard, mouse and monitor), as recently some of our local postal and delivery works have fallen ill, and so I'm avoiding any non-essential deliveries - I don't like the idea of putting others at risk for stuff that's a 'nice-to-have'.

So I figured I'd look through the electronics pile and see what I could piece together.

I did have a PS/2 KVM that I was hoping to adapt, but having read the datasheet for the bus IC that underpins it, it had a low maximum current rating - it might have been fine for just a keyboard or a mouse, but the keyboard I want to use has a backlight, audio controller and USB hub built in, and a brief look with

lsusb -v

showed that they would easily surpass that maximum rating.

Software options are also a no go - whilst they'd been fine when working locally, they won't work with my work's VPN, and the IT guys have enough on their plate without me adding to it.


So, I ended up going for the simplest of options. I had some relays - they were obviously meant for higher power application than this, but found that wired up in parallel, 5V was enough to trigger them. I was planning on powering it from a USB port, so 5V was the target.

A rough schematic of the switch


Unfortunately they had a weird footprint that put one of the pins in between rows on standard perfboard, so I ended up dead-bug soldering them.
A diode across each of them to prevent voltage spikes from the coils, some USB extension leads and a switch later, and I had a 4 channel switch.

I was a bit concerned at the lack of a protective load on this circuit, but adding any additional resistance from the power to the relays would prevent them from switching - as they're really designed for higher power applications, I reason that the coils have enough power requirement to prevent a short.

I have ran it for a few days under close observation and seen no temperature / magic smoke issues, and it's only ever powered when I'm sat right in front of it, so it should be fine. Obviously if this wasn't a "whatever's at hand" project, there'd be much more elegant ways of doing this (bus IC, 4 pole switch, more appropriate relays, etc), but here we are.

A gratuitous amount of cable ties, double sided tape and an old business card box provides structure and an enclosure. I'll probably tidy it up a bit more later as time allows, but for now it's enough that it works.


Tuesday, 11 February 2014

Wacom Graphics Tablet from broken HP TX2000 tablet PC

I acquired one of these laptops after it malfunctioned. Apparently this is a known issue of overheating.
I initially tried to fix it by reseating the graphics chip, which worked for a while, however it quickly began to malfunction again.

So I tore it apart to see if there was anything useful I could scavenge.

It's well documented that laptop screens are near-impossible to get working as standalone monitors, due to the differences in the way they communicate with the computer compared to regular screens, so instead I set about trying to make the touch screen work as a standalone tablet.

I was expecting this to be quite difficult. Turns it it's one of the easiest hacks I've ever done.

There's a 9 pin connector that connects the digitizer. In amongst those 9 pins, there's USB pins.

It's not a simple case of soldering on a full USB plug though, the tablet works at a lower voltage (3.3v) than the standard 5V.

To overcome this, putting 3 N4148 diodes on the voltage line was sufficient to drop the power to a usable level. This isn't an exact measurement, but it works.

A standard Fedora 16 desktop install comes with wacom drivers pre-installed, so the software side of things was basically plug-and-play. The only change I made was to change the pen mapping from absolute to relative, which was better suited to my monitor setup.