Touch Mouse and Keyboard Sharing:
the description first, then pictures and how I hacked it later.
Teensy switches and manages a four port USB switch with four LED's
and four touch sensor buttons
Please visit and donate to synergy-project.org.
would like to explain my love and addiction for a program called
Synergy. It shares a keyboard and mouse between multiple computers.
One computer with a keyboard and mouse is set as a Synergy server,
then other computers are added as clients and communicate over a
local network. I love that its Open Source, multiplatform, and has a
quick smooth transition from one screen to another.
network dependent so any computer or router with a hint of
connection problems fails.
client keystrokes like passwords and account numbers go through the
local network, although there is an option for encryption.
can be complicated with mixed platforms.
can not be used on screens where the client is disabled. For
example; BIOS setup, Windows user account control, live CD's, some
network passwords and user logins.
How its hacked:
purchased this four port USB switch years ago to avoid the
aggravation of swapping USB plugs every time Synergy disconnected.
the USB switch into a hardware solution by having the Teensy
Microcontroller do the switching for me.
It originally worked by pressing the only switch, which increments the port number by one, and back lights the port number LED.
If you cut the board in two, I would want the lower half behind the desk, out of sight with all the wires. The upper half looks like it needs a hacking onto the top of my trackball!
Desoldered the LED's.
I tested the circuit with a multimeter and the wiring was confusing at first because the left pair of LED's connect anodes to ground, and the right pair connect cathodes to the same ground. To keep it simple, and to utilize the built in resistors...
... I kept the circuit the same through the CAT-5 wires:
Each pair of LED's gets three wires: LED#1+, LED#2+, common pair ground.
Plus two to short the switch underneath.
Homemade two pin female jumpers made from two pin headers.
Common ground wires matched in pairs.
Back in its shell. Cable runs through missing LED hole, strain relieved by a cable tie on the inside.
A USB switches' worst nightmare...
... and kept alive to see its own working LED's amputated and transplanted on my track ball.
The wire on the third LED is a hacked experiment for touch sensors on LED's.
Desktop integration on three computers:
Cable restrained to the base. The more flexible wire female jumper wires connect to the solid wire, then taped.
Then plugged directly underneath the transplanted LED's
The third jumpers connect under the touch sensor wires.
Connecting the Teensy:
I used an NTE R56S-5D.5-6 reed relay: (5v, 3.8v min), and a "flyback diode." The relay does not have a built in diode. (the "R56S-5D.5-6D does; that first "D" is tricky. NTE_R56_57specs.pdf )
Thanks to the PJRC forums for the information on the flyback diode saving the Teensy from sure death from the relays coil. Next time I will get the ones Paul recommended;
The NTE116 (1N4004) diode and the relay were in stock at my small local electronics store.
Jumpers made from two pin female headers and solid strand wire:
The two header sockets have the wire insert 3mm pin fix. The two male pins are bent together into a two pin jumper, and then soldered to the wire. This connects the relay to the diode in parallel. See relay pins pictured above.
Two pin jumpers relay to diode:
Two pin jumpers on the Teensy side make for easy access breakout sockets on top.
The code for the Teensy is simple:
See which LED is being
touched, figure out how many steps from the current port to the desired
one with some simple math, then send that many long...
Read more »