test RS232 voltage - Page 1
Forum section: electronics / repair

author: alamwte
author_rank: Regular Contributor
timestamp: January 05, 2021, 09:53:45 pm
content: hello everyoneI have a question.I have a device that use RS232 to send and receive data. Now I want to test its RS232 to know that it work properly or not.How can I test RS232? Can I use multimeter or oscilloscope to test it or I have to use a softwere?And I want to see the voltage of receive and transmit when it send and receive data. I know when I send '1' logic its voltage should be between -3 to -13 and 3 to 13 when I send '0' logic. Can I use multimeter to see these voltage or I have to use oscilloscope?My multimeter show -11 in RX pin and -6 in TX pin but when I send data I don't see any change in voltage of multimeter.Thanks

author: ledtester
author_rank: Super Contributor
timestamp: January 05, 2021, 10:26:35 pm
content: An oscilloscope would be the best method.Most multimeters are too slow to capture the rapidly changing voltages of an RS-232 signal. They are, however, pretty good at measuring average values. So if you send a stream of the same character you should (theoretically) be able to compute the average voltage as a function of the following voltages:V_idle - voltage used when idleV_space - voltage used for a space (logical 0) - between +3 and +15VV_mark - voltage used for a mark (logical 1) - between -15 and -3V(Usually V_idle is the same as V_mark, but, of course, you can measure V_idle on a quiet line.)This combination will depend on the character format -- number of start bits, stop bits, data bits -- and the actual character data being sent.See this page for how the character format is translated into voltages:https://www.best-microcontroller-projects.com/how-rs232-works.htmlSo, pick a character to repeatedly send, determine the proportion of space bits to mark bits based on the character's binary value and the transmission format and measure the RS232 voltage.Since there are two unknowns (V_space and V_mark) you will need to do this twice to get two equations.

author: alamwte
author_rank: Regular Contributor
timestamp: January 05, 2021, 11:34:20 pm
content: Thank you dear ledtesterI have another question.when I measure the voltage of RX pin of my computer when it is no connected to any device it is -11.57v and when is connected to the switch device it show -10v . And the Tx show 0v when is no connected and -6v when is connected to the switch. ( I am not sure which pin is RX and which one is TX)Would you tell me what's the reason of these voltage when they are not connected to any device and why they change when they are connected to switch, while I don't send or receive data at the time?

author: ledtester
author_rank: Super Contributor
timestamp: January 06, 2021, 02:03:31 am
content: QuoteI'm a little out of my depth, but this is what I think may be going on...Here I've replicated Figure 4 of this TI document:https://www.ti.com/lit/an/snla037b/snla037b.pdfI've added Rout which is the output impedance of the driver. It typically is small but every signal source has an output impedance. From the TI document Rin is specified to be between 3K and 7K for RS232.Note that if the receiver is disconnected you will measure 0V at the receiver and if the driver is disconnected you will measure V_idle at the driver. But when you put the two together you will get an intermediate voltage due to the voltage divider created by Rout and Rin.

author: alamwte
author_rank: Regular Contributor
timestamp: January 06, 2021, 05:12:21 am
content: Thanks for your information