Maker Pro
Maker Pro

USB Switch Y-splitter? First electronics project I've ever done!

Declan The Average

May 16, 2014
5
Joined
May 16, 2014
Messages
5
Hi,
I'm totally new to electronics. I've decided to start a project in which I hide a USB stick inside a numberpad. I've seen very simple versions where people remove the internals of the peripheral device and replace it with a male to female USB cord, and plug a thumb drive in one end. I don't want it to be this simple.
What I'm looking for is a numberpad which actually works as a number pad, so at first glance it appears totally normal.
When you press a button on it (ex numberlock), it switches from being a number pad to being a USB stick. the numbers no longer work, and the computer thinks the number pad has been disconnected, and a USB thumb drive has been connected.
When you press it again, it goes back to working as a numberpad.
So there are a few questions associated with this.
I was imagining simply cutting the existing numberpad cord close to the internals, stripping the wires, soldering them onto SOMETHING (4-pole switch, 2-pole switch, or some microcontroller) as one input, cutting a male-female USB cord near the female end and soldering those wires onto the other input, and then soldering the "output" USB (ie what connects to the computer).
Firstly, do you need a 4-pole 3-pole or 2-pole switch to do this? USB is made of 4 wires, ground, +5V, Data- and data+. At the very least you would need to swap between D- and D+ of each one (ie you would need a 2-pole switch), and you could leave the ground and +5V connecting BOTH "input" devices to the "output" all the time.
Alternatively, a 3-pole switch so only the ground is left connected all the time.
Alternatively again, a 4-pole switch so no crossing of messages can occur between devices when one is supposed to be connected and the other isn't.
Secondly, I don't want a physical switch to be added to this device. Like I said, I wish to use the EXISTING button to swap between them. I'm sure this would mean that the button has two wires coming in, and when it is pressed those two connect. Is there a small device which acts like a normal switch, but instead of turning a knob or pushing a button, you complete a circuit?
My absolute favourite solution to this would be that you need to push the button for 5 seconds or more to swap the two devices, so if you just tap it, nothing will happen.
I also would love if the 'default' was the numberpad, such that when you disconnect the device and plug it back in, no matter which device you were last using it as, it will FIRST appear as a numberpad to the computer when it is plugged in, even if the nubmer lock button has not been pressed.

Congrats on reading my whole idea, any thoughts guys?
Thanks so much!
-Declan the Average
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
See if you can squeeze a small hub in there as well as the usb stich. That way it can be both the keyboard and the stick at the same time
 

Declan The Average

May 16, 2014
5
Joined
May 16, 2014
Messages
5
I considered it, but 1) I couldn't find any cheap 2 way splitters, and 2) I was really hoping to have some sort of DIY spy-tech, so it would definitely have to be a swapping function rather than a simultaneous function.
 
Top