The Pi Zero has a microUSB connector onboard, but sometimes the position of the connector doesn’t work for a project and there isn’t enough room to plug in an adapter. Just as with the MicroSD port, there is the option to connect directly to pads on the underside of the Pi, and even completely remove the onboard USB connector for some extra space when needed.
The pinout is as follows:
PP1 is the 5V power input
PP6 is the GND
PP22 is USB D+
PP23 is USB D-
Here is the colorized version
The pinouts for microUSB and miniUSB are the same, so an image of a miniUSB connector is shown below.
Pin 1 is the 5V power input
Pin 2 is USB D-
Pin 3 is USB D+
Pin 4 is Sense (not used in this situation)
Pin 5 is GND
The completed setup is shown here. All four connections are made up and the connector can be placed anywhere on your project.
For those using a soft power on/off circuit or a lithium power supply board, there is one more component that can add a small amount of protection in the event that power is accidentally supplied from both a power circuit and an external USB device. A diode on the +5V wire between the Pi and the connector will prevent power from flowing the wrong way, avoiding possible damage to components.
One important thing to note is that this will not serve to add an additional USB port. This will replace the onboard one.