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. Announcements
  3. 💬 Building a wired RS485 sensor network

💬 Building a wired RS485 sensor network

Scheduled Pinned Locked Moved Announcements
164 Posts 33 Posters 47.2k Views 35 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.
  • wimdW wimd

    @Reza sory but I'm not able to help you with this.

    R Offline
    R Offline
    Reza
    wrote on last edited by
    #33

    @wimd
    thank you :pray:

    wimdW 1 Reply Last reply
    0
    • wimdW wimd

      @Reza sory but I'm not able to help you with this.

      R Offline
      R Offline
      Reza
      wrote on last edited by
      #34

      @wimd
      i have problem with nrf24. and this is work bad for me in distance 10 or 20 meter. i have problem in wireless connection. this protocol have not this problem ? connection is good ? with out any disconnect ?

      wimdW 1 Reply Last reply
      0
      • R Reza

        @wimd
        thank you :pray:

        wimdW Offline
        wimdW Offline
        wimd
        wrote on last edited by
        #35

        @Reza Check https://www.mysensors.org/build/raspberry. There is a comment for a serialgateway.

        R 1 Reply Last reply
        0
        • wimdW wimd

          @Reza Check https://www.mysensors.org/build/raspberry. There is a comment for a serialgateway.

          R Offline
          R Offline
          Reza
          wrote on last edited by
          #36

          @wimd
          i see this, but this is not for a arduino wiring. this is for a nrf24 . perhaps @marceloaqno can setup a rs485 gateway on raspberry. thank you

          wimdW 1 Reply Last reply
          0
          • R Reza

            @wimd
            i have problem with nrf24. and this is work bad for me in distance 10 or 20 meter. i have problem in wireless connection. this protocol have not this problem ? connection is good ? with out any disconnect ?

            wimdW Offline
            wimdW Offline
            wimd
            wrote on last edited by
            #37

            @Reza Struggling also with the radio network if the distance is more then 5m (and I'm using the ones with the antenna) I have troubles
            Add #define MY_RF24_PA_LEVEL RF24_PA_HIGH to send on maximum power.
            Added the capacitor give a bit extra power on the 3,3V?

            I do not have a RS485 network installed yet but trails on a 10m ethernet cable did not give any issues. Still in program phase.

            R 1 Reply Last reply
            0
            • R Reza

              @wimd
              i see this, but this is not for a arduino wiring. this is for a nrf24 . perhaps @marceloaqno can setup a rs485 gateway on raspberry. thank you

              wimdW Offline
              wimdW Offline
              wimd
              wrote on last edited by
              #38

              @Reza scroll down on the page down to the serial gateway chapter on that page.

              1 Reply Last reply
              0
              • wimdW wimd

                @Reza Struggling also with the radio network if the distance is more then 5m (and I'm using the ones with the antenna) I have troubles
                Add #define MY_RF24_PA_LEVEL RF24_PA_HIGH to send on maximum power.
                Added the capacitor give a bit extra power on the 3,3V?

                I do not have a RS485 network installed yet but trails on a 10m ethernet cable did not give any issues. Still in program phase.

                R Offline
                R Offline
                Reza
                wrote on last edited by
                #39

                @wimd
                i use capacitor 4.7 , 100 , 470 uf.
                i use 3 type of radio. (usual + 2chip + 2chip+pa+lna)
                i use radio adapter. i use regolator 5 to 3.3 module.
                but i have problem yet.
                i dont test #define MY_RF24_PA_LEVEL RF24_PA_HIGH !
                what is code ? and where i can add this ? for gateway or nodes?
                this code can solve my problem ? in other means this code can increase power of radio ?

                wimdW 1 Reply Last reply
                0
                • R Reza

                  @wimd
                  i use capacitor 4.7 , 100 , 470 uf.
                  i use 3 type of radio. (usual + 2chip + 2chip+pa+lna)
                  i use radio adapter. i use regolator 5 to 3.3 module.
                  but i have problem yet.
                  i dont test #define MY_RF24_PA_LEVEL RF24_PA_HIGH !
                  what is code ? and where i can add this ? for gateway or nodes?
                  this code can solve my problem ? in other means this code can increase power of radio ?

                  wimdW Offline
                  wimdW Offline
                  wimd
                  wrote on last edited by
                  #40

                  @Reza yes adding this code increases the power of the radio.
                  you add this code at the begin of your sketch (both gateway and nodes)

                  #define MY_RADIO_NRF24
                  
                  #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                  
                  R 2 Replies Last reply
                  0
                  • wimdW wimd

                    @Reza yes adding this code increases the power of the radio.
                    you add this code at the begin of your sketch (both gateway and nodes)

                    #define MY_RADIO_NRF24
                    
                    #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                    
                    R Offline
                    R Offline
                    Reza
                    wrote on last edited by
                    #41

                    @wimd
                    thank you very much , i test this and i hope this is answer for me. because i am tired really :(
                    thank you my friend:pray:

                    1 Reply Last reply
                    0
                    • wimdW wimd

                      @Reza yes adding this code increases the power of the radio.
                      you add this code at the begin of your sketch (both gateway and nodes)

                      #define MY_RADIO_NRF24
                      
                      #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                      
                      R Offline
                      R Offline
                      Reza
                      wrote on last edited by
                      #42

                      @wimd
                      i test with "PA_HIGH" and "PA_MAX" (for nodes and gateway) but this is more bad.
                      (for example for 10-15 meter with 2 wall)
                      in default PA for 10 command i have 2 error
                      in PA_HIGH for 10 command i have 8 error
                      in PA_MAX my connection is disconnect completly
                      can you understand where is problem? i think this is related to power supply of radio (because when i want more power for more distance so radio can not have a good connection) but i providing enough power for radio. i use a adapter 5v 2A and connect this to a radio adapter(reglator 5 to 3.3) even use a 4.7u capacitor for radio. similar to photo:
                      0_1484474385522_photo_2017-01-15_13-28-34.jpg

                      wimdW 2 Replies Last reply
                      0
                      • R Reza

                        @wimd
                        i test with "PA_HIGH" and "PA_MAX" (for nodes and gateway) but this is more bad.
                        (for example for 10-15 meter with 2 wall)
                        in default PA for 10 command i have 2 error
                        in PA_HIGH for 10 command i have 8 error
                        in PA_MAX my connection is disconnect completly
                        can you understand where is problem? i think this is related to power supply of radio (because when i want more power for more distance so radio can not have a good connection) but i providing enough power for radio. i use a adapter 5v 2A and connect this to a radio adapter(reglator 5 to 3.3) even use a 4.7u capacitor for radio. similar to photo:
                        0_1484474385522_photo_2017-01-15_13-28-34.jpg

                        wimdW Offline
                        wimdW Offline
                        wimd
                        wrote on last edited by
                        #43

                        @Reza You have exactly the same problem as I had when I first found MySensors in march last year.
                        I got a couple of radio and started to play with them. All worked fine as long as they were not more than 5m away from each other. I dropped the idea at that time.

                        2 months ago I saw the possibility on the website to build a wired network. I started again. With the order for the RS485 bricks I ordered also some radios but now with antenna and amplifier. The only improvement I got was now up to 7m.
                        I managed now to connect with my greenhouse that is 12m away but had to place a repeater in between but the connection is no reliable.

                        The discussion that is now ongoing is not related anymore to a RS485 network. I suggest you start an new topic specific for your radio issue. Or we both did do something wrong or the hardware that we buy does not meet the specification for transmitting distance.

                        Let me now if you started a new topic.

                        R 1 Reply Last reply
                        1
                        • R Reza

                          @wimd
                          i test with "PA_HIGH" and "PA_MAX" (for nodes and gateway) but this is more bad.
                          (for example for 10-15 meter with 2 wall)
                          in default PA for 10 command i have 2 error
                          in PA_HIGH for 10 command i have 8 error
                          in PA_MAX my connection is disconnect completly
                          can you understand where is problem? i think this is related to power supply of radio (because when i want more power for more distance so radio can not have a good connection) but i providing enough power for radio. i use a adapter 5v 2A and connect this to a radio adapter(reglator 5 to 3.3) even use a 4.7u capacitor for radio. similar to photo:
                          0_1484474385522_photo_2017-01-15_13-28-34.jpg

                          wimdW Offline
                          wimdW Offline
                          wimd
                          wrote on last edited by
                          #44

                          @Reza maybe read all on this one : https://forum.mysensors.org/topic/1142/nrf24l01-pa-lna/35

                          1 Reply Last reply
                          1
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #45

                            What are the main advantages of rs485 over I2C bus?

                            K 1 Reply Last reply
                            0
                            • gohanG gohan

                              What are the main advantages of rs485 over I2C bus?

                              K Offline
                              K Offline
                              kimot
                              wrote on last edited by
                              #46

                              @gohan
                              I2C bus is designed for short distances, obviously between circuits on one PCB.
                              Max allowed capacitance i2c bus is 400pF. CAT5 cable has nominal 52pf/m.
                              Ideally you can communicate to distance 8m.
                              It is very short bus for home network, I think.
                              Or we need some "hacking" for i2c bus, for example at page 4 in this document:

                              http://www.nxp.com/documents/application_note/AN460.pdf

                              For each node we need one bus expander ( P82B96 ) and two CAN bus drivers ( PCA82C250 ).
                              7 + 2*0.5 US$ ( ebay )
                              Plus second pair of wires.
                              Or buy this: http://mayhewlabs.com/products/i2c-power-extender
                              You can read bus length, number of nodes and speed limit, there.

                              But, interesting idea.
                              With some smart "node addressing" and multi-master i2c bus I can imagine, that on some places you do not need processor.
                              For actuator simply use PCF8574 for example.

                              1 Reply Last reply
                              0
                              • gohanG Offline
                                gohanG Offline
                                gohan
                                Mod
                                wrote on last edited by
                                #47

                                So basically for 10-15 meters distance it's better and cheaper to use cheap rs485 modules, right?

                                K 1 Reply Last reply
                                0
                                • gohanG gohan

                                  So basically for 10-15 meters distance it's better and cheaper to use cheap rs485 modules, right?

                                  K Offline
                                  K Offline
                                  kimot
                                  wrote on last edited by
                                  #48

                                  @gohan
                                  Yes

                                  1 Reply Last reply
                                  1
                                  • wimdW wimd

                                    @Reza You have exactly the same problem as I had when I first found MySensors in march last year.
                                    I got a couple of radio and started to play with them. All worked fine as long as they were not more than 5m away from each other. I dropped the idea at that time.

                                    2 months ago I saw the possibility on the website to build a wired network. I started again. With the order for the RS485 bricks I ordered also some radios but now with antenna and amplifier. The only improvement I got was now up to 7m.
                                    I managed now to connect with my greenhouse that is 12m away but had to place a repeater in between but the connection is no reliable.

                                    The discussion that is now ongoing is not related anymore to a RS485 network. I suggest you start an new topic specific for your radio issue. Or we both did do something wrong or the hardware that we buy does not meet the specification for transmitting distance.

                                    Let me now if you started a new topic.

                                    R Offline
                                    R Offline
                                    Reza
                                    wrote on last edited by
                                    #49

                                    @wimd thank you friend . i started several topic about this issue , but dont found any answer so i delete all topics. also i dont start new topic because friends are sad for my topics and admin told me dont start any topic :(
                                    i have exactly this problem. now for 10 meter i must use a repeater ! for 10 meter ! ! ! ! this is strange ! i use 4.7u capacitor and more. i use radio adaptor. i use reglator module. use 3 type of radio . in sketch use PA_MAX and PA_HIGH ... but effectless. so you told me if i want change my network to wiring with RS485 , i will have same problem again ? i can not found any way for this problem .
                                    now please let me for read this topic perhaps i can found any way for this problem . thank you

                                    wimdW 1 Reply Last reply
                                    0
                                    • R Reza

                                      @wimd thank you friend . i started several topic about this issue , but dont found any answer so i delete all topics. also i dont start new topic because friends are sad for my topics and admin told me dont start any topic :(
                                      i have exactly this problem. now for 10 meter i must use a repeater ! for 10 meter ! ! ! ! this is strange ! i use 4.7u capacitor and more. i use radio adaptor. i use reglator module. use 3 type of radio . in sketch use PA_MAX and PA_HIGH ... but effectless. so you told me if i want change my network to wiring with RS485 , i will have same problem again ? i can not found any way for this problem .
                                      now please let me for read this topic perhaps i can found any way for this problem . thank you

                                      wimdW Offline
                                      wimdW Offline
                                      wimd
                                      wrote on last edited by
                                      #50

                                      @Reza I have written earlier that I didn’t have any problem with RS485 on a cable of 10m but did not trail longer yet.
                                      If you make trails with the wired network, make sure that you define your node id number

                                      #define MY_NODE_ID <X>```
                                      1 Reply Last reply
                                      1
                                      • wimdW Offline
                                        wimdW Offline
                                        wimd
                                        wrote on last edited by
                                        #51

                                        @hek I was wondering if it could be useful to have an extra sensor that a bridge between the wireless and wire network.
                                        This bridge is made between the SPI dealing with the wireless network and the hardware serial that is dealing with the wire network.
                                        It would allow you to connect a remote wired network.

                                        IF the CE pin for the radio (9) could be user defined, a 2nd thought (based on the bridge idea).
                                        Can’t something similar be done for the serial gateway and make that one suitable for wired and wireless network in the same gateway?

                                        1 Reply Last reply
                                        0
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #52

                                          Cable will always be better that wireless, so if you can go with cable. I tried NRF24 but with those smd modules I can't get more than 6-7 meters. I have to try to add a longer antenna

                                          B 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          25

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          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