A Universal Serial Bus (USB) socket is a device-side connector, which provides an electrical connection facility for the transference of data and power to other devices. The socket pinout is very simple as you can see from the diagram above. The first pin is Vcc, which is usually +5 V, followed by data-, data+, and ground. This type of socket is usually utilised for connecting external peripherals such as keyboard, mouse, and memory stick.
The data transmission involves differential signalling where both data- and data+ pins carry the electrical signals. The data wires are usually a twisted-pair, providing bi-directional simultaneous signals with a full speed of 12 Mbps, or 1.5 Mbps at low speeds.
The voltage at pin 1 is expected to be at 5 V ±5 %. Therefore, it should be between 5.25 V and 4.75 V.
The contacts are usually rated at one ampere, and depending upon the host, that is the maximum that the contacts are expected to carry. The PC specification indicates that USB 2.0 can provide current in 100 mA step units. By default, it will provide 100 mA without enumeration, and a maximum of 500 mA with a device specific driver loaded. The USB 3.0 specification allows a maximum of 900 mA, in 150 mA step units.
USB 1.0 has a maximum speed of 1 Mbps, whilst USB 2.0 has 480 Mbps, and USB 3.0 up to 5 Gbps. USB 1.0 and 2.0 specification use the same socket and pinout arrangement, however the USB 3.0 pinout is completely different.
Battery charging Specification
A dedicated charging port can supply a maximum of 1.8 A from the socket to any downstream device. In such a socket, the data pins terminate with a 200 Ω resistor across them, which allows devices to interpret it as a dedicated charging port.
Pinout Colour Code
The most typical colour code system for the wires is red, white, green, and black. Other manufacturers use a different system of their own. If you have a wire that follows a non-standard colouring system then one way to determine the power and ground is to use a digital meter to measure the voltage.
USB Pinout and Wiring
These sockets usually mount on a printed circuit board, and this one fits perfectly into the holes of a matrix board, which makes it extremely useful for any electronic projects.
USB Sockets Types
There are many different socket types. This one is USB A series socket, which connects to the host-side. These are hot-pluggable allowing the attaching and detaching of devices whilst the host remains powered. The “Type A” socket is usually utilised on computers to allow the connection of keyboard, mouse, and USB peripherals.
The insulation resistance requirement is 1000 MΩ, and they should be able to operate at 85 °C. Contact resistance is 0.030 Ω or less, and the capacitance is 2 pF.
Their soldering requirements are simple, and the solder temperature should be 256 °C for non-lead based solders. The voltage drop pin-to-pin across the wire is typically 0.125 volt or less. Please read the following article if you are new to soldering.
The durability of these sockets has to meet a minimum requirement of 10,000 cycles consisting of insertion and extraction of the plug into the socket. The mounting tags should be able to secure the socket firmly and cope with 35 N of mating force.
Occasionally, people misuse it by jamming a plug the wrong way round causing the socket pins to bend or even break. If it has been misused then you will find that the USB is no longer working. This usually gives rise to errors on the computer such as the device not showing or not recognised by the operating system. A device not detected is a common problem and can occasionally be due to a defective socket. When this is the case, it is necessary to replace the socket.
Understanding USB Ports
USB sockets are very easy to implement and use in a project. For the most up-to-date information on these ports, usb.org is the best place to find accurate information. The organisation maintains USB standards and has all the information including PDFs of the USB specifications.
Standard pin arrangements on PCB
The usb.org body sets the pin arrangement and the receptacle size and dimensions. Here is a typical “Type A” socket mounted on a standard pitch matrix board. As you can see, the pins fit perfectly.
Cheap USB Sockets
Sockets are usually low cost to manufacture due to factory automation. These tin plated sockets can last a long time and are wonderful to use for prototyping projects. I managed to get a quantity of three for £1.40 on eBay.
Non Standard Specification
If you are a hobbyist building your own USB powering circuit, then you might find that certain devices from certain manufacturers will not draw power from the socket. Moreover, you get an error message such as “Charging is not supported with this accessory”.
Manufacturers such as Sony and Apple tend to have these types of safety mechanisms in place to ensure that the correct charger is used.
With the trend towards gadgets becoming slimmer, lithium battery technology operates to its extreme limits. Many of the latest slim gadgets use lithium battery technology that is extremely sensitive requiring precise charging parameters. You should therefore use only an approved charger.
It is possible to hack and reverse engineer proprietary specifications. For charger detection, manufacturers often use the Single Ended One (SE1) state. This is a non-valid bus state that usually does not occur, and used by manufacturers to detect the charger. Biasing the data pins to logic 1 state activates this state. Modern electronic chips use low power CMOS designs so the logic 1 voltage level depends upon the chip but is typically 3.3 V, 2.7 V, 2 V, 1.7 V, and sometimes even lower.
It is not worth hacking or building your own charger for many reasons. 1. It may compromise lithium battery safety. 2. Chargers are cheaply available from places such as eBay and Amazon. 3. The time taken to build it and the cost of the parts outweigh the benefits, especially when you can buy readymade ones in a plastic case with the battery holder.