RS485 SN65HVD72  Pushing Vcc to to 5V - Page 1
Forum section: electronics / projects

author: jwhitmore
author_rank: Regular Contributor
timestamp: February 02, 2016, 05:03:04 pm
content: Been on before about this chip and RS485, I've now got father down the road but still not out of the woods. I'm trying to talk to an RS485 based Modbus sensor but not getting anything out of it. I've got two test sets and have been able to get RS485 comms between the two using the SN65HVD72 chips. However when I plug the actual sensor that I'm trying to talk to I get nothing out of it. I'm using a 3v3 microcontroller with the SN65 powered by 3v3. There is however a 5V rail on the board and decided, after checking the datasheet that I'd push the power to the SN65 up to the 5V to see if that would change the results.The results are that when powered from the 5V rail there's no output from the chip. The data sheet states that it's good to 5.5V so I'm not sure why there is no output.Perhaps the problem is actually the sensor which is dead but I've no way of testing it. However I'm just trying to get an output from my SN65 @ 5v. I can't find any spec for the sensor in terms of what peak to peak it expects from the 485 so in the dark a bit.

author: ajb
author_rank: Super Contributor
timestamp: February 02, 2016, 05:42:08 pm
content: So you're interfacing a 3v3 micro with a transceiver running at 5V? Check the logic level thresholds for the transceiver, my guess is that 3.3V isn't above the minimum logic high input voltage. Also, you did make sure to interface the 5V receive output of the transceiver to the 3.3V input of the MCU properly, right?

author: mubes
author_rank: Regular Contributor
timestamp: February 03, 2016, 12:01:25 am
content: Can you let us know what the scope channels are connected to, cos that looks like output to me?? I think I'm not understanding something. If the yellow trace is DIR then you're not going to hear anything while you're still transmitting of course....Dave

author: mubes
author_rank: Regular Contributor
timestamp: February 03, 2016, 09:32:06 am
content: OK, So to answer my own question;Yellow(1): RE/~DE to RS485 transceiver ( pins 2&3 )Cyan(2): Data TX from CPU ( pin 4 )Magenta & Blue (3&4): Complementary line drive ( pins 7&8 )...so, wassup? Its driving the line with the data you give it. You won't hear anything on Data In (pin 1) until you switch the transceiver into receive mode, assuming you're running 'normal' 2-wire RS485....you're still driving the bus.From the datasheet the '72 will take anything over 2V as logic 1, 0.8V max for logic 0, so you're OK with that, but the max reccomended Vs is 3.8V, so back off with that 5V (its only in the Absolute Max ratings section!!). I'll assume your CPU has 5V tolerant I/O :-) Line drive is Vcc-0.3V, and that's what you've got on 3&4, ish, so don't see an issue there either. Spec for RS485 is a receiver sensitivity of +/- 200mV so you're well within range.DAVE

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 03, 2016, 10:12:39 am
content: Looks like you don't have line biasing to weakly pull the lines to their idle state, which may be an issue for some receivers.A 485 receiver will have fairly low input thresholds to cope with long terminated lines, so 3v3 drive shouldn't be a problem.

author: jwhitmore
author_rank: Regular Contributor
timestamp: February 03, 2016, 10:34:22 pm
content: Sorry different time zones. On the image I sent yes you got the right interpretation on what was what. The most interesting comment is from mikeselectricstuff on line biasing to pull up lines to their idle state. This is news to me so that could well be my problem. I'm cutting my teeth on this RS485 and I may well have missed the little stuff. There is a picture in the wikipedia article which has 680R pull up and pull down. That might just be the key to all this and might get me working with sensor I'm trying to talk to.https://en.wikipedia.org/wiki/RS-485Thanks a million for that help I'll let you know how that goes.I had thought that maybe I wasn't getting enough of a differential signal so tried to push the supply to 5v. That data sheet states:Min MaxSupply Voltage, V CC –0.5 5.5Vih High-level input voltage (Driver, driver enable, and receiver enable inputs) 2 VccVil Low-level input voltage (Driver, driver enable, and receiver enable inputs) 0 0.8But when I did that I got no output hopefully it's the pull up and pull down.

