• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Disturbed communication on I2C bus

    Official EVOK API
    1
    4
    116
    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.
    • M
      mglowinski last edited by

      Hi,
      I would like to ask about problem related to I2C communication on UniPi 1.1.

      To be more precise, from time to time my application written in python crashes with the error OSError error: [Errno 121] Remote I/O, which indicates that the device is not connected to the I2C bus. It' not true, since for most of the time it's working just fine.

      I've noticed that UniPi is using I2C for controlling peripheral devices e.g relays.
      Might it be that I'm trying to get access to I2C bus from python application, while EVOK is executing some other command via I2C?

      1 Reply Last reply Reply Quote 0
      • M
        mglowinski last edited by

        Here is exact topology of I2C network:
        I2C network.png

        According to documentation:
        BH1750 has 10kΩ pull-up resistors (pinout or electrical scheme)
        ICM20948 has 10kΩ pull-up resistors (pinout or electrical scheme)
        LiDAR has internal 3kΩ (here is information), but documentation recommends to connect additional external 4.7kΩ (i did NOT connect that).

        I checked the impact of BH1750 sensors and I2C speed on the I2C bus communication quality.
        Here are results: https://we.tl/t-bBP0UiNtLZ

        I noticed that every time the LiDAR stops responding there is a small peak on the I2C data bus.
        Example disturbance 2 closer.png
        or
        Example disturbance.png

        Here is screen of successful read from LiDAR, noice and LiDAR does not ACK frame anymore:
        400kHz no BH1750 communication when LiDAR stop responding closer look.png

        This error occurs both with and without the BH1750 sensors connected. At lower speeds it occurs much less frequently, but it also occurs.

        1 Reply Last reply Reply Quote 0
        • M
          mglowinski last edited by

          I found the source of the problem, but I don't know how to solve it. The problem is caused by connecting an electrical device (resistor like a light bulb) to the circuit that supplies power to the UniPi. I tried to replace the power supply, but the same thing happens.

          Video:
          https://www.youtube.com/watch?v=p-k9daYUK58

          Do you have any tip how to solve that issue?

          1 Reply Last reply Reply Quote 0
          • M
            mglowinski last edited by mglowinski

            It is a problem related to power-supply.
            It was some voltage peaks while connecting anything to the same circuit as power-supply.
            I've a better one (Phoenix Contact) and it's working stable now.

            Topic closed.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post