Electronics > Projects, Designs, and Technical Stuff

Debugging a RS485 connection

(1/3) > >>

I just cannot get this darn RS485 connection to work.

I have a YL620A VFD that speaks modbus and I am trying to read/write some parameters.
It's been a while but this was working on the bench. It no longer works in place.

I have factory reset the unit. Then set the baud rate to 9600 with 8N1.

I wasn't totally sure if the GND connection is needed but connected it as well.

The cable is shielded and connected to the housing.
That said - it used to work fine even without.
At least without the VFD running the motor.

Now it's a bit unclear which direction to connect A+B.

In one direction the RX LED is constantly on.
I am getting timeouts when reading.

In the other direction the TX LED is showing the requests being sent but it seems nothing gets received.
I am getting protocol corruption errors instead.
I suspect that's the correct wiring.

Unfortunately I don't have my oscilloscope at hand.

Any pointers or suggestions on how you would debug this?

Random things to try:

* Yes, you need the GND wire
* You need termination at both ends.
* You may also need biasing (misleadingly called fail-safe biasing in literature, but has nothing to do with failing safely, is required for normal operation) somewhere on the bus. Look it up!
* A/B nomenclature is messed up, different manufacturers follow different labeling. The only way is try swapping A/B until it works. Even if it's only two possibilities, the combination state space with everything else is large.
* Try different baudrates,
* number of stop bits,
* parity (no, even, odd)

full duplex or half duplex ?

Termination on both ends - even on short (as in 30cm) cables?
Maybe the VFD and the adapter already have termination built-in 🤔

Wouldn't I also need VCC for a bias network? I only have A, B and GND.

The RS485 to USB adapter is just wired 1:1.
It's just A, B and GND and should be half duplex.



--- Quote from: tcurdt on May 27, 2023, 11:23:44 pm ---Termination on both ends - even on short (as in 30cm) cables?

--- End quote ---
Not needed, but adviseable to have at least one terminator
RS485 is always half duplex, RS422 is full duplex - the diagram above implies that it has options for either. may also need a config/dipswitch setting to ell it which is in use

--- Quote ---Wouldn't I also need VCC for a bias network? I only have A, B and GND.

--- End quote ---
Yes, but only at one place. You shouldn't normally need it as the transceivers  will usually go to an idle state on an undriven bus.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod