Ordered on weekdays before 14:00 = shipped the same day and delivered the next day in 98% of cases. Free returns 30-day reflection period 1-year warranty

Wiring diagram and code example

How to connect the MAX3232 RS232 to TTL serial module to an Arduino UNO or ESP32, with an example sketch you can upload straight away.

MAX3232 RS232 to TTL Serial Bridge

This project sets up a transparent serial bridge between the Arduino USB serial monitor and an RS232 device via the MAX3232 module. SoftwareSerial handles communication on pins D2 and D3 at 9600 baud while keeping hardware Serial free for the computer monitor. Any character typed in the Serial Monitor is transmitted over RS232, and any incoming RS232 bytes are printed to the monitor.

Wiring diagram: MAX3232 RS232 to TTL serial module on an Arduino UNO
Wiring diagram · Click to enlarge
Connection table: MAX3232 RS232 to TTL serial module on an Arduino UNO
Connection table · Click to enlarge
MAX3232_RS232_to_TTL_Serial_Bridge.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : MAX3232 RS232 to TTL Serial Bridge
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : MAX3232 RS232 to TTL Serial Converter Module
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <SoftwareSerial.h>

const uint8_t RX_PIN = 2; // Connect to MAX3232 TXD
const uint8_t TX_PIN = 3; // Connect to MAX3232 RXD

SoftwareSerial rs232Serial(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(115200);
  rs232Serial.begin(9600);

  Serial.println(F("--- MAX3232 RS232 Bridge Ready ---"));
  Serial.println(F("Type in the Serial Monitor (115200 baud) to send over RS232 (9600 baud)."));
  Serial.println(F("Any response from the RS232 device will appear here."));
}

void loop() {
  // Forward characters from the USB Serial Monitor to the RS232 module
  while (Serial.available() > 0) {
    char c = Serial.read();
    rs232Serial.write(c);
  }

  // Forward characters from the RS232 module to the USB Serial Monitor
  while (rs232Serial.available() > 0) {
    char c = rs232Serial.read();
    Serial.write(c);
  }
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

RS232 Communication with MAX3232 and ESP32

This project connects an ESP32 to a MAX3232 module to enable RS232 serial communication. The ESP32 uses Hardware Serial2 to send and receive RS232 signals at 3.3V logic levels. To verify operation within minutes, bridge pins 2 and 3 (RX and TX) on the module's DB9 connector for a loopback test that echoes outgoing messages back to the Serial Monitor.

Wiring diagram: MAX3232 RS232 to TTL serial module on an ESP32 DevKit V1
Wiring diagram · Click to enlarge
Connection table: MAX3232 RS232 to TTL serial module on an ESP32 DevKit V1
Connection table · Click to enlarge
RS232_Communication_with_MAX3232_and_ESP.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : RS232 Communication with MAX3232 and ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : MAX3232 RS232 to TTL Serial Converter Module
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

// MAX3232 RS232 Demo for ESP32 DEVKIT V1
// Uses Hardware Serial2: GPIO 16 (RX2) and GPIO 17 (TX2)

const int RX_PIN = 16;
const int TX_PIN = 17;

unsigned long lastSendTime = 0;
const unsigned long sendInterval = 2000; // Send a test string every 2 seconds
int messageCounter = 0;

void setup() {
  // USB Serial Monitor
  Serial.begin(115200);
  while (!Serial && millis() < 2000);

  // RS232 Port on Serial2 (9600 baud, 8N1)
  Serial2.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN);

  Serial.println("--- MAX3232 RS232 Bridge Initialized ---");
  Serial.println("Tip: Short DB9 pins 2 & 3 for an automatic loopback test.");
}

void loop() {
  // Periodically send a message out via RS232
  if (millis() - lastSendTime >= sendInterval) {
    lastSendTime = millis();
    messageCounter++;

    String msg = "RS232 Test Message #" + String(messageCounter);
    Serial2.println(msg);
    Serial.print("[RS232 TX] ");
    Serial.println(msg);
  }

  // Print any incoming data from the RS232 interface
  if (Serial2.available()) {
    Serial.print("[RS232 RX] ");
    while (Serial2.available()) {
      char inChar = (char)Serial2.read();
      Serial.print(inChar);
    }
  }

  // Forward any user input from Serial Monitor to RS232
  if (Serial.available()) {
    char outChar = (char)Serial.read();
    Serial2.write(outChar);
  }
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

MAX3232 RS232 to TTL serial module

MAX3232 RS232 to TTL serial port converter module DB9 connector

Main parameters:

Control chip: MAX3232
Operating voltage: 3.3V-5V DC
Operating current: 6mA
Power supply: external
Interface: TXD, RXD, GND, VCC
Overall dimensions: 33 mm x 32 mm x 16 mm

  • MAX3232 chip
  • 3.3-5V DC
  • Externally powered
  • 33 x 32 x 16 mm

Why choose this product?

  • DB9 connector – For RS232 connection with DB9.
  • 3.3-5V power supply – Works on 3.3V-5V DC.
  • Externally powered – Connection to external power supply.
  • Four interface pins – TXD, RXD, GND and VCC.
Specifications
Dimensions33 mm x 32 mm x 16 mm
ConnectionDB9 connector
ModelMAX3232
Power6mA

Frequently bought together

Total: € 10,55

Reviews

★★★★★ 5,0/5 5 reviews
  • ★★★★★Jan Siebesma

    Meets expectations perfectly.

  • ★★★★★Gerrit NijhofVerified purchase

    Works well connected to the Esp32 for connection with a hybrid inverter

  • ★★★★★Michael BeelmanVerified purchase

    Not tested yet.

Write a review
Your rating

Shipping & returns

Shipping

  • Parcel with track & trace€ 7,70Within 24 hours
  • Pick up at PostNL location€ 7,40Within 24 hours
  • Letterbox parcel€ 3,70Within 2 business days
  • Letterbox parcel 24 hours€ 4,55Within 24 hours
  • Pick up in storeFree
All about shipping

Returns

Not satisfied? You have 30 days after delivery to return the product.

All about returns