# Read a scale data via RS232M Mstock

**URL:** <https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944>\
**Category:** Networking, Protocols, and Devices\
**Created:** [August 21, 2024, 8:59am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944 "2024-08-21T08:59:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeshantcc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/yeshantcc/32/1131580_2.png) [@yeshantcc](https://forum.arduino.cc/u/yeshantcc)\
**Post date:** [August 21, 2024, 8:59am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/1 "2024-08-21T08:59:48Z")

</div>

Hi All, I have a project that need to read scale data via RS232. normal RS232 is bit complicated to use via MAX232 module. therefore I am planning to use module, [m5-docs](https://docs.m5stack.com/en/module/RS232M%20Module%2013.2)

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/0/7/707ca482a45e46542e4e8681bce760210d44ae99.jpeg)

I have not yet purchased it, But I am about to based on this thread.  
Can someone help me on this device how to code via Arduino. and is it similar to normal Rs232 module ( which Im struggling to get data.)

here is my scale. ( section 8 is relevant to this thread )  
[TJ-Y.docx (gandg.com.cn)](http://www.gandg.com.cn/en/tbc258_upfile/2021281510824740.pdf) .

please support me on this project.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [August 21, 2024, 9:15am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/2 "2024-08-21T09:15:30Z")

</div>

I moved your topic to an appropriate forum category @yeshantcc .

In the future, please take some time to pick the [forum category](https://forum.arduino.cc/categories) that best suits the subject of your topic. There is an " **About the \_\_\_\_\_ category**" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in [the " **How to get the best out of this forum**" guide](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966). The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [August 22, 2024, 6:12am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/3 "2024-08-22T06:12:50Z")

</div>

> [@yeshantcc](#):
>
> normal RS232 is bit complicated to use via MAX232 module

Please explain.

> [@yeshantcc](#):
>
> therefore I am planning to use module,

I think that that also needs a processor board; I'm not familiar with the M5Stack. The page that you linked contains a link to an Arduino example.

> [@yeshantcc](#):
>
> and is it similar to normal Rs232 module ( which Im struggling to get data.)

No idea; I have the feeling that you will encounter the same problems. You might be better off giving a description of what you have tried (which board, connection diagram, code).

---

<div class="post-metadata">

**Author:** ![yeshantcc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/yeshantcc/32/1131580_2.png) [@yeshantcc](https://forum.arduino.cc/u/yeshantcc)\
**Post date:** [August 22, 2024, 8:55am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/4 "2024-08-22T08:55:53Z")

</div>

"normal RS232 is bit complicated to use via MAX232 module"  
I tried to explain that, I trying to read scale data via RS232  
SCALE -\> Rs232 port -\> MAX232 module -\> Arduino uno -\> PC

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [August 22, 2024, 9:39am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/5 "2024-08-22T09:39:01Z")

</div>

> [@yeshantcc](#):
>
> Arduino uno

Using Rx and Tx? Or SoftwareSerial on other pins?

Be aware that Tx and Rx on the Uno are also used for communication with the PC so will interfere if you use them for communication with the scale.

---

<div class="post-metadata">

**Author:** ![yeshantcc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/yeshantcc/32/1131580_2.png) [@yeshantcc](https://forum.arduino.cc/u/yeshantcc)\
**Post date:** [August 22, 2024, 9:09am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/6 "2024-08-22T09:09:42Z")

</div>

Hi All,

I have a project where I need to control a relay based on scale data. I’m planning to use an Arduino Uno or Mega to read the scale's output. However, after trying several types of scales and RS232 converter modules, I haven't been successful. I'm now willing to start over and would greatly appreciate help from the Arduino FORUM. If anyone has already completed a similar project, I’m ready to purchase the exact same scale and module, and use the provided code. The only requirement is that the scale should have a capacity of up to 30kg.

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 22, 2024, 9:10am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/7 "2024-08-22T09:10:26Z")

</div>

You started a topic in the **Uncategorised** category of the forum when its description explicitly tells you not to

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

---

<div class="post-metadata">

**Author:** ![markd833](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/markd833/32/1186928_2.png) [@markd833](https://forum.arduino.cc/u/markd833)\
**Post date:** [August 22, 2024, 9:16am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/8 "2024-08-22T09:16:40Z")

</div>

> [@yeshantcc](#):
>
> after trying several types of scales and RS232 converter modules, I haven't been successful.

Do you have the user manuals for these scales? Which RS232 modules did you use?

> [@yeshantcc](#):
>
> I’m planning to use an Arduino Uno or Mega to read the scale's output.

In theory that shouldn't be a problem. There have been several projects recently that involved reading information from scales.

Can you post the code that you tried.

---

<div class="post-metadata">

**Author:** ![yeshantcc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/yeshantcc/32/1131580_2.png) [@yeshantcc](https://forum.arduino.cc/u/yeshantcc)\
**Post date:** [August 22, 2024, 9:47am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/9 "2024-08-22T09:47:17Z")

</div>

I got TX1000 scale reader and T66 load cell with Arduino with this code

````arduino
#include <SoftwareSerial.h>

SoftwareSerial mySerial(0,1); //SRX, STX   

void setup()
{
   Serial.begin(9600);
   mySerial.begin(9600);
   
}

void loop()
{
      if(mySerial.available()>0)
      {
           byte x = mySerial.read();
           Serial.println(x);
      }  
}

2) I have this scale -
chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/http://www.gandg.com.cn/en/tbc258_upfile/2021281510824740.pdf 2

which is inbuilt Rs232 output port.
```#include <SoftwareSerial.h>
SoftwareSerial SUART(6, 7);

void setup() {
  Serial.begin(9600);
  SUART.begin(9600);

}

void loop() {
    char inData[21]; // Allocate some space for the string
  char inChar; // Where to store the character read
  byte index = 0; // Index into array; where to store the character
  
  SUART.print('A'); //sending A using SUART port
  byte n = SUART.available();
  if (n != 0) {
 
      if (index <20) // One less than the size of the array
      {
        inChar = SUART.read(); // Read a character
        inData[index] = inChar; // Store it
        index++; // Increment where to write next
        inData[index] = '\0'; // Null terminate the string
      }
    }

      //Serial.println(inData );
    
      delay(1000);
  }

I dont have too much time to work on the code, it should be easy but byte receiving from the scale are hard to read via code. This project needs to finish asap. so I was expecting if someone has alerady completed it, I can purchase the same scale and module for the code

````

type or paste code here

```arduino

```

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 22, 2024, 9:50am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/10 "2024-08-22T09:50:46Z")

</div>

```arduino
SoftwareSerial mySerial(0,1); //SRX, STX   

```

Why have you used pins 0 and 1 for SoftwareSerial ?

They are used by the hardware Serial interface. Use any other pair of pins that are not used by something else in your project

In any case, if you use a Mega then you do not need to use SoftwareSerial as there 3 hardware serial interfaces available

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [August 22, 2024, 9:56am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/11 "2024-08-22T09:56:59Z")

</div>

Please do not cross post; it wastes peoples time.

---

<div class="post-metadata">

**Author:** ![yeshantcc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/yeshantcc/32/1131580_2.png) [@yeshantcc](https://forum.arduino.cc/u/yeshantcc)\
**Post date:** [August 22, 2024, 11:29am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/12 "2024-08-22T11:29:13Z")

</div>

I have not cross posted. this is a different problem Im facing. related to same issue im facing, but different module, different code. Plan was not to jumble the situation.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [February 18, 2025, 11:29am UTC](https://forum.arduino.cc/t/read-a-scale-data-via-rs232m-mstock/1293944/13 "2025-02-18T11:29:56Z")

</div>

Closed on February 18, 2025, 11:29am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