author: mubes
author_rank: Regular Contributor
timestamp: February 04, 2016, 12:46:28 am
content: Hi,Although those pull resistors will certainly do some good you really do need to look at the DIR too...if you're driving the line you can't really expect to be seeing anything returned from the other end!(I'm on my phone now but as far as I remember from the spec sheet the 5.5v was an absolute max rating, not a recommended use one).Dave

author: jwhitmore
author_rank: Regular Contributor
timestamp: February 04, 2016, 10:17:32 am
content: Thanks for all your help here. I'm back to 3v3 on Vcc and signals are all there, getting an output from the chip. I've put in pull up and pull down resistors (pull up on pin 6 - A and pull down on pin 7 - B )I assume by DIR you mean Direction? I'll attach an image the bottom two blue lines, (light and dark) are the RE and DE chip selects. They are both the same and go high only when I want to transmit.Still no response from me sensor :-(

author: mubes
author_rank: Regular Contributor
timestamp: February 05, 2016, 12:59:10 am
content: Hmm, those signals look reasonable to me....i assume you've tried swapping the a/b legs over and verified speed, data format, bit order etc? One thing you could try is throwing random data at it to see if you can get it to twitch.Is there something else you can talk to the sensor with so you can check its operation and data format etc?Dave

author: jwhitmore
author_rank: Regular Contributor
timestamp: February 12, 2016, 11:13:25 am
content: Me again! Bet you thought you were rid of me. Sorry but I have gathered more information by getting a hold of a system that actually does work. I'll attach two traces, good and bad. In the case of the Good trace the idle of both A and B of the RS485 is 1.1 Volts. So both blue and pink of good trace float back to a common value. My bad trace the two idle back to 880mV and 3.2V!!!I've obviously made a big mistake with the termination of my line. I should maybe re-layout the circuit with a TVS termination chip. My Pull up and Pull down resistors are obviously totally wrong and I should remove them.

author: mubes
author_rank: Regular Contributor
timestamp: February 13, 2016, 08:32:12 am
content: Don't do anything too drastic yet :-)Remove all the termination stuff you've got at the moment and see what happens. Normally I would expect about 120r between the A and B legs....can you post your current circuit diagram?...hand drawn or whatever is fine.RS485 deals with all sorts of abuse in the field and its normally pretty easy going in a lab environment, so it'll be interesting to see what's going on here.(btw, looking at the curves on the working case, there don't seem to be any pulling resistors there).Dave

author: jwhitmore
author_rank: Regular Contributor
timestamp: February 15, 2016, 02:27:11 pm
content: OK stripped me termination back to a single 120R Resistor between RS485 A & B. I'll attach a picture of my circuit which is very basic and doesn't include the termination resistor as I just soldered a through hole resistor into the connector.Having stripped the termination back the difference between Good and Bad wave forms are just the Peak to Peak and the Idle voltages. Starting to suspect that the RS485 Chip I'm using might be a dead horse at this stage and time to stop flogging it.In that circuit diagram on the 7 pin connector the pins are1 - Gnd2 - 3v33 - 5V4 - Rx5 - Tx6 - /Rx Chip Select7 - Tx Chip Select

author: mubes
author_rank: Regular Contributor
timestamp: February 15, 2016, 11:55:53 pm
content: The signal levels and speed look fine, but a couple of observations - the /Rx-Tx are deliberately inverted so you can just drive them with one signal to make life a little easier, but I don't think that is having an impact here.The second, more important, thing is that your idle line is tending to a DC voltage that does not make sense to me....one side is remaining loaded even though it should be in receive mode...if you remove the transceiver it should drift to mid-V as in the first case (assuming there are pulling resistors on the far end). Have you tried replacing the transceiver with a new one? After that I'm afraid it needs someone with more expertise than me to tell you what's going on...RegardsDAVE