Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Cables, Connectors & PCB

DB9 Connector Pinout: Serial RS232 Cable Wiring Diagram

DB9 Connector Pinout: Serial RS232 Cable Wiring Diagram

March 11, 2026 /Posted byJayesh Jain / 0

The DB9 connector (officially DE-9, sometimes called D-Sub 9) is the standard physical connector for RS232 serial communication in industrial equipment, legacy computers, PLCs, and scientific instruments. Despite USB taking over for consumer electronics, the DB9 RS232 interface remains ubiquitous in Indian industrial and automation environments. This guide provides complete pinout information, wiring diagrams, and cable-making instructions.

Table of Contents

  • DB9 Connector Basics
  • DB9 Pin Numbering Diagram
  • RS232 DB9 Pinout: Male and Female
  • Signal Description: Each Pin Explained
  • Straight-Through Cable Wiring
  • Null Modem Cable Wiring
  • Connecting DB9 to Arduino or ESP32
  • Frequently Asked Questions

DB9 Connector Basics

The DB9 connector has 9 pins in a D-shaped metal shell. Despite being called “DB9”, the technically correct name is “DE-9” (D-subminiature, E size shell, 9 pins). The confusion arose because the original DB connector had 25 pins, and the 9-pin variant was introduced as a compact alternative for serial ports.

  • Male (plug): Has protruding pins. Typically found on the cable or DTE (Data Terminal Equipment — computers, microcontrollers)
  • Female (socket): Has holes to receive pins. Typically on the equipment port or DCE (Data Communications Equipment — modems, instruments)
  • Locking: Two screws (4-40 UNC or M3) secure the connector to the mating connector or panel
Recommended: Arduino UNO R3 Development Board — Use with a MAX232 level converter (Rs 10-20 at local shops) to add DB9 RS232 connectivity to your Arduino project for industrial instrument integration.

DB9 Pin Numbering Diagram

DB9 Male Connector (front view, pins facing you):

   1   2   3   4   5
     6   7   8   9

DB9 Female Connector (front view, holes facing you):

   5   4   3   2   1
     9   8   7   6

Note: Pin 1 is always in the top-left corner when facing the mating surface.
The numbering goes left-to-right in the top row, then left-to-right in the bottom row.
For MALE: top-row pins are 1-5, bottom-row pins are 6-9.
For FEMALE: counting is REVERSED left-right from male view.

RS232 DB9 Pinout: Male and Female

Pin Signal Direction (from DTE) Function
1 DCD Input Data Carrier Detect
2 RXD Input Receive Data
3 TXD Output Transmit Data
4 DTR Output Data Terminal Ready
5 GND Common Signal Ground
6 DSR Input Data Set Ready
7 RTS Output Request To Send
8 CTS Input Clear To Send
9 RI Input Ring Indicator (modem use)

Signal Description: Each Pin Explained

  • Pin 1 DCD: Indicates an active communication link. Modem asserts DCD when carrier signal detected from remote modem. Rarely used in modern equipment.
  • Pin 2 RXD (Receive Data): Data input to the DTE device. This is where incoming serial data arrives. Connect to MCU RX pin via level converter.
  • Pin 3 TXD (Transmit Data): Data output from DTE device. This is where you send serial data. Connect to MCU TX pin via level converter.
  • Pin 4 DTR (Data Terminal Ready): DTE signals it is powered and ready to communicate. Many instruments require DTR to be asserted before accepting commands.
  • Pin 5 GND: Signal ground reference. Must be connected in all RS232 cables.
  • Pin 6 DSR (Data Set Ready): DCE device signals it is ready. Pair with DTR for handshaking.
  • Pin 7 RTS (Request To Send): DTE requests to send data to DCE. Used for hardware flow control to prevent buffer overflow.
  • Pin 8 CTS (Clear To Send): DCE signals it is ready to receive data. Companion to RTS for hardware flow control.
  • Pin 9 RI (Ring Indicator): Modem asserts RI when telephone ring detected. Not used in non-modem applications.

Straight-Through Cable Wiring

A straight-through RS232 cable connects pins 1-1, 2-2, 3-3… between both ends. Used to connect DTE (computer) to DCE (modem, industrial instrument with DB9 socket).

Straight-Through RS232 Cable:

Device A (male DB9)    Device B (female DB9)
   Pin 1 DCD  ─────── DCD  Pin 1
   Pin 2 RXD  ─────── RXD  Pin 2
   Pin 3 TXD  ─────── TXD  Pin 3
   Pin 4 DTR  ─────── DTR  Pin 4
   Pin 5 GND  ─────── GND  Pin 5  (REQUIRED)
   Pin 6 DSR  ─────── DSR  Pin 6
   Pin 7 RTS  ─────── RTS  Pin 7
   Pin 8 CTS  ─────── CTS  Pin 8
   Pin 9 RI   ─────── RI   Pin 9

Minimum required connections (for simple 3-wire RS232):
   Pin 2 RXD  ─────── TXD  Pin 3  (cross!)
   Pin 3 TXD  ─────── RXD  Pin 2  (cross!)
   Pin 5 GND  ─────── GND  Pin 5

Note: For DTE-to-DTE, TXD and RXD must be CROSSED
For DTE-to-DCE (straight cable): TXD connects to TXD (straight)
   because DCE internally crosses them

Null Modem Cable Wiring

