Description: With a DPDT switch, I can switch the two data lines. I tried connecting the shields from the two computers together, the grounds two computers together, switching the D+ and D- lines with the DPDT switch, and leaving the VBus lines float, but for some reason it didn't work. The Lexmark printer seemed to need to see the +5 Volts. It had been many years since I read the USB standard (It was USB 1.0 back then) and I did not recall a function for the VBus beyond providing power to the peripheral, but in true experimentalist fashion, I added a transistor switch to supply VBus to the printer from whichever computer was connected, and the printer started working.
More: I used a pair of transistors to "OR" the Vbus voltage from the two cables that go to the computers, but a while after building it, I realised that the "off" transistor could turn on because the backwards transistor (collector and emitter swapped) could still work, but with most transistor types with a lower gain. Modifications to prevent the "off" transistor from turning on would have resulted in a lot of parts, so, about two years after building the switch, I tried a pair of Schottky diodes as David Hogg, a reader of this web site.
I used 1 Amp diodes instead of the lower current diodes because it will stand up better to abuse, and the 1 Amp diodes will have a lower voltage drop than one with a lower current rating at a given current. The diodes work just fine in my office.
While on this subject, a fellow by the name of Jim Glasgow built a switch before he came across this web site. His switch used a four pole break-before-make switch. I think this is a superior method, if you can find such a switch. One possible hitch to switching the ground is that there is no way to be sure that the ground connects first, so the data or Vbus conductors could connect first, thereby possibly subjecting the circuits in the printer or one of the computers to hazardous voltages. It's best to tie all the grounds together and only switch data and Vbus. The common admonishments apply to this circuit: Keep the wires as short as practical, make sure you don't have any shorts, and check operation before closing up the box. CONNECT THE SHIELDS FROM ALL OF THE CABLES TOGETHER. In the one I built, I did not use any sort of circuit board. I just wired the transistors and resistors to the conductors from the USB cables, using plenty of heat shrink tubing to keep things insulated. As soon as the circuit checked out in operation, I put the cover on the box.
The Lexmark printer is a USB 2.0 printer, and the USB ports on both of the late model computers are USB 2.0, but I doubt that communications were flying along at the blinding 480 Mbps High Speed data rate. More than likely, things are loafing along at 12 Mbps Full Speed data rate. That's my guess. The switch may work at 480 Mbps, but beyond keeping leads short, it may take some luck.
Now a word about this project. This is not a complete do-it-yourself project for the inexperienced. It is merely an example of what I did to solve a problem I had. The selection of the components used in this project depended mainly upon availability and convenience, and there are likely better choices. If you undertake this project, you may have different results. For example, if the cables are miswired, and your equipment is not grounded, there is a chance of damaging the printer, one of the computers, or all three. USB is well designed and robust, but it's not completely foolproof, especially in cases in which fool connect nonstandard equipment. Though this switch worked on my systems without a hitch, it may not work in your system. This project does not have an assembly diagram, printed circuit board artwork, or bill of material. You are responsible for any circuit you build. Before you start building, be sure you know what you are doing and the implications of any mistakes you might make.
The project involves a USB switching circuit utilizing a Double Pole Double Throw (DPDT) switch, which facilitates the connection of two computers to a single USB printer. The DPDT switch allows the user to alternate between two data lines (D+ and D-) while maintaining a common ground connection between the two systems. The design requires careful consideration of the USB standard, particularly regarding the VBus line, which is responsible for providing power to the peripheral device.
In this implementation, when switching between the two computers, the VBus line must be actively managed to ensure that the printer receives the necessary +5 Volts for operation. The initial approach involved using a pair of transistors configured to create an OR logic for the VBus voltage. However, it was later discovered that the configuration could lead to unintended activation of the "off" transistor due to reverse current flow. To mitigate this issue, the design was modified to incorporate Schottky diodes, which provide a low forward voltage drop and prevent reverse conduction.
The circuit emphasizes the importance of grounding; all shields from the USB cables should be connected together to minimize noise and potential ground loops. It is advisable to keep the wiring as short as possible to ensure signal integrity and reduce the risk of interference. The assembly of the circuit can be done without a printed circuit board, using heat shrink tubing for insulation and mechanical stability.
To enhance reliability, the circuit should be tested thoroughly before finalizing the assembly. It should be noted that while the circuit is designed to work with USB 2.0 specifications, actual data transfer rates may vary based on cable quality and overall design execution. Caution is advised when implementing this circuit, particularly for individuals with limited experience in electronics, as improper connections could lead to equipment damage. The project serves as a practical example of USB switching but does not provide detailed schematics or component lists, placing the responsibility of design and implementation on the builder.With a DPDT switch, I can switch the two data lines. I tried connecting the shields from the two computers together, the grounds two computers together, switching the D+ and D- lines with the DPDT switch, and leaving the VBus lines float, but for some reason it didn't work. The Lexmark printer seemed to need to see the +5 Volts. It had been many years since I read the USB standard (It was USB 1.0 back then) and I did not recall a function for the VBus beyond providing power to the peripheral, but in true experimentalist fashion, I added a transistor switch to supply VBus to the printer from whichever computer was connected, and the printer started working.
I used a pair of transistors to "OR" the Vbus voltage from the two cables that go to the computers, but a while after building it, I realised that the "off" transistor could turn on because the backwards transistor (collector and emitter swapped) could still work, but with most transistor types with a lower gain. Modifications to prevent the "off" transistor from turning on would have resulted in a lot of parts, so, abut two years after building the switch, I tried a pair of Schottky diodes as David Hogg, a reader of this web site.
I used 1 Amp diodes instead of the lower current diodes because it will stand up better to abuse, and the 1 Am diodes will have a lower voltage drop than one with a lower current rating at a given current. The diodes work just fine in my office. While on this subject, a fellow by the name of Jim Glasgow build a switch before he came across this web site.
His switch used a four pole break-before-make switch. I think this is a superior method, if you can find such a switch. One possible hitch to switching the ground, is that there is no way to be sure that the ground connects first, so the data or Vbus conductors could connect first, thereby possibly subjecting the circuits in the printer or one of the computers to hazardous voltages. Its best to tie all the grounds together and only switch data and Vbus. The common admonishments apply to this circuit: Keep the wires as short as practical, make sure you don't have any shorts, and check operation before closing up the box.
CONNECT THE SHIELDS FROM ALL OF THE CABLES TOGETHER. In the one I built, I did not use any sort of circuit board. I just wired the transistors and resistors to the conductors from the USB cables, using plenty of heat shrink tubing to keep things insulated. As soon as the circuit checked out in operation, I put the cover on the box. The Lexmark printer is a USB 2.0 printer, and the USB ports on both of the late model computers are USB 2.0, but I doubt that communications were flying along at the blinding 480 Mbps High Speed data rate.
More than likely, things are loafing along at 12 Mbps Full Speed data rate. That's my guess. The switch may work at 480 Mbps, but beyond keeping leads short, it may take some luck. Now a word about this project. This is not a complete do-it-yourself project for the inexperienced. It is merely an example of what I did to solve a problem I had. The selection of the components used in this project depended mainly upon availability and convenience, and there are likely better choices. If you undertake this project, you may have different results. For example, if the cables are miswired, and your equipment is not grounded, there is a chance of damaging the printer, one of the compuers, or all three.
USB is well designed and robust, but its not completely fool proof, especially in cases in which fool connect nonstandard equipment. Though this switch worked on my systems without a hitch, it may not work in your system. This project does not have an assembly diagram, printed circuit board artwork, or bill of material. You are responsible for any circuit you build. Before you start building, be sure you what you are doing and the implications of any mistakes you might make.
The project involves a trigger programming solution using a built-in pushbutton. The approach taken was to integrate a small USB keyboard circuit into the pen's interface. A proposed method for the pushbutton to trigger a programming command included adding a...
The F232 device is powered via USB, but it requires a level translator at its output. The transmit (Tx) signal from the F232 must be converted to RS232 levels, as the receiving side has a maximum voltage requirement. The receive...
The ISL6185 USB power controller family can be utilized to design a straightforward USB power supply electronic project that offers fully independent overcurrent (OC) fault protection for two or more USB ports. This product family includes sixteen distinct functional product...
The FT8U232AM requires a small number of external components to produce a device that converts USB to TTL level RS232 signals. All that is needed is a TTL to RS232 converter to provide the 12V RS232 logic levels. The FT8U232AM...
This project involves a USB interface for an alphanumeric LCD display, such as the 4x20 model, which can be controlled using the LCD Smartie program. The USB interface is implemented with the PIC18F2550 microcontroller and utilizes USB LCD modules.
The...
Individuals engaged in the experimentation or development of USB-connected peripheral hardware often find it frustrating to repeatedly disconnect and reconnect the plug to reestablish communication with the PC. This procedure is necessary, for instance, every time the peripheral device is...
This simple device enables two computers to share a single USB printer or other USB devices, such as an external flash drive, memory card reader, or scanner. A rotary switch is used to select the PC that will be connected...
Nearly all modern computers are equipped with logic blocks that facilitate the implementation of a USB port. A USB port can deliver over 100 mA of continuous current at 5V to peripherals connected to the bus. Therefore, it serves effectively...
Some still remember the serial RS232 port, also referred to as a COM PORT, as its functionality has largely been replaced by USB ports. However, for electronics engineering students and technicians learning about computer interfaces, the RS232 port remains relevant....
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more