Easily convert keyboard and mouse interfaces into USB

Source: Internet
Author: User
Easily convert keyboard and mouse interfaces into USB

Recently it was really not smooth. I followed the LG photoelectric USB mouse for several days and finally went on strike after several deaths. No way. I spent more than 200 oceans and bought a Logitech mx300. While enjoying the pleasure brought by the new mouse, I started my mind on the old keyboard. Well, I used to use serial ports with the mouse set keyboard. Can I change it? Although there is a PS2 interface to USB Interface Converter, but one is not necessarily able to buy, the other is not in line with the DIY hands-on spirit, so I decided to do it myself. Through some research by John, I finally found the secret here ......

First of all, let's talk about how to discard PS/2. It's very simple because the USB port is absolutely convenient and supports hot swapping and out-of-the-box use, which makes it much easier for us to use. In theory, each computer can support 127 USB interfaces. With the development and maturity of USB, USB is likely to unify computer interfaces. In addition, the old PS/2 interface has its own drawbacks, aside from hot swapping, the PS/2 interface is inconvenient during insertion. 6 small pins are difficult to align and may cause bending and breaking of the pins. So we have reason to abandon it through transformation.

Take a closer look at the pins of the two interfaces. The PS/2 pin is 6-pin, while the USB pin is 4-pin, both of which provide a voltage of + 5 V. Split the keyboard (Be careful with the rubber cap inside. It's not easy to scatter around, let alone I didn't remind you). There are four lines inside (yellow, red, white, and green ), this shows that the four pins are exactly the same as those of USB. With this, I want to rebuild it. It is basically feasible. I will immediately find the relevant PIN information.

But in the spirit of DIY, it is better to be cautious. I tested it with hichina, but the results fell sharply. Fortunately, I did not follow the above definition of the pin directly, otherwise it will certainly fail. It is not known after testing that the above is incorrect. Alas, the mistake was also posted online, and it almost hurt me. Fortunately, be careful.

According to my own test, the pin definition is corrected as follows:

The keyboard cables are yellow, red, white, and green.

Yellow 3

Red 4

White 6

Green 2

USB pins are defined as follows:

(Note: The illustration is for reference only and may be incorrect)

The connection between USB cables and pins is as follows:

Red 4

White 3

Green 2

Black 1

In this way, the meaning of each pin is clarified, and we can modify it.

According to the pin definition, we make the following table:

First, remove the USB line above the old mouse and directly cut it from the place connected to the mouse circuit board. Then, open the wire head and remove the PS/2 line on the keyboard, remember the welding points of wires of different colors. You can also cut the cables from the solder joints. Find the soldering iron and weld the USB cable head to the solder joints of the keyboard according to the above table. Pay attention to the use of the soldering iron, do not damage the circuit board and chip. Avoid contact with the transparent plastic wire board behind the keyboard. If there is no soldering iron, you can open the wire head to connect directly, and then seal it with an insulating tape. This is relatively simple, but not beautiful. Now, try again. Do you have a USB keyboard? Easy to use? Do not forget to set USB keyboard support to enable in BIOS. Otherwise, don't blame me!

With experience in keyboard transformation, let's take a look at the mouse transformation. This allows us to completely discard the PS/2 interface. Find a double Flying Geese 2D mouse and open the mouse. There are also four lines of color: blue, white, green, and orange. We tested them with hichina and found that the pin definition is exactly the same as that of the keyboard. You can refer to the keyboard.

The corresponding wires and pins are connected as follows:

Blue 3

White 6

Green 2

Orange 4

Of course, the USB wiring and pins are the same as they were just now. The modification is just like modifying the keyboard. However, it should be noted that the mouse connection and the circuit board are not solder joints, but slots, which may be more convenient to modify. The specific wiring is shown in the following table:

The above describes how to convert the keyboard and mouse PS/2 interface into a USB interface. Through these transformations, we can completely discard the old PS/2 and replace it with the USB interface. The last thing to note is that it is best to test it on your own when you modify it, because different mouse and keyboard may have different line colors, the purpose of this article is to teach you basic methods.

