Problem reading RS232 from digital scale

I'm trying to read data from digital scale using rs232, I use MAX3232 to connect serial with the monitor scale.
I'm using Arduini mega 2560 serial port and it doesnt came up with anything what so ever.
I try using Serial1.available() and it came up with either 0 or -1

Please, show your connection and codes.

I have never seen available () return negative numbers.

Is the baud rate that your scales produce the same as the rate you used in the Serial1.begin you used in your Mega code?

And is your MAX2323 wired so that it ignores any handshaking lines?

I have to ask - how do you know the scale actually has a RS232 interface?

Can you post the documentation?

Do you have the transmit signal on the scales going to the receive signal on the Arduino, and receive on the scales to transmit on the Arduino?

Also, the GND line and the shield wire?

Yes, the scale use 2400baudrate, 7 bit rate, even parity and 1 stop bit, the code i use was "Serial1.begin(2400, SERIAL_7E1) and its still doesn't work, i even try to change the baudrate and the config on the scale and its still doesn't came up with anything

I don't really know, i use rs232 to ttl converter using MAX3232

It was stated on the manual

Idk why its a video

Mine are GSW-3015, its mostly the same

Yess, i have tried change the rx and tx on both rs232 to ttl and the Arduino,

Worth trying a loop back from the scale side of the RS232 converter to see if the mega is sending and receiving ok

My point is that it is rather unlikely that this device actually uses RS-232 for communication.

You would first need to check - with a multimeter - the idle voltage on the TX connection; have you done that?

Yes but how do you wire it up, please post a schematic.

I use this kind of converter, using male to male rs232 db9 cable (cause the scale rs232 port is a female and this converter use female too)

image

im sorry i don't really understand, how can i do that?

On the converter PCB, put a jumper between RX and TX.


BTW, the TX of your Arduino is the RX on the scale, RX of your Arduino is the TX on the scale.

1 Like

do I do this on the converter or the Arduino? I've done this on the Arduino, the Arduino echoing what I type on the serial monitor just fine, I don't understand how to do it to the converter

Look at the DB09 connector.

You should be able to identify pins 2 and 3, put a jumper between these then run the test.

1 Like

thank you so much for the picture,
I've try the loopback test using the Arduino, Arduino and the converter and Arduino, the converter the cable too.
It's all working normally.

I've tried to plug the tx of the scale to the rx in Arduino mega,
now I the scale send random numbers, how can I parse this to something useful?


the code i use:
image
and when i change this to char this is what i get: