Electronics

USB to Serial RS485 Converter Module

AED 12.00

Low stock
1

Description

The USB RS485 adapter is a device that enables easy connection of serial devices to a USB port. It supports devices with RS-485 communication interfaces such as Programmable Logic Controllers (PLCs). The adapter comes with screw terminals for connection, is backward compatible with USB 1.1, and supports baud rates ranging from 75bps to 115200bps, up to 6 Mbps. It has low power consumption, eliminating the need for an external power supply. The adapter is compatible with various operating systems, including Windows XP/Vista/Windows 7/Windows 8, Mac, Linux, and Windows CE 5.0.

 

Package Includes:

  • 1 x USB RS485 adapter

 

Features:

  • Easy Connectivity: The USB RS485 adapter module allows easy connectivity between serial devices and a USB port. This simplifies the process of connecting different serial devices to computers or other systems.
  • RS-485 Communication: The module supports RS-485 communication, which is a standard for serial communication in various industrial automation applications. This makes it highly compatible with Programmable Logic Controllers (PLCs) and other similar devices.
  • Screw Terminals: The module features screw terminals, which make it easy to connect wires to the adapter. The screw terminals are also backward compatible with USB 1.1, which makes the module versatile and compatible with older systems.
  • High-Speed Data Transfer: The module supports baud rates ranging from 75bps to 115200bps, and speeds of up to 6 Mbps, making it capable of high-speed data transfer.
  • Low Power Consumption: The module has low power consumption, which eliminates the need for an external power supply. This makes it a convenient and cost-effective solution for connecting serial devices to a USB port.
  • Operating System Compatibility: The module is compatible with various operating systems, including Windows XP/Vista/Windows 7/Windows 8, Mac, Linux, and Windows CE 5.0. This ensures that the module can be used with a wide range of computer systems.
  • Compact Design: The module has a compact design with dimensions of 60 x 18 x 14mm, making it easy to carry around and use in different locations.
  • Raspberry Pi Compatibility: The module is compatible with Raspberry Pi boards and does not require any drivers. This makes it easy to use with Raspberry Pi projects.

 

Description:

The USB RS485 adapter is a highly versatile device that enables easy and efficient connection of serial devices to a USB port. It offers seamless compatibility with various devices that have RS-485 communication interfaces, such as Programmable Logic Controllers (PLCs). The adapter is designed with screw terminals, which makes the connection process simple and straightforward. The screw terminals are backward compatible with USB 1.1, which ensures that the device can be used with older computer systems as well. With support for baud rates ranging from 75bps to 115200bps and speeds of up to 6 Mbps, this USB RS485 adapter provides reliable and fast data transfer for a wide range of serial devices. It also has low power consumption, which eliminates the need for an external power supply. The USB RS485 adapter is highly compatible with various operating systems, including Windows XP/Vista/Windows 7/Windows 8, Mac, Linux, and Windows CE 5.0. This ensures that the device can be used with a wide range of computer systems, making it highly versatile.

 

Principle of Work:

The USB RS485 adapter with only two pins has an integrated USB-to-RS485 converter chip that performs the signal conversion between the USB and RS485 interfaces. When the USB RS485 adapter is connected to a USB port of a computer or other system, the USB interface of the adapter is used to communicate with the system. The adapter's integrated converter chip then converts the USB signals to RS485 signals and transmits them over the RS485 network via the two pins. When data is received from the RS485 network, the converter chip of the adapter converts the RS485 signals to USB signals and sends them to the computer or other system through the USB port. The two pins on the adapter are used to connect to the RS485 network, and are typically labeled as A and B or D+ and D-.

 

Pinout of the Module:

 

the module is using an integrated USB-to-RS485 converter chip, and the two pins are used to connect to the RS-485 network. In this case, the pinout of the two-pin connector would typically be as follows:

  1. A or D+ (Positive signal of the RS-485 interface)
  2. B or D- (Negative signal of the RS-485 interface)

 

Applications:

  1. Connecting Programmable Logic Controllers (PLCs) to a computer or other system for monitoring and control purposes.
  2. Connecting other serial devices, such as sensors, meters, and motor controllers, to a computer or other system for data acquisition and control.
  3. Providing a gateway between different communication protocols, such as Modbus TCP/IP and Modbus RTU, by converting the protocols to RS485.
  4. Interfacing with RS485-based networks, such as building automation systems, access control systems, and industrial process control systems.
  5. Providing a cost-effective and reliable solution for connecting multiple RS485 devices to a computer or other system.

 

