Unplugging or reconnecting devices to the serial COM or PS2 connector can lead to issues if the PC is powered on. This is true even for simple tasks like swapping a mouse or changing from a graphics keyboard to a standard keyboard. Often, connected devices fail to communicate with the PC, necessitating a reboot. In some cases, there is a risk of damaging either the PC or the peripheral device. To switch equipment successfully, a specific sequence must be followed: the clock and data lines should be disconnected from the device before removing the power line. Conversely, when connecting a new device, the power line must be connected first before reconnecting the clock and data lines. This sequence is also applicable to USB connectors, although it is implemented more straightforwardly using pins of different lengths. The circuit illustrated in Figure 1 automates this switching sequence electronically. The clock and data lines from the PC connect through the normally closed contacts of relay RE2, routed via bistable relay RE1 to connector K3. Pressing push-button S1 activates relay RE2, disconnecting the data and clock lines while simultaneously opening semiconductor switch IC1B, allowing capacitor C4 to charge through resistor R4. After approximately 0.2 seconds, the voltage on C4 becomes sufficient to activate IC1A, which in turn energizes transistor T1, activating one coil of bistable relay RE1 and routing the clock, data, and power to connector K2. Upon releasing S1, relay RE2 reconnects the data and clock lines to the PC via connector K1. It is important to press the push-button for about 0.5 seconds; otherwise, the circuit may not function correctly. Switching back to connector K3 is accomplished similarly by pressing S2. The current required to switch the relays exceeds what the serial interface can handle, so energy is stored in two relatively large capacitors (C2 and C3), charged through resistors R1 and R6, respectively. A drawback of this design is that a waiting period of approximately 0.5 minutes is necessary between switch-overs to ensure the capacitors are adequately charged. However, the overall current consumption of the circuit is minimized to just a few milliamps. The PCB is designed to accommodate PS2-style connectors, but for older PCs requiring 9-pin sub D connectors, these must be connected to the PCB using flying leads. In such cases, the mouse driver software assigns pin 9 as the clock, pin 1 as the data, pin 8 (CTS) as the voltage supply pin, and pin 5 as ground.
The described circuit employs a systematic approach to manage the connection and disconnection of peripherals while minimizing the risk of damage to both the PC and the devices. The use of relays and semiconductor switches ensures that the necessary sequence of disconnection and reconnection is adhered to, thereby safeguarding the integrity of the communication lines. The inclusion of capacitors for energy storage allows the circuit to handle the higher current demands of the relays without overloading the serial interface. Additionally, the design accommodates both modern PS2 connectors and older 9-pin configurations, providing versatility for various PC setups. The careful consideration of timing in the operation of the push-buttons and the required waiting period between switch-overs further enhances the reliability of the system. This circuit is particularly beneficial in environments where frequent switching between devices is necessary, ensuring seamless operation without the need for constant reboots or potential hardware damage.Unplugging or re-connecting equipment to the serial COM or PS2 connector always gives problems if the PC is running. Even if you only need to swap a mouse or changeover from a graphics keyboard to a standard keyboard. The chances are that the connected equipment will not communicate with the PC, it will always be necessary to re-boot.
If you are r eally unlucky you may have damaged the PC or the peripheral device. In order to switch equipment successfully it is necessary to follow a sequence. The clock and data lines need to be disconnected from the device before the power line is removed. And likewise the power line must be connected first to the new device before the clock and data lines are re-connected. This sequence is also used by the USB connector but achieved rather more simply by using different length pins in the connector.
The circuit shown here in Figure 1 performs the switching sequence electronically. The clock and data lines from the PC are connected via the N. C. contacts of relay RE2 through the bistable relay RE1 to connector K3. Pressing push-button S1 will activate relay RE2 thereby disconnecting the data and clock lines also while S1 is held down the semiconductor switch IC1B will be opened, allowing the voltage on C4 to charge up through R4. After approximately 0. 2 s the voltage level on C4 will be high enough to switch on IC1A, this in turn will switch on T1 energizing one of the coils of the bistable relay RE1 and routing the clock, data and power to connector K2.
When S1 is released relay RE2 will switch the data and clock lines through to the PC via connector K1. It should be noted that the push-button must be pressed for about 0. 5s otherwise the circuit will not operate correctly. Switching back over to connector K3 is achieved similarly by pressing S2. The current required to switch the relays is relatively large for the serial interface to cope with so the energy necessary is stored in two relatively large capacitors (C2 and C3) and these are charged through resistors R1 and R6 respectively.
The disadvantage is that the circuit needs approximately 0. 5 minute between switch-overs to ensure these capacitors have sufficient charge. The current consumption of the entire circuit however is reduced to just a few milliamps. The PCB is designed to accept PS2 style connectors but if you are using an older PC that needs 9 pin sub D connectors then these will need to be connected to the PCB via flying leads. In this case the mouse driver software configures pin 9 as the clock, pin 1 as the data, pin 8 (CTS) as the voltage supply pin and pin 5 as earth.
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more