Hi all - I'm trying to communicate with a solar panel charge controller via Modbus/RS485. I'm hooking up a common LCTech MAX485 serial adapter to my Uno. Transmitting seems to work fine, but I can't seem to make the module receive properly.
Here are my logic analyzer traces
(D0: Uno RX <-> MAX485 RO
D1: Uno TX <-> MAX485 DI
D2: RS485 A
D3: RS485 B
D4: MAX485 DE/RE)
Sending a Modbus request:
I'd expect there to be activity on the Uno RX pin when RS485 A and B are wiggling and DE/RE on the MAX485 is being pulled low. Does anyone know what am I doing wrong?
(I should mention I've already tried removing the 10k pullup resistors R1-R4 on the LCTech module)
Thanks
Alistair
My first bid is that, you transfer an uart based ascii chars with start-stop bits, but the answer seems not a valid byte series with start 0 and stop 1 bit for every byte.
Maybe that is an encoded value? But seems not a valid string.
Okay, second checking the pictures, there are start-stop bits, but it is more shorter.
What is the time scale? I have to ask the actual serial speed, and the required serial speed is the same?
Thanks.
As mentioned I'm sending Modbus data over serial and I'm getting what looks like a valid response back, so I don't think it's a problem with the request format
Did you try swapping A and B? The standard for polarity seems to be lacking. FWIW, I never bother with capturing A/B with the analyzer since there is little usable info due to its differential nature.
I know this may seem like a dumb question but have you verified that your wiring does in fact connect the pins DE and RE/ together? Or, asked another way, have you scoped the actual pin 2 on the MAX485 to confirm it is low when receiving?
I solved the problem by switching to a MAX1348 board.
Thanks
Alistair
I would have suggested to use two MAX485 boards hardwiring one to transmit and one to receive (leaving the opposite data line floating). Works great for debugging.
But since you got the MAX1348 analog-to-digital converter to work in its place, I guess you are all set.