Circuit:

The Arduino UNO is configured as Modbus Slave. So the slave Arduino is controlled by the Master Modbus Software. The communication between the Arduino UNO and the Modbus Master Software is accomplished by using the RS-485 module. For connecting it to the PC, the USB to RS-485 converter module is used. And the Arduino UNO with MAX-485 TTL to RS-485 converter module. 

 

Library:

For using Modbus in Arduino UNO, a library  is used. This library is used for communicating with RS-485 Modbus Master or Slave via RTU protocol. Download the Modbus RTU.

Add the library in the sketch by following Sketch->include library->Add .zip Library

 

Code:

Programming Arduino UNO for RS-485 MODBUS Slave:

This code sets up an Arduino device as a Modbus slave and continuously polls for data from the Modbus master. The received data is stored in an array, and the code prints out dummy strings and the value of the third element of the array on the serial monitor. This code can be modified to perform other tasks based on the received data from the Modbus master.

 

#include"ModbusRtu.h"      //Library for using Modbus in Arduino
Modbus bus;                          //Define Object bus for class modbus 
uint16_t modbus_array[] = {0,0,0};    //Array initilized with three 0 values
                      
void setup()
{
  Serial.begin(9600);                //Lcd set in 16x2 mode
  Serial.print("Hello");     //Welcome Message  
  Serial.print("Arduino Slave");
  delay(5000);
  //Modbus slave ID as 1 and 1 connected via RS-485 and 4 connected to DE & RE pin of RS-485 
  bus = Modbus(1,1,4); 
  bus.begin(9600);                //Modbus slave baudrate at 9600
}

void loop()
{
 //The below statement is Used to receive or write value from Master
 bus.poll(modbus_array,sizeof(modbus_array)/sizeof(modbus_array[0]));  
  if (modbus_array[0] == 0)//Depends upon value in modubus_array[0] written by Master Modbus
  {
    Serial.println("Data 1");   // Dummy Strings
  }
  else
  {
     Serial.print("NO Data 1");  // Dummy Strings  
  } 

 if (modbus_array[1] == 0) //Depends upon value in modbus_array[1] written by Master Modbus
  {
     Serial.println("Data 2");    // Dummy Strings
  }
  else
  {
     Serial.print(" NO Data 2");  // Dummy Strings 
  }
  
  int pwm = modbus_array[2]; //Depends upon value in modbus_array[1] given by Master Modbus      
  Serial.print("Mod bus:");
  Serial.println(pwm);              
  delay(200); 
  
}

  • This is an Arduino code that uses the ModbusRtu library to implement a Modbus slave device. The code initializes a Modbus object named "bus" with a slave ID of 1 and a baud rate of 9600. The device is connected to the Modbus master via an RS-485 interface, and the DE and RE pins are connected to digital pin 4 of the Arduino.
  • The code then enters an infinite loop, where it continuously polls the Modbus object for new data using the "bus.poll" function. The polled data is stored in an array named "modbus_array," which is initialized with three zero values.
  • The code checks the values in the modbus_array and prints out dummy strings on the serial monitor, depending on the values received. The first and second elements of the array are checked for values of 0, and if they are zero, the code prints out "Data 1" or "Data 2," respectively. If the values are not zero, the code prints out "NO Data 1" or "NO Data 2," respectively.
  • The third element of the array is assigned to an integer variable named "pwm." The code then prints out "Mod bus:" followed by the value of the "pwm" variable on the serial monitor. The code then waits for 200 milliseconds using the "delay" function before looping back and polling for new data again.

if you want to continue testing with this code you can read the rest in this tutorial "Testing the Arduino UNO as Rs485 Modbus Slave under".

 

Technical Details: 

  • Modbus USB 2.0 RS485 Converter
  • Screw terminals are used for connection and are backward compatible with USB 1.1.
  • Baud rates supported: 75bps - 115200bps / up to 6 Mbps
  • There is no need for an external power supply because of the low power consumption.
  • Operating systems supported: Windows XP/Vista/Windows 7/Windows 8 # Mac # Linux # Windows CE 5.0
  • 60 x 18 x 14mm Dimensions
  • Raspberry Pi compatible (no driver required)
  • Color: Black

 

Resources:

tutorial

If Windows driver "CH341SER" is needed download it by clicking here