A null modem cable connects two DTE devices (e.g., computer to PLC, Arduino to PC) without a modem in between. It crosses the TXD/RXD lines and provides handshaking signal loopbacks.

Null Modem Cable (Full, with hardware flow control):

Device A (male DB9)    Device B (male DB9)
   Pin 2 RXD  ─────── TXD  Pin 3
   Pin 3 TXD  ─────── RXD  Pin 2
   Pin 5 GND  ─────── GND  Pin 5
   Pin 4 DTR  ─┬───── DSR  Pin 6
               └───── DCD  Pin 1
   Pin 6 DSR  ─┐
   Pin 1 DCD  ─┴───── DTR  Pin 4
   Pin 7 RTS  ─────── CTS  Pin 8
   Pin 8 CTS  ─────── RTS  Pin 7

Simple Null Modem (3-wire, no handshake):
   Pin 2 RXD  ─────── TXD  Pin 3
   Pin 3 TXD  ─────── RXD  Pin 2
   Pin 5 GND  ─────── GND  Pin 5
   (Tie DTR-DSR-DCD together on each end to self-assert handshake)
Recommended: Waveshare Industrial Digital I/O Module — Interfaces with RS485 Modbus but often needs a gateway that connects via RS232 DB9 to older SCADA software still running on Windows XP/7 in Indian factories.

Connecting DB9 to Arduino or ESP32

Arduino and ESP32 operate at 3.3V/5V TTL UART logic levels. RS232 operates at ±3V to ±15V. A level converter IC is required:

Using MAX232 (5V Arduino) or MAX3232 (3.3V ESP32):

Arduino UNO (5V):
  Arduino Pin 0 (RX) → MAX232 R1OUT
  Arduino Pin 1 (TX) → MAX232 T1IN
  MAX232 T1OUT → DB9 Pin 3 (TXD)
  MAX232 R1IN  → DB9 Pin 2 (RXD)
  GND          → DB9 Pin 5 (GND)
  VCC (5V)     → MAX232 VCC
  4 x 1uF capacitors: C1-C4 as per MAX232 datasheet

Software (Arduino):
  Serial.begin(9600);
  Serial.println("Hello from Arduino via RS232");
  
For direct connection to equipment requiring DTR/RTS:
  Also connect:
  Arduino GPIO → MAX232 T2IN → DB9 Pin 7 (RTS)
  DB9 Pin 6 (DSR) → MAX232 R2IN → Arduino GPIO

Frequently Asked Questions

Is DB9 and RS232 the same thing?

Not exactly. RS232 is the electrical standard (voltage levels, signal definitions). DB9 is the physical connector most commonly used for RS232. RS232 can technically use other connectors (DB25 was the original), but DB9 is the de facto RS232 connector in modern equipment.

Why does my RS232 device not respond to my Arduino?

Most common reasons: (1) No level converter — TTL 5V UART is NOT RS232, will damage RS232 input stage or not register as valid. (2) Wrong baud rate settings — must match exactly (8N1 is standard: 8 data bits, no parity, 1 stop bit). (3) TX/RX crossed correctly? DTE-to-DTE connection requires TX-to-RX crossover. (4) Handshake lines not asserted — some instruments require DTR=high before responding.

Where can I buy DB9 connectors and cables in India?

DB9 connectors (male and female, solder type) are available at SP Road Bengaluru, Lamington Road Mumbai, and Palika Bazaar Delhi for Rs 10-30 each. RS232 straight-through and null-modem cables are available at IT accessory shops for Rs 80-200. USB-to-RS232 adapters (CH340 chip) are available online for Rs 150-300.

Shop Cables, Connectors & PCB at Zbotic

Tags: db9 connector pinout, db9 rs232 india, null modem cable, rs232 wiring diagram, serial cable wiring
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
RP2040 Pico W vs ESP32: WiFi M...
blog rp2040 pico w vs esp32 wifi microcontroller showdown 598917
blog e bike motor noise troubleshooting causes and fixes india 598923
E-Bike Motor Noise Troubleshoo...

Related posts

Svg%3E
Read more

Spiral Wrap: Cable Bundling and Protection

April 1, 2026 0
Table of Contents What Is Spiral Wrap Spiral Wrap vs Split Loom Spiral Wrap Sizes and Materials How to Install... Continue reading
Svg%3E
Read more

Cable Tie Anchor: Mount Points for Wire Routing

April 1, 2026 0
Table of Contents What Are Cable Tie Anchors Types of Cable Tie Mount Points Adhesive vs Screw-Mount Anchors Installing Cable... Continue reading
Svg%3E
Read more

Cable Length Calculator: Voltage Drop for Long Runs

April 1, 2026 0
Table of Contents Why Cable Length Matters Voltage Drop Formula Explained Wire Resistance by Gauge Calculating Voltage Drop: Examples Maximum... Continue reading
Svg%3E
Read more

Wire Wrapping: Vintage Prototyping Technique

April 1, 2026 0
Table of Contents What Is Wire Wrapping History of Wire Wrap Technology Wire Wrap Tools and Wire How to Wire... Continue reading
Svg%3E
Read more

Manhattan Style: Dead Bug Circuit Construction

April 1, 2026 0
Table of Contents What Is Manhattan Style Construction Dead Bug Technique Explained When to Use Manhattan/Dead Bug Tools and Materials... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now