Buying guide · Intermediate · 3 min read
D-Sub (DE-9, DA-15, DB-25) and USB Type-A Connectors
PCB Mount, Solder Cup and Through-Hole Types
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
D-sub (often called DB9) connectors are the classic serial and legacy ports; USB Type-A sockets are the standard host port. Choose the pin count (9, 15 or 25), male or female, and the mounting: right-angle PCB mount or solder cup for wires. Check the gender carefully: the plug is male (pins) and the socket is female (holes).
Key specs at a glance
- D-Sub
- 9, 15 and 25 pin; male and female; PCB mount and solder cup; XKB Connectivity
- USB Type-A
- Through-hole female sockets from XKB Connectivity and Hroparts
- Mounting
- PCB mount (right angle) and solder cup for wires
D-sub basics
The D-sub shell has a D shape so it can only plug in one way. DE-9 (called DB9) has 9 pins and is used for RS-232 serial and some industrial devices; DA-15 has 15 pins and is used for game ports and some CAN and encoder devices; DB-25 has 25 pins for legacy parallel and serial. The male connector has pins, the female has sockets, and the pin numbering is mirrored between them. For serial links see RS-485 and RS-232.
PCB mount or solder cup
PCB mount connectors solder directly into the board and sit at right angle to the edge, which is neat for devices with a port on the panel. Solder cup connectors have small cups where you solder each wire, used for cables. Use the data sheet to count pins from the correct side; double-check the numbers on the connector body before you wire.
USB Type-A sockets
A USB Type-A female through-hole socket is the standard host port on a board. Its four main pins are 5 V, D-, D+ and ground. Through-hole mounting with shell tabs gives a strong mechanical joint when the plug is pulled. For a device that provides 5 V to a USB drive or cable, add a PTC fuse and keep D+ and D- as a short twisted pair if you can. See USB cables and connectors.
Quick reference
Check the pin numbers against the data sheet and your wiring diagram.
| Connector | Pins | Common use |
|---|---|---|
| D-sub DE-9 | 9 | RS-232 serial, industrial devices |
| D-sub DA-15 | 15 | Encoders, legacy game and control ports |
| D-sub DB-25 | 25 | Legacy serial and parallel |
| USB Type-A female | 4 (plus shell) | Host ports and power |
- D-sub DE-9
- Pins:
- 9
- Common use:
- RS-232 serial, industrial devices
- D-sub DA-15
- Pins:
- 15
- Common use:
- Encoders, legacy game and control ports
- D-sub DB-25
- Pins:
- 25
- Common use:
- Legacy serial and parallel
- USB Type-A female
- Pins:
- 4 (plus shell)
- Common use:
- Host ports and power
Common mistakes to avoid
- Mixing up male and female.
- Counting pins from the wrong side.
- Connecting RS-232 levels straight to a microcontroller.
- Leaving a USB port unprotected from shorts.
- Using a solder cup type where PCB mount is needed.
Frequently asked questions
What is DB9?
A 9-pin D-sub connector, correctly called DE-9, used for serial ports.
Male or female?
Male has pins and female has sockets. Check the gender at both ends.
Can I connect RS-232 to an ESP32?
No. RS-232 levels are far above 3.3 V; use a level converter such as MAX3232.
What are USB's four pins?
5 V, D-, D+ and ground.
PCB mount or solder cup?
PCB mount for panel connectors on a board, solder cup for cable assemblies.
Parts for this guide
Keep learning on Electrolark
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.








