0
\$\begingroup\$

I'm currently trying to reverse engineer RS-485 signals, see waveforms below.

enter image description here

As you can see, Signal 1 (Yellow) and Signal 3 (Purple) are a differential pair and seem to be floating.

Here's a closeup of Signal 1's wavefrom:

enter image description here

I'm trying to use a MAX485 Arduino module which has the following schematic: enter image description here

Can anyone advise me as to whether this is possible with this module and, if so, what's needed?

If not possible, is there another IC I could use to achieve this floating signal?

I've recreated the circuit above with a MAX491EPD IC and removed any biasing/termination resistors. The issue is still there, see output below: enter image description here

I'm starting to think it's an Arduino code issue. Code below:

const int EnTxPin =  2;  // HIGH:Transmitter, LOW:Receiver

void setup() { Serial.begin(19200); Serial.setTimeout(100);
pinMode(EnTxPin, OUTPUT); digitalWrite(EnTxPin, HIGH); }

void loop() {
Serial.write(0x02); Serial.write(0x50); Serial.write(0x30); Serial.write(0x32); Serial.write(0x00); Serial.write(0x56); Serial.write(0x03); Serial.write(0x30); Serial.write(0x38); delay(57); Serial.write(0x02); Serial.write(0x50); Serial.write(0x30); Serial.write(0x32); Serial.write(0x00); Serial.write(0x57); Serial.write(0x03); Serial.write(0x30); Serial.write(0x39); delay(1); delay(10000); }

Am I missing something here?

\$\endgroup\$
3
  • \$\begingroup\$ "seem to be floating"??? why do you say this? \$\endgroup\$
    – Andy aka
    Commented Jun 28, 2021 at 11:34
  • \$\begingroup\$ @Andyaka I think because both signals do seem to float at roughly 2.5V when not transmitting anything? \$\endgroup\$
    – Justme
    Commented Jun 28, 2021 at 11:44
  • 1
    \$\begingroup\$ Well, I think the correct term is "biased" - if you look at the proposed circuit and assume a termination resistor is present then R5 and R6 will bias the A and B lines at mid-rail. But, this is for the OP to work out and whether the bias resistors on the proposed solution are adequate in value for the system he's trying to rev eng. \$\endgroup\$
    – Andy aka
    Commented Jun 28, 2021 at 11:50

3 Answers 3

1
\$\begingroup\$

According to the MAX485 datasheet, page 7, the driver unit outputs are high impedance (disabled and "disconnected") from A and B when DE is low. In that condition (DE=0) what remains on nodes A and B are the resistances R5, R6 and R7, from the schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

In the absence of anything else driving A or B high or low, those resistors form a potential divider which sets the potentials of nodes A and B near the midpoint of the supply, close to +2.5V. This is the same behavior as what you see in your 'scope plots of the system you are trying to replicate.

As others have pointed out, I wouldn't call this state "floating", because potentials are very deliberately defined by those resistors, which provide a relatively low impedance path (equivalent to about 10kΩ) to DC. A better word is "biased".

\$\endgroup\$
0
\$\begingroup\$

Yes that module can be used. RS-485 signals float when no driver is enabled. It can be set to receive only and passively listen to the communication, if the bus is already terminated then you might want to remove the 120 ohm termination resistor and maybe the bias pull-up and pull-down resistors.

\$\endgroup\$
9
  • \$\begingroup\$ Thanks for the reply! I'm actually using the MAX491EPD IC at the moment so I can alter the wiring. When you say "no driver is enabled" do you mean leaving DE or Driver Output Enable disconnected? Because if I do that, then no data transmits. \$\endgroup\$ Commented Jun 28, 2021 at 11:51
  • \$\begingroup\$ If you want to transmit and/or receive, control DE and/or RE respectively. \$\endgroup\$
    – Justme
    Commented Jun 28, 2021 at 12:21
  • \$\begingroup\$ one of DE and RE is usually an inverted input so you either want both high or both low, whichever makes the module produce the least volrage measured between A and B. \$\endgroup\$ Commented Jun 28, 2021 at 13:10
  • \$\begingroup\$ Still seeing issue. Could be a code issue, see above for details. \$\endgroup\$ Commented Jun 28, 2021 at 14:00
  • \$\begingroup\$ So what is the issue? You enable the transmitter forever so it never is disabled for reception or the bus to return to midpoint bias. \$\endgroup\$
    – Justme
    Commented Jun 28, 2021 at 14:05
0
\$\begingroup\$

you should remove the termination resistors from that module all the resistor right of the max485.

other than that yes, that module will work.

spoiler alert: if I'm reading that display correctly the baud rate appears to be about 9600

\$\endgroup\$
1
  • \$\begingroup\$ Thanks! I have done, see added details above in OP. The baud rate is 19200. \$\endgroup\$ Commented Jun 28, 2021 at 13:59

Your Answer

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

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