A CAN DB9 connection follows the CAN in Automation (CiA) pin assignment for the 9-pin D-sub (DE-9): CAN_L on pin 2, CAN_GND on pin 3 and CAN_H on pin 7. Pin 5 is an optional shield, pin 6 an optional second ground and pin 9 an optional supply (CAN_V+); pins 1, 4 and 8 are reserved. The pin numbers are the same on male and female connectors, but the female face is a mirror image of the male face. Run CAN_H and CAN_L as one twisted pair, fit one 120 Ω termination at each of the two ends of the bus rather than at every node, and bond the cable shield to the connector shell and the chassis. RS-485 has no single DB9 pinout, so take it from the device manual.
This guide covers the connector end of a CAN or RS-485 port, for the engineer drawing it and the layout engineer placing the DB9 footprint. The circuit behind the connector, the transceiver, split termination, TVS and common mode choke, is covered in CAN bus communication circuit design and CAN bus common mode choke selection; the RS-485 front end is in RS-485 circuit design.
CiA first recommended this assignment for the DE-9 connector in CiA DS 102, then published it in CiA 303-1 for CANopen. It now sits in the CiA 106 technical report, which is no longer tied to CANopen and applies to CAN CC, CAN FD and CAN XL interfaces, so a CAN FD port uses the same DB9 pins. The table below is the assignment as PC interface and PLC makers reproduce it in their manuals.
| Pin | Signal (CiA) | What to do on your board |
|---|---|---|
| 1 | Reserved | Leave unconnected |
| 2 | CAN_L | To the transceiver CANL pin, through the common mode choke and protection if fitted |
| 3 | CAN_GND | To the transceiver ground; on an isolated node, to the isolated-side ground |
| 4 | Reserved | Leave unconnected |
| 5 | CAN_SHLD (optional) | Decide with your shield plan; see the shield section below |
| 6 | GND (optional) | If used, the same net as pin 3 |
| 7 | CAN_H | To the transceiver CANH pin, routed as a pair with pin 2 |
| 8 | Reserved | Leave unconnected |
| 9 | CAN_V+ (optional) | Only if your system distributes bus power; protect it at the source |
Only pins 2, 3 and 7 are needed for a working link. Products differ on the optional pins, for example pins 3 and 6 tied together inside, or an auxiliary supply on pin 9, and some automotive adapter cables ignore the CiA table, so check the manual of every device that will plug into your port.
Read the pin numbers from the right face. Viewed from the mating face, a male DB9 has pin 1 at the left end of the five-pin row and pin 6 at the left end of the four-pin row. A female DB9 is the mirror image: the front view in the datasheet of the WHB050XX8X1ADE5 female receptacle numbers the top row 5 to 1 and the bottom row 9 to 6. A footprint drawn from the wrong face moves CAN_L from pin 2 to pin 4 and CAN_H from pin 7 to pin 8, two reserved pins, and the bus stays silent. Take the numbering from the datasheet of the receptacle you are actually placing.
The CiA pin assignment is the same on plug and socket, so in practice the gender on your board is set by your system's convention, and the rule that avoids trouble is to match the cables and tools already on your bus. Practice is mixed: NI documents a 9-pin male D-sub on each port of its high-speed CAN hardware, common CAN extension cables are female at one end and male at the other, and at least one servo drive manual describes two daisy-chained 9-way D-subs on the drive, one male and one female.
Write the gender on the schematic symbol and in the interface specification, so the cable drawing and the PCB cannot disagree.
High-speed CAN to ISO 11898-2 uses a nominal 120 Ω resistor between CAN_H and CAN_L at each of the two ends of the bus line, two in total. With DB9 connectors you have three places to put them:
Whichever you choose, check it with the power off: measure across pins 2 and 7 at any DB9 on the bus. About 60 Ω means two terminations are in place. About 120 Ω means one is missing. About 40 Ω means a third has crept in, usually a mid-bus node with its jumper left in.
Avoid putting the only termination on a node that is unplugged in service, such as a laptop interface: when its DB9 comes off, the bus loses one end.
CiA lists the shield pin as optional, so whether you need shielded cable depends on your EMC environment and test plan. If you do use it, a drain wire through pin 5 is a long, thin path for high-frequency current. The usual approach is to clamp the braid all round to a metal backshell and let the shell bond to the chassis at the panel, through the jack screws or a chassis contact. On the board:
The common mode choke and TVS belong between the DB9 and the transceiver, close to the connector, so noise and ESD entering on pins 2 and 7 are dealt with before they reach the board; the CAN common mode choke guide shows the order.
RS-485 (TIA-485-A) defines drivers and receivers, not a connector, so there is no single RS-485 DB9 pinout. The most widely fixed one is PROFIBUS DP: pin 3 is RxD/TxD-P (line B), pin 8 is RxD/TxD-N (line A), pin 5 is data ground (DGND) and pin 6 is VP, a +5 V supply used for the bus termination. PROFIBUS International lists those four pins as mandatory. Other RS-485 devices choose their own pins, so the device manual decides.
When one product, or one cabinet, carries CAN, RS-485 and RS-232 on identical DB9 shells, check three things:
For LIN, the CiA table does not apply. LIN interface tools that use a DB9 define their own pins, typically the LIN line, ground and the battery supply that LIN nodes need, so take the pinout from the tool's manual and do not reuse a CAN cable without checking it.
The three VOOHU 9-position D-sub receptacles below are female, PCB-mount, two rows, with 2.77 mm pitch along a row and 2.84 mm between rows on the PCB, and their datasheets rate them at 1000 V AC withstand voltage and 500 mating cycles.
| Part | Mounting and locking | Rated current | Operating temperature | A good fit when |
|---|---|---|---|---|
| WHB050XX6X1ADB2 | Right angle, 8.08 mm, riveted board lock | 3 A | −55 to +125 °C | A side-entry panel port on an end node or interface board; the datasheet also lists 1000 MΩ min. insulation resistance and 35 mΩ max. contact resistance |
| WHB050XX6X1XD02 | Right angle, machined pins, riveted insert with #4-40 UNC lock screws | 5 A | −55 to +105 °C | The mating cable uses jack screws, or pin 9 carries bus power and you want the higher current rating |
| WHB050XX8X1ADE5 | Vertical (180°) through-hole, #4-40 | 3 A | −55 to +125 °C | The connector must face up out of the board, as on a gateway, analyzer or test fixture |
Before you place one, check two things against its datasheet: the pin numbering on the front view, so your footprint matches the face you will see on the panel, and the rated current, if pin 9 will carry CAN_V+. Datasheets are on each product page, for example the WHB050XX6X1ADB2 datasheet.
To see the 9-position VOOHU D-sub receptacles side by side, open the D-sub connector selector filtered to 9 pins; clear the filter to include the 15-position high-density versions.
Q1: Does CAN bus need a ground?
Yes, in most systems you should carry a ground reference with the pair. CAN is differential, but a transceiver only works while the bus voltages stay inside its common-mode range, and that range is measured against the transceiver's own ground. Pin 3 (CAN_GND) carries that reference between nodes. Check the common-mode range in your transceiver datasheet; on an isolated node, pin 3 connects to the isolated ground.
Q2: Is CAN bus RS485?
No. Both use a differential pair terminated at the ends, but during arbitration a CAN transceiver (ISO 11898-2) drives the bus only for dominant bits and lets the termination pull it back to recessive, which is what makes bitwise arbitration possible; an RS-485 driver (TIA-485-A) actively drives both states. On a DB9 the pins differ too: CAN_H and CAN_L on pins 7 and 2, PROFIBUS RS-485 on pins 3 and 8.
Q3: Are DB9 and RS232 the same?
No. DB9, more precisely DE-9, names the 9-pin D-sub shell; RS-232 is one electrical interface often carried on it, with RxD on pin 2, TxD on pin 3 and ground on pin 5 at a DTE port. A CAN DB9 uses pins 2, 3 and 7 for different signals, so a serial cable is not a CAN cable. Shell sizes and naming are explained in our D-sub sizes and types guide.
Q4: Is it common practice to connect power supply to a DB9?
On CAN it is provided for: pin 9 is the optional CAN_V+ supply, returned on the ground pins. Use it only when every device that can be plugged in follows the CiA pinout, fuse or current-limit the supply at the source, and check the rated current of the D-sub contacts. Do not put bus power on a DB9 that someone could plug into a PC serial port.
Send the protocol, the pins you need, the gender and mounting direction at the board, and how the cable locks through our sample request form. Our FAE team can suggest suitable parts and help check the design: which VOOHU D-sub receptacle fits the port, how its pin numbering maps onto your footprint, and which common mode chokes suit the CAN or RS-485 lines behind it. Samples are available for evaluation, and selected parts are free of charge. Our FAE team will be glad to confirm the options for your project. VOOHU supplies RJ45 and SFP connectors, LAN and PoE transformers and common mode chokes from Suzhou, China, to more than 1,500 customers.
WHB050XX8X1ADE5 D-SUB female 180 degree straight plug, Rear rivet 6.0 harpoon front lock 5.0 nut D-SUB Connector
> View Details
WHB050XX6X1XD02 D-SUB machined pin female right angle,7.2mm,riveted insert,lock screw
> View Details
WHB050XX6X1ADB2 D-SUB female right angle 8.08mm,riveting board lock D-SUB Connector
> View Details