I need to communicate with a device with serial communication. I don't understand Arduino at a very deep level. I am nervous that it won't work via the USB cable for some reason. The device I am trying to communicate with is 12V and has an RS232 connection. I found a breakout board that I can wire to pins 1 and 0 but I don't know if that requires different commands than serial.print() serial.write(). Is the code different? Am I wrong and would the USB terminal be sufficient? Thank you!
Difference between using pins 0 and 1 and USB for serial communication
Hi @eric_lee21 .
This equipment probably uses an RS232 serial output
standard with different TTL levels.
In this case you need an RS232 module for TTL serial.
What is your breakout board and how do you have it connected?
That is one thing I need to figure out because I wanted to use the "SparkFun RS232 Shifter - SMD" and connect that to pins 0 and 1. But I need a male connector not a female one. I really just need a robust way to control this machine using an arduino to RS232 connection.
If you had provided a link I would have followed it and provided some analysis. But a level shifter on pins 0 and 1 can generally provide a reliable RS-232 interface to most RS-232 devices. The only catch, is that you can't simultaneously use Serial to communicate with the PC over the Arduino's USB port. Male/female and DCE/DTE configurations of RS-232 are beyond the scope of Arduino, it's better to consult RS-232 documentation to figure that out.
Ya sorry here is the link SparkFun RS232 Shifter - SMD - PRT-00449 - SparkFun Electronics if anyone is looking for a similar thing
Buy two male subD connectors and some wire and solder pin 2 to pin 2 (or pin 3), pin 3 to pin 3 (or pin 2) and pin 5 to pin 5; exact connection depends and often used to be trial and error if you don't know the details of the device side.
The device might also require hardware handshake, you will have to consult the user manual for that.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.