detecting Rx and VCC pins on a serial port - Page 1
Forum section: electronics / beginners

author: m4rtin
author_rank: Regular Contributor
timestamp: October 22, 2012, 10:10:49 pm
content: I have a Buffalo WHR-HP-G54 router which has a SoC(Broadcom BCM5352) with UART support and 4 pins on the PCB. I easily detected the GND(no resistance with board ground) and Tx(voltage "pulses" and sendssome dataduring the bootup). Is there a way to distinguish between VCC and Rx pins? What is the purpose of VCC signal as it is not needed for serial transmission?

author: fozzyvis
author_rank: Regular Contributor
timestamp: October 22, 2012, 10:18:43 pm
content: Can't help you with the power line question, but it looks like you might have set the wrong baudrate, causing to come up with the wrong characters. Or the wrong encoding settings...

author: madires
author_rank: Super Contributor
timestamp: October 22, 2012, 10:28:22 pm
content: Please have a look at the bottom ofhttp://wiki.openwrt.org/inbox/whr_hp_g54.

author: fozzyvis
author_rank: Regular Contributor
timestamp: October 22, 2012, 10:32:36 pm
content: And note that, right above the picture, there's noted: "serial Pinout is wrong, must be: rx-tx-gnd-vcc(from left) "

author: c4757p
author_rank: Super Contributor
timestamp: October 22, 2012, 10:35:46 pm
content: If that page weren't there, the way I'd do it is this: If there is a voltage on the Rx pin, it's probably through a pull-up resistor. I'd stick a medium-resistance load (1K-4K7 or so) between the pin and ground. Vcc should see minimal voltage drop, but Rx will pull down significantly.Also, if you can see the traces, the traces for Tx and Rx will be similarly routed to the same place. Vcc will cut straight to the power plane or a fat power trace.

author: David_AVD
author_rank: Super Contributor
timestamp: October 22, 2012, 11:17:58 pm
content: Quote from: c4757p on October 22, 2012, 10:35:46 pmThat's exactly what I did the other week when faced with a product (sealed unit) with an unknown RJ12 pinout.With a few minutes of detective work, I figured out that it had a few ground pins, a Vcc pin and shared rx/tx pin.This is the sort of exercise that will enhance your skill set too.

author: m4rtin
author_rank: Regular Contributor
timestamp: October 24, 2012, 05:31:08 pm
content: Quote from: fozzyvis on October 22, 2012, 10:18:43 pmI tried with different baud rates(9600 8N1, 38400 8N1, 115200 8N1, 9600 7N1, 115200 7N1), but I still saw only such scribble. Is the trial and error only way to detect correct serial settings?c4757p,David_AVD: I tried this technique. I used100k ohm variable resistorand connected this toRxandVcc. As you can see, there is only 50mV difference. If I turn resistance to 0 ohm, the voltage will increase to 3.29V both in case of Rx and Vcc pin. Is this some sort of unusual design where Rx voltage does not drop?

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 24, 2012, 06:31:55 pm
content: Baudrate: It is mostly 19200,N,8,1Resistor: Should go from the unknown pin to earth, not to your meter.Measure across the resistor (resistor something like 4K7).VCC will not drop from 4K7, the other ports will.

author: c4757p
author_rank: Super Contributor
timestamp: October 24, 2012, 07:06:11 pm
content: Yeah, the resistor should go from the unknown pin to ground. The point is to see if the voltage drops with load.Do notlower the resistance all the way down to 0 ohm like you said - you'll see very soon what your router's magic smoke smells like. I wouldn't go below 1K. 4K7 should do it.

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 24, 2012, 07:41:16 pm
content: QuoteJust read that the default for the buffalo is 115K:2 serial ports detected, the first port (/dev/tts/0) is brought out on a 4 pin header labeled J1, located near a corner of the PCB. Pin 1 is nearest the edge. The signals are low level, and not directly EIA232 compatible. The default baud rate is 115K. When booting, CTRL-C will interrupt the CFE monitor. The pinout is:1 - 3.3V2 - Ground3 - Data out4 - Data in