DIY style, self-made with USB interface

Editor's note: today, we can buy finished DIY accessories in the market, but if we have nothing to buy, we will not be able to reflect our DIY spirit, and we will not be able to experience the fun of DIY, the following small transformation will make it easy for you to have the PS2 to USB interface. What's more, let you learn the general idea of DIY and let you feel the charm of DIY!

Currently, most of the latest laptops have abandoned the PS2 interface, but many users require an external mouse, especially for users who require high efficiency or graphic purposes. This is a problem. The mouse of the previously purchased PS2 interface cannot be used. Do you want to buy another USB interface? We diyer always say no! Can it be converted to USB? I started the following experiment with such questions:

This is the photocell of genius. We can see that it is a PS2 interface:


I remember that I used to buy a USB Optical Mouse of Logitech and sent a USB-to-PS2 conversion header. It seems that the power and data of USB and PS2 may be generic:

In order to better let everyone see the internal structure of the converter, I will take it apart with a knife:

Measured with a multimeter, the results are described as follows: USB point A corresponds to 3 of PS2, which is 4 points of ground and USB point D corresponds to PS2, providing + 5 V voltage, USB point B Corresponds to point 5 of pS2 and provides data clock. USB point D corresponds to point 1 of PS2, which is a data interface. There is no circuit in the middle, but it is directly connected:

Now, after learning about the principle of the transpose interface, we can rebuild our mouse. We need a USB cable now. You can cut it off from a bad USB device, or you can use a standard USB cable to cut off the mother's head and leave a public head, remember to look for something that is not very rough and soft, because it can easily increase the flexibility of mouse movement :[

For the sake of insurance, to prevent the wrong line Order, I inserted the adapter just now and measured the corresponding line: PS2 interface 1 for the Blue Line, 3 for the yellow line, 4 for the white line, for the L green line, recorded.

Then measure the plug-in needle corresponding to the original mouse line: 1 of PS2 port should be yellow line, 3 should be green line, 4 should be blue line, should be l white line. Therefore, compared with the previous record, we obtained the line Order correspondence sequence between the new USB cable and the old PS2 interface:

New USB port Original PS2 Port
Blue-> Yellow
Yellow-> Green
White-> Blue
Green-> White

Okay. Follow the wiring table to weld the new USB cable:

Connect to the power supply, and the long-lost photoelectric lamp is on again ~~, Move it. No problem.

This is the final product. How is it easy!

Note: I changed a lot of Chinese PS2 mouse, but the success rate is not very high. Some of them fail to move the pointer after the change, and some systems prompt to find the hardware, but there is an error. I analyzed it for a long time and thought it was possible that some manufacturers saved some components or onboard drivers when making PS2 mouse.Program. The success rate of changing PS2 to USB is very high for the two mouse brands with the same brand and specifications, both PS2 interface and USB interface model. However, it does not matter if it cannot be changed, because you have not broken the circuit and interface, and re-inserted the original PS2 line back is the PS2 mouse. The key is to train your hands-on skills, find your own fun in the hands-on experiment, and further deepen your understanding of pS2 and USB internal connections, this is what our diyer really gets!

Http://www.deluxmarket.com/product/gb/product_detail.asp? Catalogid = 5 & productid = 12

Http://www.sunsonny.com/Photo/ShowPhoto.asp? Photoid = 23

Optical Mouse Principle

Compared with the traditional mechanical mouse, the optical mouse has the advantages of accurate positioning, smooth movement, and not easy to dirty. Moreover, as the price of the Optical Mouse keeps falling, the trend of replacing the mechanical mouse and becoming the mainstream in the market is unstoppable.

Today, I will take the Optical Mouse equipped with the Founder founder brand machine as an example to show you the internal "scenery" of the photovoltaic mouse ".

Working principle of photovoltaic mouse

