Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Mayfly SCL and SDA voltage level

Home Forums Mayfly Data Logger Mayfly SCL and SDA voltage level

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #14291
      Anonymous

        Hi there. I have ordered a Mayfly board but I’m having some issues finding documentation on what voltage level the SCL and the SDA pins run at. I see on the hardware page for the 0.5 version that it runs at 3.3 volts, but the 2 2kohm resistors on the documentation are throwing me off a bit. Any help would be greatly appreciated!

      • #14292
        Shannon Hicks
        Moderator

          All of the data lines on the Mayfly run at 3.3 volts. The 2.2k resistors on the I2C lines are the pullup resistors that are required per the I2C design spec.

        • #14294
          Anonymous

            Awesome! Thank you for the quick response.

          • #14451
            ehazard
            Participant

              Hello. I’m currently trying to get a sensor working using I2c protocol, and I have a question about the 2.2 kohm resistors on the SDA and SCL lines. Are those resistances automatically enabled, or is there a line of code that would enable them? Otherwise, if the pull-up resistors are automatically enabled on the Mayfly, is there any way to disable those resistances? Any help would be greatly appreciated! Thank you in advance for your time!

            • #14454
              Matt Barney
              Participant

                I’m not an expert, but based on the Mayfly schematic (see pins 19 and 20 on the ATMega1284P, upper left), it looks like SDA and SCL are pulled high via external resistors on the board, so there is no way to disable them in code.

                Reading a tutorial at Adafruit, it looks like that is an inherent part of the design of the I2C protocol:

                The I2C clock and data lines need pull-up resistors to prevent from floating to random values. Since many different devices can share these lines the I2C protocol requires that each device ‘give up’ or stop driving the lines when not in use. If no device is driving the lines then the pull-up resistors ensure they go up to a high logic level instead of floating at random values.

                Matt

              • #14460
                Shannon Hicks
                Moderator

                  Matt is correct, the pullup resistors on the I2C bus on the Mayfly board are soldered to the board and can’t be disabled unless you want to unsolder them, which will cause issues if you try to use I2C devices on the Mayfly like the DS3231 clock or the ADS1115 aux A/D.

              Viewing 5 reply threads
              • You must be logged in to reply to this topic.