author: m4rtin
author_rank: Regular Contributor
timestamp: October 26, 2012, 11:44:16 pm
content: PA0PBZ,c4757p: I tuned my variable resistor to ~4700 ohm andconnected unknown pin with GND. As you described, voltage droppedI tried with115200 8N1and19200 8N1baud rates. In addition, I enabled and disabled bothHardware Flow ControlandSoftware Flow Control. Any other suggestions? Maybe it has to do something with the fact that Tx is at 3.3V while at least on my PC it's -12V DC..In addition, what is the purpose of VCC signal as it is not needed for serial transmission?

author: David_AVD
author_rank: Super Contributor
timestamp: October 27, 2012, 12:43:45 am
content: It sounds like the data I/O is TTL (3.3v / 5V) and you're trying to directly connect it to an RS232 line. This won't work."TTL" levels swing from 0V to 5V (or 3.3V) while RS232 is in the range of +/- 5V to +/- 12V.The idle condition in "TTL" comms is 5V (or 3.3V), but the idle for RS232 is -12V (opposite polarity).You need to convert between the levels and do the polarity inversion too.The Vcc connection may be intended to power a small converter board?

author: m4rtin
author_rank: Regular Contributor
timestamp: October 27, 2012, 12:31:26 pm
content: Quote from: David_AVD on October 27, 2012, 12:43:45 amOk, I see.Quote from: David_AVD on October 27, 2012, 12:43:45 amWhat kind of converter board do you mean?

author: David_AVD
author_rank: Super Contributor
timestamp: October 27, 2012, 12:32:52 pm
content: Quote from: m4rtin on October 27, 2012, 12:31:26 pmOne that converts between TTL levels and RS232 levels.

author: madires
author_rank: Super Contributor
timestamp: October 27, 2012, 12:55:12 pm
content: Quote from: m4rtin on October 27, 2012, 12:31:26 pmA simple FTDI or Prolific USB-serial converter (just TTL, without RS232 driver chip) will do the job. Or get a BusPirate (great tool anyway).

author: m4rtin
author_rank: Regular Contributor
timestamp: August 12, 2013, 10:19:46 pm
content: Quote from: PA0PBZ on October 24, 2012, 06:31:55 pmGND(earth) pin is the second one from left onthis image. I connected one end of the 2.2kOhm resistor to GND pin. How should I connect the other end of the resistor if for example the first pin from left is the unknown pin? Like I did on the image?

author: David_AVD
author_rank: Super Contributor
timestamp: August 12, 2013, 10:30:15 pm
content: Set up you DMM (on Volts) to measure from unknown pin to 0V. Watch the voltage as you add the resistor from same pin to 0V (effectively across the DMM).If it doesn't drop, it's likely to be V+ or an output pin that can supply a reasonable current.If it drops by a significant amount (say > 500mV), it's likely to be an input with a weak pull-up.

author: MrAureliusR
author_rank: Unknown
timestamp: August 13, 2013, 01:16:30 am
content: Here's two pics of my breadboard setup that I created recently to connect my Raspberry Pi's UART pins via RS-232 to my PC. Just an example of how simple it really is to set it up. I used a MAX232A with 5 1.0uF caps. (Ignore the LEDs in the background, that's an ATmega doing something completely separate)I got 10 MAX232's a while back on eBay for like $5, they're very handy to have around. Also 555 timers, I got 40 (four zero!) for $4CDN ... that's right, 10 cents eachAnyway, if you have any more questions don't hesitate to ask or PM me, I can walk you through the setup.

author: Crazy Ape
author_rank: Regular Contributor
timestamp: August 13, 2013, 06:19:02 pm
content: This circuit will work fine if you don't have an RS232 level converter. Power it with VCC from the device you're talking to. I've tested this on 3.3v and 5v TTL devices.http://picprojects.org.uk/projects/simpleSIO/ssio.htm

author: MrAureliusR
author_rank: Unknown
timestamp: August 18, 2013, 10:03:45 am
content: Quote from: Crazy Ape on August 13, 2013, 06:19:02 pmWhy is that? I've been trying to learn more about RS-232 and I thought it had a fairly high min voltage?Typed using Hacker's Keyboard for Android

author: PA0PBZ
author_rank: Super Contributor
timestamp: August 18, 2013, 11:00:15 am
content: Quote from: MrAureliusR on August 18, 2013, 10:03:45 amThe answer is in the text on that page: "It derives the negative supply for the RS232 transmit data from the serial RS232 receive data line in a parasitic fashion.