The biggest difference between a photoelectric mouse and a mechanical mouse is that the positioning method is different.

What is the working principle of the photoelectric mouse: There is a light emitting diode inside the mouse, the light emitted by the light emitting diode, illuminating the bottom surface of the mouse (this is why the bottom of the mouse will always emit light ). Then, a part of the light reflected at the bottom of the Optical Mouse is transmitted to an optical sensor (microphoto) through a set of optical lenses for imaging. In this way, when the Optical Mouse moves, its moving track will be recorded as a set of high-speed consistent images. Finally, a dedicated image analysis chip (DSP, or digital microprocessor) inside the Optical Mouse is used to analyze and process a series of images on the mobile track, by analyzing the changes in the positions of feature points on these images, you can determine the moving direction and distance of the mouse to complete the cursor positioning.

The Optical Mouse is usually composed of the following parts: optical sensor, optical lens, light emitting diode, interface microprocessor, touch button, roller, line, PS/2 or USB interface, Shell, etc. The following sections describe:

Optical sensor

The optical sensor is the core of the photovoltaic mouse. Currently, only three companies including anjet, Microsoft, and Logitech can produce optical sensors. Among them, anjet's optical sensors are widely used. Apart from Microsoft's all and part of Logitech's Optical Mouse, other Optical Mouse basically uses anjet's optical sensors.

Figure 1 optical sensor inside the photoelectric mouse

Anjet's optical sensors are mainly composed of CMOS photosensitive blocks (photosensitive elements used on low-end cameras) and DSPs. The CMOS photosensitive block is used to collect and receive the light transmitted by the optical lens at the bottom of the mouse (and synchronously imaging ), the CMOS photosensitive block then submits the image generated by one frame to its internal DSP for computation and comparison. By comparing the image, the location of the mouse can be located.

Figure 2 Composition of an Optical Sensor

Figure 1 is an optical sensor inside the founder photocell, which uses the H2000-A0214 Optical Sensor of anjet. For the composition of the chip, see Figure 2. Figure 3 is the back of the H2000-A0214 optical sensor. We can see that there is a small hole on the chip that is used to receive the image transmitted from the optical lens at the bottom of the mouse.

Figure 3 small holes on the back of an optical sensor are used to receive images transmitted from an optical lens at the bottom of the mouse.

Photovoltaic mouse control chip

The control chip is responsible for coordinating the work of various components in the photoelectric mouse, communicating (bridging) with the external circuit, and transmitting and receiving various signals. We can understand it as a "manager" in the photoelectric mouse ".

Figure 4 is Logitech's cp5919am control chip, which can be combined with anjet's H2000-A0214 optical sensor to bridge the interface with the motherboard USB. Of course, it also has the control, transmission, coordination and other functions that a control chip should possess.

There is a very important concept that everyone should know, that is, the impact of DPI on mouse positioning. DPI is used to measure the number of points that can be detected by moving the mouse every 1 inch. The smaller the DPI, the fewer points that can be located, and the lower the positioning precision. The larger the DPI, when multiple points are located, the positioning accuracy is high.

Figure 4 Logitech cp5919am control chip

In general, the scanning accuracy of traditional mechanical mouse is below 400 dpi, while that of photocells can reach 800 or even DPI, this is why the positioning accuracy of the Optical Mouse can easily exceed the mechanical mouse.

Optical Lens component

The optical lens component is placed at the bottom of the photocell. As you can see from Figure 5, the optical lens component consists of a prism and a circular lens.

Figure 5 an optical lens component consists of a prism and a lens

The prism is responsible for transmitting the light emitted by the light emitting diode to the bottom of the mouse and illuminating it.

A circular lens is equivalent to a camera lens, which is responsible for transmitting the illuminated image at the bottom of the mouse to a small hole at the bottom of the optical sensor. By watching the back shell of the photocell mouse, we can see that the circular lens is like a camera (6 )!

Figure 6 the circular lens on the back of the photocell Mouse looks like a camera

