0
\$\begingroup\$

I've designed a board with microcontroller (NXP, K64) to control i/o's. The uart port of the uC is connected to Maxim 3362 which converts the signal to RS485 half duplex communication. Using modbus protocol in the uController, the communication flows towards the connector on the right in the scheme, from there to an outside rs-485 to USB dongle (which connects to a master PC).

E:\Xilinx

I'm experiencing communication problems and using a differential probe and oscilloscope to sample the Rx and Tx lines of the differential rs485 communication (at the board output connector, pins 4 and 5 in the drawing) I've seen the following picture: message with noise

message with noise, zoom out

The picture shows a message sent from the PC to the uController, before the uCOntroller answered - and answered wrongly (with RTS high, as expected).

As you can see inside the message sent there are one's and zero's. The zero logic has a lot of oscillating noise on it and the one logic seems quiet.

Furthermore, before the message starts the zero seems okay. This seems a bit strange because if the ground had noise on it I would have suspected that zero logic inside the message and the zero logic before the message starts would have noise (also '1' would have noise, I guess) and not the zero logic inside the message alone...

Furthermore, I had one time during all my experiments which it did worked as expected (it was working ok for few days until now), see the following: enter image description here

As you can see in the second picture the '0' and the '1' seems okay and these pictures are from the same board.

is this a board problem, component problem?

I'm guessing it does not concern with the firmware... Any ideas?

\$\endgroup\$
8
  • \$\begingroup\$ Are you connecting the GND between the two parties? \$\endgroup\$
    – Eugene Sh.
    Apr 3, 2017 at 17:33
  • \$\begingroup\$ What do you mean by GND between 2 parties? \$\endgroup\$
    – roy.me
    Apr 3, 2017 at 17:48
  • \$\begingroup\$ It takes two to tango..err communication. Their ground has to be common. \$\endgroup\$
    – Eugene Sh.
    Apr 3, 2017 at 17:49
  • \$\begingroup\$ My system path is as follows: PC->USB dongle->RS485->connector on board. where is GND not connected here? \$\endgroup\$
    – roy.me
    Apr 3, 2017 at 17:50
  • \$\begingroup\$ in the RS485 part. \$\endgroup\$
    – Eugene Sh.
    Apr 3, 2017 at 17:51

2 Answers 2

1
\$\begingroup\$

It looks to me like you have lost the 0 volt connection between both systems. You can't do this with RS485 without using special isolated interfaces. I'm also a little concerned about the two series 165 ohm resistors on the data lines too.

\$\endgroup\$
4
  • \$\begingroup\$ Can you explain what do you mean? How can I loose the 0 volt? My system path is as follows: PC->USB dongle->RS485->connector on board, etc... \$\endgroup\$
    – roy.me
    Apr 3, 2017 at 17:50
  • \$\begingroup\$ Measure the 0 volts on one end relative to the 0 volts on the other using a scope and measure during a transmission. I'm not going to get drawn on the myriad ways possible to lose 0 volts so test it is my advice. \$\endgroup\$
    – Andy aka
    Apr 3, 2017 at 17:53
  • \$\begingroup\$ By referring to one end and the other end, you mean the board and gnd on the outside world? Also, few words regarding how would one lose the 0 volts would be nice... Thx for your help, anyway :0) \$\endgroup\$
    – roy.me
    Apr 3, 2017 at 17:56
  • \$\begingroup\$ Between maxim chip and dongle. \$\endgroup\$
    – Andy aka
    Apr 3, 2017 at 18:00
1
\$\begingroup\$

Sorry for the late reply, silly me, was using an active probe which caused all this mess. After changing to a regular mode, all working well.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.