Table of Contents

lamaPLC: YR-3180 - Weight sensor module with UART or Modbus communication

The weighing acquisition module is a high-performance, multi-functional electronic weighing equipment. It uses advanced weighing technology to measure item weight in real time and display it on a five-digit digital display. It also includes upper- and lower-limit alarm functions. capable of achieving precise weighing control and monitoring.

At the same time, this product also features a TTL communication interface and Modbus RTU protocol, enabling convenient, rapid communication with PLCs, computers, and other equipment to transmit and remotely control weighing data. In addition, it supports Type-C power supply and button debugging, improving convenience and stability.

YR-3180 Intelligent weighing sensor moduleYR-3180 Intelligent weighing sensor module

Key Specifications and Features

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 22:38

Power and Communication (Host Side)

The module is powered via Type-C or dedicated pins and supports dual communication modes:

Modbus map

Data TypeDescriptionCommon Address RangeAccess
Current WeightThe main measured value (often a 32-bit float or integer)30001 - 30002 (Input)Read Only
Zero/Tare CommandA single coil or holding register to trigger a zero action0001 or 40001 (Coil/Holding)Write Only
Device AddressThe Modbus Slave ID (default is often 1 or 2)40002 (Holding)Read/Write
Baud RateCommunication speed setting (e.g., 9600, 19200 bps)40003 (Holding)Read/Write
Alarm Limit (Upper)The high limit for the alarm output40004 (Holding)Read/Write
Alarm Limit (Lower)The low limit for the alarm output40005 (Holding)Read/Write

Description: YR-3180 Intelligent weighing sensor module

Arduino & YR-3180

The YR-3180 is an ultrasonic distance sensor that communicates via UART (Serial). It typically outputs a 4-byte data packet (Header, Data High, Data Low, and Checksum) every 100ms.

Arduino Wiring

Using SoftwareSerial is recommended to keep the main hardware serial port (USB) free for your Serial Monitor.

Arduino Example Code

This code listens for the standard 4-byte packet, verifies the checksum, and calculates the distance in millimeters.

#include <SoftwareSerial.h>
 
// RX = 10, TX = 11
SoftwareSerial sensorSerial(10, 11);
 
unsigned char buffer[4];
int distance;
 
void setup() {
  Serial.begin(115200);   // Communication with PC
  sensorSerial.begin(9600); // Standard YR-3180 baud rate
  Serial.println("YR-3180 Sensor Initialized");
}
 
void loop() {
  if (sensorSerial.available() > 0) {
    // Look for the start byte (0xFF)
    if (sensorSerial.read() == 0xFF) {
      buffer[0] = 0xFF;
      for (int i = 1; i < 4; i++) {
        buffer[i] = sensorSerial.read();
      }
 
      // Calculate Checksum: (buffer[0] + buffer[1] + buffer[2]) & 0xFF
      byte sum = (buffer[0] + buffer[1] + buffer[2]) & 0xFF;
 
      if (buffer[3] == sum) {
        // Distance is High Byte << 8 + Low Byte
        distance = (buffer[1] << 8) + buffer[2];
        Serial.print("Distance: ");
        Serial.print(distance);
        Serial.println(" mm");
      } else {
        Serial.println("Checksum Mismatch");
      }
    }
  }
  delay(100); // Match sensor's output frequency
}

Implementation Details

Sensor topics on lamaPLC

PageDateTags
2026/02/12 22:14, , , , , , , , ,
2026/02/14 22:31, , , , , , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 23:38, , , , , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/03/28 22:07, , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:36, , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/02/14 22:39, , , , , , , , , , ,
2026/02/14 23:39, , , , , , , , , , , , ,
2026/02/14 22:16, , , , , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 22:55, , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/15 20:42, , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2026/02/15 20:44, , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2026/03/21 20:45, , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:18, , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:19, , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 23:59, , , , , , , , , , ,
2026/03/28 18:02, , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 23:35, , , , ,
2026/02/14 22:24, , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 17:38, , , , , , , , , ,
2026/02/15 17:35, , , , , , , , , , ,
2026/02/15 20:20, , , , , , , , , , , , , , , , , ,
2026/03/22 01:24, , , , , , , , , , , ,
2026/02/14 21:17, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 16:39, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2025/09/23 16:59, , , , ,
2026/02/14 17:42, , , , , , ,
2026/02/14 22:33, , , , , ,
2026/02/14 22:33, , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/15 22:34, , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2023/06/24 22:43, , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/02/14 22:32, , , , ,
2026/02/14 23:00, , , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:49, , , , , ,
2025/12/10 17:50, , , ,
2025/11/09 17:38, , , , , , , ,




This page has been accessed for: Today: 1, Until now: 50