M5STATION USB communication with computer while RS485 is in use - how to?

  • Hello,
    I'm using M5Station 485 as a Modbus RTU CLient, I'd also like to have USB communications to send debug messages to the Arduino IDE.
    Is it possible?

    Is I'm not reading the schematic "wrong" the USB port at the bottom is connected "in parallel" with the 485 interface so it's not available for communication while the 485 is in use, correct?

    What about the USB port "at the top" of it?


  • As far as I’m aware, the bottom usb is power only and the top port is data!

  • @ajb2k3 Bottom USB is wired in parallel with the RS485 port & is the one to be used for FW loading, TOP usb I'm trying to figure out how to talk over it!

  • Hello @Caterpillaraoz

    I am afraid the top USB Type-A port is for power only.

    From the M5Station documentation: USB Tpye-A power supply output only, no signal pins.


  • So you are telling me that there is NO way to use the RS485 and a computer serial communication at the same time?

  • Hello @Caterpillaraoz

    you could try something like this every time you want to log something:

      Serial.println("Hello World");
      ModbusRTUClient.begin(115200, SERIAL_8N1);

    Please note that all debug output you send this way will also be sent to the Modus RTU server. This could potentially lead to unwanted results, should the parser in the Modbus RTU server choke on it.
    In addition you'll see everything the Modbus RTU server is sending back in the log as well.

    As an alternative you could use a second serial connection for debug output through one of the Groove ports using a separate USB Serial converter. E.g. like this:

      Serial1.begin(115200, SERIAL_8N1, 16, 17);
      Serial1.println("Hello world");