I already extract the data using putty through serial monitor they i have used rs232 to usb interface without setting any handshaking but now i need to extract the data through arduino uno
It (i.e. the hardware handshaking) will be handled within the RS232-USB dongle or putty for you.
But they i didn't set any hardware handshaking and all... The problem is i don't have that manual for weighing scale. What to do now?
Ok. Here's something you can try that will completely eliminate any need for code on your Arduino UNO but allow you to get the basic wiring sorted out.
The basics are detailed here:
https://create.arduino.cc/projecthub/PatelDarshil/ways-to-use-arduino-as-usb-to-ttl-converter-475533
The idea is to use your UNO along with your RS232-TTL interface board to talk to the scales from the Arduino IDE.
Connect the wire link between RESET and GND (0V) on your UNO. This holds the on-board 328P chip in reset.
Connect UNO GND to RS232-TTL GND
Connect UNO 5V to RS232-TTL VCC
The next 2 connections are either correct or the wrong way round depending on the interpretation of the labels on your RS232-TTL module.
Connect UNO 0 (RX) to RS232-TTL TXD
Connect UNO 1 (TX) to RS232-TTL RXD
If no additional handshaking is required, you should now be able to set the Arduino IDE serial monitor to 9600 baud and the line ending to "Both NL & CR".
In the Arduino IDE serial monitor, type in the letter R and click send. If the connections are correct (and no additional handshaking is required), you should see a response from the scales in the serial monitor.
If you don't get a response, try swapping over the wires on pins 0 & 1 and repeating the test.
If hat still does not work, please upload photos of the top and the bottom of your RS232-TTL module.
Did you try the test sketch in post #7 after you wired it up correctly?
Nothing worked
i tried nothing printed
It doesn't look like the RS232 module does anything with the handshake lines.
To figure this out I would start with what works (i.e. the PC + putty setup) and try and break it.
If it is a handshaking issue, then the following should confirm it.
Disconnect the RS232 cable from the USB-RS232 adapter. Connect a wire from pin 2 of the cabe to pin 2 of the adapter. Connect another wire from pin 3 to pin 3, and another wire from pin 5 to pin 5.
That should allow just TxData, RxData and Gnd to pass through. If your putty test stops working, then it's likely a handshake issue.
If it is a handshake issue, this can be fixed by putting loopback wires on the handshake pins.
1. Check that your connection among WScale, RS232/TTL Converter, and UNO agrees with Fig-1.
Figure-1:
2. Upload the following sketch (your one with slight modification) and check that you see something on the Serial Monitor.
#include <SoftwareSerial.h>
#define rxPin 10
#define txPin 11
SoftwareSerial mySerial(rxPin, txPin);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
}
void loop()
{
mySerial.print('R');
if (mySerial.available() != 0)
{
char ch = mySerial.read();
Serial.print(ch);
}
delay(1000); //test interval
}
Maybe worth while having a look at this post... solved at post #113.
It's not worked while connecting 2 to 2, 3 to 3, and 5 to 5.
but its worked when I connect 1 to 1, 2 to 2, 3 to 3, 4 to 4, 5 to 5. I'm able to see the data in putty
That suggests that the scales are using hardware handshaking. It's probably pin 4. On the RS232 cable connect 4 to 6 (DTR to DSR). You can also connect 7 to 8 (CTS to RTS). That should work but we may also need to do something with pin 1.
i didn't understand what you are saying could explain it in detail
nothing printing in serial monitor
Disconnect your RS232 cable between RS232/TTL converter module and WScale. Put jumpers (Fg-1 of post #33) between WScale and RS232/TTL module and play around with connections until it works.
Yes! Now, you play around. Be sure that each and every jumper (WS to Converter and Converter to UNO) is tested for continuity. Also, try shoring together 7-8l 4-6-1 at the DB-9 connector side of Converter.
Try:
WS pin-2 to Converter pin-3
WS pin-3 to Converted pin-2
This is the standard signal signatures of DB-9 connector.
Can you please, attach the driver file of your RS232/USB Cable? I am missing mine one.
It showing not authorized extension
Actually my weighing scale had db9 female connector and converter also having db 9 female connector
Then try 2 to 2 and 3 to 3.
Please, give the link to the Technical Manual of the Weighing Scale or its commercial type number.