The RS-485 to TTL Board (Manufacturer Part ID: 2126) is a versatile module designed to convert RS-485 signals to TTL (Transistor-Transistor Logic) levels. This conversion enables seamless communication between devices operating at different voltage levels, making it an essential component in various electronic projects.
Parameter | Value |
---|---|
Operating Voltage | 3.3V to 5V |
Communication Type | RS-485 to TTL |
Baud Rate | Up to 115200 bps |
Operating Temperature | -40°C to 85°C |
Dimensions | 44mm x 14mm x 11mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V to 5V) |
2 | GND | Ground |
3 | RO | Receiver Output (TTL level) |
4 | RE | Receiver Enable (Active Low) |
5 | DE | Driver Enable (Active High) |
6 | DI | Driver Input (TTL level) |
7 | A | RS-485 Line A |
8 | B | RS-485 Line B |
Power the Module:
Connect RS-485 Lines:
Enable Communication:
Connect to Microcontroller:
#include <SoftwareSerial.h>
// Define the pins for the RS-485 to TTL module
#define RX_PIN 10
#define TX_PIN 11
#define RE_PIN 8
#define DE_PIN 9
// Create a SoftwareSerial object
SoftwareSerial rs485Serial(RX_PIN, TX_PIN);
void setup() {
// Initialize the serial communication
Serial.begin(9600);
rs485Serial.begin(9600);
// Set the RE and DE pins as outputs
pinMode(RE_PIN, OUTPUT);
pinMode(DE_PIN, OUTPUT);
// Enable the receiver and disable the driver
digitalWrite(RE_PIN, LOW);
digitalWrite(DE_PIN, LOW);
}
void loop() {
// Check if data is available on the RS-485 bus
if (rs485Serial.available()) {
// Read the data and print it to the Serial Monitor
String data = rs485Serial.readString();
Serial.println("Received: " + data);
}
// Check if data is available from the Serial Monitor
if (Serial.available()) {
// Read the data and send it over the RS-485 bus
String data = Serial.readString();
rs485Serial.println(data);
// Enable the driver and disable the receiver
digitalWrite(RE_PIN, HIGH);
digitalWrite(DE_PIN, HIGH);
// Wait for the data to be sent
delay(10);
// Disable the driver and enable the receiver
digitalWrite(RE_PIN, LOW);
digitalWrite(DE_PIN, LOW);
}
}
No Communication:
Data Corruption:
Noise and Interference:
By following this documentation, users can effectively integrate the RS-485 to TTL Board into their projects, ensuring reliable communication between devices with different voltage levels.