Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Audio Board I2C Voltage Shift?

  1. #1
    Senior Member
    Join Date
    Dec 2015
    Posts
    125

    Audio Board I2C Voltage Shift?

    Hi all,

    I have a small test setup with a Teensy 3.2, and audio board, and an HT16K33 based LED matrix. Everything is connected via I2C, and it works great. I just realized that the matrix is powered off of 5V, which should mean that it's putting 5V down SDA when I read back info from the chip.

    As I said, everything currently works fine. Should I be concerned about that 5V? The Teensy should be fine, but the datasheet on the SGTL5000 says I'm out of spec.

    Thank you!

  2. #2
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    As I2C is an open drain bus, it will float up to whichever supply the pullup resistors are attached to.

    As Paul provides pullups on the Audio Board, attached to the 3.3V rail, you should be OK.

    Just check the specs on the LED matrix to make sure the Vlogic (low) and (high) levels are going to be OK pulled up to 3.3v instead of 5v. Generally they're something like 0.3v and 0.7v, which would be fine.

  3. #3
    Senior Member
    Join Date
    Dec 2015
    Posts
    125
    Ah of course, I wasn't thinking of that. Thank you for the reminder!

    I've been testing with one of the Adafruit Mini 0.8" matricies (https://www.adafruit.com/product/870). This board has pullups to 5V. Again, seems to work right now, but I'm designing my own board. I should only have one set of pullups, correct?

    Thank you!

  4. #4
    Senior Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    161
    Yes, one set of pullups for each I2C bus.

    The best value depends on the I2C frequency, rail voltage and the bus capacitance (related to the wire length).

    As a rule of thumb for 400kHz operation, 2mA is about right for the source current, so 1.5K for 3.3v and 2.2k for 5v rails. At 100kHz you can often get away with three times these values, if the wires are not too long. 1MHz operation should not be attempted on breadboards!

    If you want the basic details of good I2C loading Analog Devices' app note is a good reference.

    If you're using the Audio Shield, then make sure you're not overloading the bus with multiple pullups. The standard says that the max design current is 3 or 4mA, depending on the variant, but at least 5mA will generally be OK as many I2C chips and the Teensys will pull down in excess of 10mA.

    Hope this all helps.

  5. #5
    Senior Member
    Join Date
    Dec 2015
    Posts
    125
    Ok, thank you for confirming my understanding.

    Interestingly, the Adafruit module uses 10K pullups. I'll stick with 2.2K, it's what Paul uses on the audio board. Thank you for the app note, I'll do some deeper reading into this at some point.

    Speed on this is fairly low, so I'm hoping I will be within spec. My test bits wired together with some random wire are working wonderfully at the moment.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •