If I’m reading the pinout diagram here correctly, it looks like mouse and keyboard cables have 4 wires (or at least, four that actually do anything). Cat5 has 4 twisted pairs: seems like I should be able to use it to make an extension cable of sorts, right?
Any reason I can’t cut a mouse/keyboard cable, insert in a length of Cat5, seal everything up, and be in business? Would I be better off using both wires from each pair to bridge each original wire or should I just use one wire from each pair?
My main concern is that “+5 DC @ 100mA” wire. Can a single Cat5 wire or twisted pair take that?
They make both USB and PS2 male female extension cables. You can get these at practially any electronics store for 10-15 dollars or get them online for 2-4 dollars. . Once you get much past 6 feet of extension in either USB or PS2 potential problems will crop up in signal attenuation. Splicing your own can be done but is kind of messy and pointless given the cheap alternatives.
So, financial considerations aside*, the problem with my plan is that if I want to go over 6 feet, the keyboard and/or mouse won’t work right any more?
*Lets assume I have spare Cat5 lying about and don’t pay myself for my time. $0 < $2
Yes it may or may not. Ive seen PS2 extensions out to 16 feet (6 foot KB + 10 foot extension) work and extension as short a 6 feet fail. If your time and materials are as cheap as you say “go long” and if there are problems keep slicing and shortening until it’s no longer a problem.
USB cables can’t be extended beyond about 5 metres due to (I think) timing problems with the clock pulse signal - or something like that.
That’s not to say you can’t extend the range, just that you can’t do it with the addition of plain cables - you can buy paired devices that you connect to either end of a Cat5 cable up to 50 metres long, and use a USB device at the end of that reach.
I used these to put a USB webcam inside a bord nesting box in my garden.
RE: the wiring itself, you don’t need to use both wires in a pair. Wire is wire at these levels of power. Lots of times the wiring inside of speakers rated for hundreds of watts is as thin or thinner than the stuff inside cat5.
So, your main concern should be signal degradation over long distance – whatever wire you have should work fine.
So either my caliper is off (it is one of the cheapest ) or the specific piece of cat5e I have on my hands is actually thicker. Since I had problems fitting RJ45 jacks on this specific cable I guess it really is thicker than AGW 24.
Let’s see. One thing at a time. From a bandwidth point of view, keyboard and mouse are ridiculously slow compared to ethernet and you should be fine.
Any of those wires can handle 100 mA with no problem (and much more).
The combined mouse + keyboard have: +5V, Gnd, Kbd clk, Kbd data, mouse clkc, mouse data. That is 6 conductors. Cat 5 has 8 so you can double the Vcc and the Gnd.
The main problem with distance might be voltage drop over the power conductors and the only way to really know is to measure actual current used and calculate or better measure wire resistance.
But on the whole you should be fine for many meters. I use recycled cat5, even with splices, to send even video over 50 ft and it works just fine.
I have done keyboard & mouse extensions and they are extremely easy and forgiving.
PS/2 mouse and keyboard signals are the unbuffered outputs of microcontrollers. They aren’t meant to be driven any distance. You can probably make it work out to about 15 or 20 feet. After that, line capacitance and voltage drop due to resistance is going to kill you. Electrical noise is going to be a problem too. The bandwidth is very slow compared to ethernet. However, you are talking about unbuffered 5 volt TTL signals here. The signal doesn’t have to drop much before the microcontroller on the other end starts getting garbled data.
Doubling the Vcc and Gnd is an excellent way to turn all of that wiring into a loop antenna to pick up extra radiated electrical noise around your house.
As Mangetout said, there are devices made for this sort of thing. USB ones are common. You’ll have a hard time finding PS/2 extenders these days, but I imagine there are still some out there.
We have all agreed that there are better ways of doing this but the OP has insisted he is interested in getting an answer to the specific question he asked and I see no reason to keep insisting. He has already been told but he still wants an answer.
Each machine is going to be different and in my (limited) experience these experiments generally work better than expected. The data lines are open collector at both ends and in one case I have seen little degradation over about 35 ft with plain multiconductor cable of much worse quality than cat5. I can’t see how I can say to the OP that it is not worth trying. He says he has the cable and the time. Why not? What’s to lose?
I do not understand this. Even with regular, untwisted, cable I had no problem. Both the keyboard and the mouse are going to have bypass capacitors and they could even be enhanced if necessary, which I don’t think would be. Then, furthermore, I do not understand how doubling up would “turn all of that wiring into a loop antenna to pick up extra radiated electrical noise around your house”. I am not saying use one pair for Vcc and one for Gnd but use a wire from each pair for Vcc and the other wires from each pair for ground. In any case, as I say, I think the possibilities of this being a problem are very small.
I used to have a computer that, when the hard disk worked, would generate and radiate electrical noise all over the place. The audio would pick it up and it was everywhere and yet the keyboard and mouse worked with no problem.
As I said, I am using Cat5 cable spliced in several places to send composite video and audio from one room to the next and remote control info back the other way. When I started out I had no idea if it might work and the odds were not good and yet in the end in worked and I was lucky enough that the remote link was much easier than anticipated. At the TV end I found that the composite video signal from the Sat receiver after that distance was much better formed, sharper, than the analog composite video generated locally.
The OP says he has the materials and the time and is asking if it is worth trying. He is not asking for a guarantee that it will work. Only if there is a chance that it might work and therefore worth trying. My assessment is that it is worth trying and the odds are relatively good that it might work. Of course, it depends on the distance.
Also, a person knowledgeable and with test equipment can troubleshoot and correct much better than a person who is blindly just trying things.
Like astro I would say to the OP: Go for it, you have nothing to lose. If it doesn’t work you have lost nothing but a bit of time in exchange for some valuable learning experience. I cannot guarantee that you will succeed but if you try you might, if you don’t you won’t.
There are devices available which allow you to move your keyboard and mouse up to 500 feet away, with a Cat5 connection between. I have used them on occasion, and they work OK for most purposes. Here’s an example: