Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Lopy with modbus

    Scheduled Pinned Locked Moved LoPy
    9 Posts 5 Posters 688 Views 5 Watching
    Loading More Posts
    • 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.
    • A Offline
      abhishek2101
      last edited by

      Which pins do I need to connect on the board to do modbus ?

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        abhishek2101 @abhishek2101
        last edited by

        can anybody help please ?

        1 Reply Last reply Reply Quote 0
        • E Offline
          Eric73
          last edited by

          Hi, in fact it's depends if you do modbus over tcp (so it's wifi and no pin) or modbus RTU using uart pin (and RS232/RS485 transceiver don't use directly your uart pin!) you have selected when you created your modbus object.
          According to source code this is an valid example.

          uart_id = 0x01
          modbus_obj = Serial(uart_id, pins=('P9', 'P10'))
          

          It's seem that pycom documentation lake information about the initialization of this object

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            abhishek2101 @Eric73
            last edited by

            @Eric73 I will be using Modbus RTU, can you suggest me a good RS485/RS232 transceiver ?

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              Eric73 @abhishek2101
              last edited by

              @abhishek2101 RS485 OR RS232 it depend of your sensor.
              MAX3232 or SN65HVD10 for exemple is good component.

              1 Reply Last reply Reply Quote 0
              • S Offline
                svonbentzel
                last edited by

                can I connect the modbus device directly to the Pycom Board.

                or did I need a additional modus RS485 adapter?

                E T 2 Replies Last reply Reply Quote 0
                • philwilkinsonP Offline
                  philwilkinson
                  last edited by

                  Have anyone had success with this modified modbus library?

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    Eric73 @svonbentzel
                    last edited by

                    @svonbentzel No, i dont know witch which pycom board your talking about, but ESP32 RX/YX pin are 3.3V TLL level, modus is RS422 or RS485 or RS232. RS422 and RS485 are very close electrical level (on a differential line), RS232 is +12V and -12V so you need an adapter and you must choise it to be on same physical level of the sensor you plan to use.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thibault @svonbentzel
                      last edited by thibault

                      @svonbentzel No, for me too. I have use this one for get modbus run fine:
                      github.com/pycom/pycom-modbus/tree/master/uModbus

                      1 Reply Last reply Reply Quote 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
                      • 1 / 1
                      • First post
                        Last post

                      Pycom on Twitter

                      Pycom