Read a scale data via RS232M Mstock

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

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) .

please support me on this project.

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

In the future, please take some time to pick the forum category 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. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Please explain.

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.

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).

"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

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.

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.

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

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

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.

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

#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

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

Please do not cross post; it wastes peoples time.

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.

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