Rs485 receiving but not sending

hello
on my rs485 OPTA i can only receive data (using the ArduinoRS485 library examples 'receiver' and 'sender'). I can read RS485 from OPTA when sending through a USB to RS485 converter but cannot send form the OPTA.

If I try the same example programs and same wring with an UNO with a MAX485 I can send and receive at will. Furthermore, When using the UNO and MAX485 setup I can communicate with an inverter and 2 irradiance sensors to get the data I'm after (using ModbusMaster library). none of the Arduino Modbus library examples (kitchen sink......) work either. Oscilloscope measures draw a blank when sending from OPTA.

the Question(s) is this: is my OPTA broken? feels like i'm not outputting at all - Anyone else got this issue?

It appears the left is not in sync with the right. Post a schematic as to how it is wired, also clear picture(s) showing how it is put together. Post links to technical information on the hardware items such as the RS485 converter (I have 5 different styles called RS485 converter) Sorry my eyes do not see well enough to view what you have..

How do you switch between sending and receiving?

DrDiettrich

using the arduinoRS485 library there are 2 examples; sender and receiver. I simply upload the corresponding program to test the tx and rx to and from my PC. PC has a usb to Rs485 converter (waveshare) and 'accessport137' (a serial comms monitor/debug program) to either send or receive data.

the converter has 3 LED's power, Tx and Rx - when sending to the OPTA i get Tx LED flashing but when sending from the OPTA i get no Rx LED action, plus no data transmitted.

In both send and receive mode there is no hardware change (wiring is the same A->A, B->B and Gnd->Gnd).

I hope that expands on the problem for you

Martyn

Of course there is a hardware change, in the direction control pins.

gilshultz

thanks for the response - i will attempt answer your points as best as possible!

the RS485 converter i use to talk to the arduino UNO is this this https://www.amazon.co.uk/DSD-TECH-SH-U12-MAX13487-Raspberry/dp/B07B667STP - an amazon buy using the MAX13487 chip, i cannot find any specs unfortunately.

The USB RS485 converter is this one - https://www.waveshare.com/usb-to-rs485.htm but this is for monitoring/debugging of the signals.

monitoring/debug for serial comms is 'accessport137' - SUDT AccessPort Debugger for RS232/422/485 Serial Port

as a new forum user i cannot attach anything but i have uploaded a screenshot which i cannot see - this the OPTA based schematic which will receive but not send

again another screenshot - i hope it can be seen - this the arduino UNO based setup which receives and sends (although it does loose data so is better at sending one character at a time)

no photos as this is for work and there is some sensitive info apparently - not my decision sorry

I have not shown the full inverter and irradiance sensor setup yet as this is a distraction from the OPTA sending issue - and i can get it to work on the arduino UNO setup.

will try to get photos when image is suitable

thanks

martyn

DrDiettrich

OK - i have read as much as i think i can read on the OPTA but hardware control pins are not mentioned (may have missed it) - there are none on the usb converter or on the arduino setup.

I originally said the 'max485 setup' which is, i now realise, incorrect. The chipset is actually MAX13487 (hard to read off the chip) and board i'm using has no 'Enable pins' just 'TXD' and 'RXD'. apologies for poor info.

sorry to make an assumption, were you thinking that the OPTA is sending but the rest of the setup is not prepped to receive signals? This is slightly untestable with my equipment (no second OPTA to work with), although i have used the arduino UNO setup to get signals back and forth to a PC and also sending requests to sensors and receiving responses from them. I have responded to another statement on this thread with some schematics which may be more useful.

thanks for your help

Martyn

Then find an Arduino library for such a board.
Also find out the use of the 'G' pins.

1 Like

thanks.

G pins are ground - that board is not the problem as i can send and receive with ease if there is no OPTA involved.

back to the OPTA - testing with an oscilloscope shows my source outputting a modbus-like signal. As soon as i connect that wire to the OPTA interesting things happen... if the OPTA (in slave mode) is powered using 12-24 v with no USB connection the signal continues although nothing happens (just trying to switch a relay on/off). As soon as USB is connected signal stops, even if usb is not doing anything.

when the OPTA is a master no signal can be seen from RS485 port with or without usb.

I understand that with modbus slave/master PC based simulators and the usb-rs485 converters can deliver odd signals which can cause timeouts etc... but i cannot seem to get any rs485/modbus signal from the OPTA under any circumstance. have i set something somewhere that is preventing rs485 output? is the ethernet or usb using a serial line that prevents comms?

tempted to bin the thing and use what does work

not a solution per se.....

I have received a new OPTA and that one has the RS485 working straight out of the box. The Arduino Support team has suggested it was a hardware problem with the OTA that started this thread.

My advice:
put an oscilloscope across you A and B terminals on the RS485 and load the ArduinoRS485 library example called 'Sender'. You should see a response on your scope (you can also use a usb-rs485 converter to monitor the OPTA output) - if you get nothing it would be worth getting in touch with Arduino Support and/or the reseller you got it from (if you didn't buy it from Arduino direct).

do be careful with damaging the casing when using the screw terminals - i used the wrong size of screwdriver and damaged the case while trying to diagnose the problem.... i'm guessing the reseller will just say 'no' to a return but i will keep the OPTA for other things - not RS485 though.