Through the experiment, the author concluded that no matter the optical path of the prism or the circular lens is blocked, the optical mouse will be "blind" immediately ". The result is that the optical mouse cannot be located, which shows the importance of the optical lens component.

Light Emitting Diode

Optical sensors need continuous "camera" at the bottom of a mouse that lacks light. Naturally, the "camera light" is indispensable. Otherwise, the image taken from the bottom of the mouse will be dark, dark images cannot be compared, and of course optical positioning cannot be performed.

Figure 7 Light Emitting Diode inside the photoelectric mouse

Generally, the light emitting diode used by the optical mouse (7) is red (and some are blue) and highlighted (in order to obtain sufficient illumination ). The red light emitted by the light emitting diode is partially illuminated by the optical lens at the bottom of the mouse (that is, the prism in it), and the other is directly transmitted to the front of the optical sensor.

In a word, the role of the light emitting diode is to generate the light source required for the operation of the Optical Mouse.
Touch button

A mouse without buttons cannot be imagined, so there are at least two touch buttons on a normal photoelectric mouse. Three touch buttons are soldered on the PCB of the founder lighting mouse (figure 8 ). In addition to the left and right buttons, the middle buttons are assigned to the scroll wheel. The advanced mouse usually has two scroll wheels X and Y, while most of the Optical Mouse is just like the founder photoelectric mouse, with only one scroll wheel. When you scroll up or down the scroll wheel, the "document" or "webpage" that you are viewing will scroll up or down. When the scroll wheel is pressed, the "middle" on the PCB will be used. Note: The actions generated by the "middle" can be defined by the user according to their own needs.

Figure 8 three touch buttons are soldered on the PCB of the founder Optical Mouse

When we unload the scroll wheel, we can see that there is a pair of photoelectric "transmitting/receiving" device (9) on the scroll wheel position ). The "scroll wheel" carries a grid. Because the grid can intercept the optical path of the photoelectric "transmitting/receiving" device, a paging pulse signal can be generated, this pulse signal is sent to the Windows operating system through the control chip, and thus page Flip can be generated.

Figure 9 photoelectric "transmitting/receiving" Device

In addition to the above, what does the Optical Mouse include? It also includes connection lines, PS/2, USB interfaces, and casings. Since there are not many differences between these parts and the mechanical mouse, we will not describe them here!

Optical Mouse Circuit Analysis and simple maintenance

The circuit of the Optical Mouse is generally relatively simple, mostly composed of two integrated circuits. One larger is the COMs photosensitive IC, and the other is the dedicated IC for the mouse. The photosensitive CMOS chip obtains the position signal by moving the light generated by the mouse and sends it to the X and Y inputs of the mouse IC. The mouse IC then collects the left, right, scroll wheel key, scroll wheel roll, roll back and other information along with the cl k clock signal sent to PS2 or USB port.
1. USB Optical Mouse. Figure 1 shows the circuit diagram of the photoelectric sensor chip using the gl603-USB mouse IC chip and the amjet h2000 (1500 CPI, scans per second.

 

 

2. PS2 interface mouse. Figure 2 uses pan101-208 (the third generation optical and electrical IC product, 800cpi optical resolution, 2000 scans per second) as the photoelectric sensor chip, And the 84510 series chip as the PS2 interface photoelectric mouse circuit of the mouse IC. Optical Mouse IC is generally relatively reliable. The most bad thing is the button switch or mouse line. If the VCC or Gnd is disconnected from the four cores of the mouse, there will be no red light at the bottom of the mouse, and the mouse will not be able to use the fault. When Cl K or data is disconnected, the mouse may experience a red light, but the cursor does not move and all buttons do not respond. If a button fails, the switch is broken. When changing cables and switches, you can remove them from the old mechanical mouse for replacement. If the optical mouse moves the time mark in a certain direction, it may be that the reflected convex mirror is dirty. Just clean it.

High-performance Optical Mouse principle and circuit diagram

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.