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 and custom PCB with L76-L GPS module

    Scheduled Pinned Locked Moved LoPy
    lopygpsquecteli2ci2c bus error
    11 Posts 3 Posters 2.4k Views 3 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.
    • B Offline
      bobie
      last edited by

      We're trying to implement custom PCB with the same module as used in PyTrack - Quectel L76-L.
      This question might be a bit off topic but is it necessary to use level shifter to talk to this GPS module through I2C bus ?
      We perform i2c.scan() and getting no response from connected and powered module while UART interface works perfectly.

      Are LoPy I2C bus levels compatible with L76-L ?

      sebS 1 Reply Last reply Reply Quote 0
      • sebS Offline
        seb @bobie
        last edited by

        @bobie

        Is the device a 5v or 3.3v device? If it is 5v you will need to use a level shifter. Do you have pull up resistors for the SDA and SCL lines?

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          bobie
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • B Offline
            bobie @seb
            last edited by

            @seb We use LoPy4 so "device" is 3.3V I believe. Quectel says:
            ...

            • I2C_SDA/I2C_SCL is pulled up to 2.8V inside L76-L module. There is no need to add a pull-up resistor externally.
            • The voltage threshold of I2C is 2.8V. If the system voltage is not consistent with it, a level shifter circuit must be used.

            Quectel I2C voltage characteristics:
            VILmin=-0.3V
            VILmax=0.7V
            VIHmin=2.1V
            VIHmax= 3.1V
            VOLmax=0.42V
            VOHmin=2.4V
            VOHnom=2.8V

            sebS 1 Reply Last reply Reply Quote 0
            • sebS Offline
              seb @bobie
              last edited by

              @bobie

              Out modules output 3.3v which is above the maximum 3.1V specified there, to be safe I would include level shifters. Simple bi-directional level shifters can be made like so:

              0_1519657652355_1366896b-6981-4748-b469-be068e05c5cb-image.png http://husstechlabs.com/wp-content/uploads/2010/09/Level-shifter.jpg

              B 1 Reply Last reply Reply Quote 0
              • B Offline
                bobie @seb
                last edited by

                @seb OK, will try to use level shifter. Do Pycom use level shifter on its PyTrack module ?

                1 Reply Last reply Reply Quote 0
                • sebS Offline
                  seb
                  last edited by

                  I just checked the Pytrack schematic and we use the i2c interface to the module and actually don't have level shifters, that must mean it works ok.

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    bobie @seb
                    last edited by bobie

                    @seb We connected our Quectel L76-L pins:

                    L76-L .................. LoPy
                    GND------------------------ GND
                    VccInput ----------------- 3.3V VccOut
                    SDA ------------------------ P9
                    SCL ------------------------ P10

                    Then we initiated:
                    i2c = I2C(0, I2C.MASTER)
                    i2c.init(I2C.MASTER)
                    i2c.scan()

                    On our L76-L i2c.scan() produces empty array and multiple execution produces sometimes random adresses.

                    When we connected PyTrack PCB using only those 4 pins the L76-L from PyTrack gives proper response to i2c.scan()

                    What I did wrong ;-( ?

                    robert-hhR sebS 2 Replies Last reply Reply Quote 0
                    • robert-hhR Offline
                      robert-hh @bobie
                      last edited by

                      @bobie It still looks like wrong signals. If you can do so, hook up an oscilloscope and check the signal quality.

                      1 Reply Last reply Reply Quote 0
                      • sebS Offline
                        seb @bobie
                        last edited by

                        @bobie

                        Do you have pullup resistors on the SDA and SCL lines? You will need to connect a 10k resistor between those lines and 3.3V. It's also worth noting that on the Pytrack the I2C is sda='P22', scl='P21'.

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          bobie @seb
                          last edited by

                          @seb No luck with pull up resistors. There is also garbage when connected on P22/P21.
                          PyTrack connected to the same pins with the same settings goes smooth.
                          While connecting our L76-L there is no response on I2C ;-( only garbage response for i2c.scan().

                          Maybe you reconfigure L76-L chip through UART after mounting ?

                          Will try to connect oscilloscope and/or logic analyzer

                          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