Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. RS 485 very slow baud rates (100baud over half-duplex powerline) timing issues

RS 485 very slow baud rates (100baud over half-duplex powerline) timing issues

Scheduled Pinned Locked Moved Development
2 Posts 1 Posters 343 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cloolalang
    wrote on last edited by
    #1

    I am trying to see if I can use the KQ-330 Powerline serial modems for Mysensors.
    The modems have a 9600 8N1 TTL UART and the Powerline data rate is very much slower at 100 Baud.

    I am using mysensors RS485 and Arduino Uno's for both node and serial gateway to Home Assistant.

    So far I have managed to get the node and gateway talking however I think that because the powerline data rate is super slow compared with the 112500 Baud Home Assistant-to-Serial Gateway, and the 9600 Baud serial gateway-to-KQ330.
    I am seeing issues with collisions and TRX turn around timing during presentation and registration.

    As the link is so slow, I may actually just opt to use a master/slave approach with passive nodes in the end, for example a typical node-gateway heartbeat message takes about 4 seconds!

    I am looking at the possibility of using Aloha on the bus however as I really don't want to throw out presentation as it really helps with setting up on Home Assistant.

    So I am digging around the various transport timers and wondering how I can optimise it better for the super slow 100 baud link speed.

    My first question here is regarding the collision control in mytransportrs485.cpp; line 256

    while (_serialProcess()) {
    		unsigned char del;
    		del = rand() % 20;
    		for (i = 0; i < del; i++) {
    			delay(1);
    			_serialProcess();
    		}
    		timeout--;
    		if (timeout == 0) {
    			// Failed to transmit!!!
    			return false;
    		}
    	}
    

    Im I correct to say that the 1ms delay is based on 9600 baud and I might increase it to around 100ms for 100 baud?

    C 1 Reply Last reply
    0
    • C cloolalang

      I am trying to see if I can use the KQ-330 Powerline serial modems for Mysensors.
      The modems have a 9600 8N1 TTL UART and the Powerline data rate is very much slower at 100 Baud.

      I am using mysensors RS485 and Arduino Uno's for both node and serial gateway to Home Assistant.

      So far I have managed to get the node and gateway talking however I think that because the powerline data rate is super slow compared with the 112500 Baud Home Assistant-to-Serial Gateway, and the 9600 Baud serial gateway-to-KQ330.
      I am seeing issues with collisions and TRX turn around timing during presentation and registration.

      As the link is so slow, I may actually just opt to use a master/slave approach with passive nodes in the end, for example a typical node-gateway heartbeat message takes about 4 seconds!

      I am looking at the possibility of using Aloha on the bus however as I really don't want to throw out presentation as it really helps with setting up on Home Assistant.

      So I am digging around the various transport timers and wondering how I can optimise it better for the super slow 100 baud link speed.

      My first question here is regarding the collision control in mytransportrs485.cpp; line 256

      while (_serialProcess()) {
      		unsigned char del;
      		del = rand() % 20;
      		for (i = 0; i < del; i++) {
      			delay(1);
      			_serialProcess();
      		}
      		timeout--;
      		if (timeout == 0) {
      			// Failed to transmit!!!
      			return false;
      		}
      	}
      

      Im I correct to say that the 1ms delay is based on 9600 baud and I might increase it to around 100ms for 100 baud?

      C Offline
      C Offline
      cloolalang
      wrote on last edited by
      #2

      @cloolalang

      Other parameters not yet tested;

      1. sleep or wait between sketch information and presentation messages and/or in other functions
      2. MY_RS485_MAX_MESSAGE_LENGTH (40)
      3. #define MY_RS485_SOH_COUNT (3)
      4. MY_TRANSPORT_WAIT_READY_MS 0
      5. MY_TRANSPORT_STATE_TIMEOUT_MS 2*1000ul
      6. In mysensors core:
      // Wait configuration reply.
      	(void)wait(2000, C_INTERNAL, I_CONFIG);
      
      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      13

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular