Skip to main content
Visitor II
March 1, 2021
Solved

Drop voltage SCL I2C

  • March 1, 2021
  • 5 replies
  • 2749 views

Hello,

I have a very strange behaviour with the I2C bus of a STM32G431.

I try to communicate with a MLX90393 of Melexis. I had some problems to get the measurements, after a Start measurement. The MLX90393 returned an error code. So I checked the signal with a signal analyzer.

The signal look like this:

0693W000007ZmIBQA0.png 

So the voltage of the SCL signal in white (digital measure at the top and analogue at the bottom) has a voltage drop to 1.6V at the end of the frame !

What is strange is that for other frames I've absolutely no problem. For example here I try to get the measurement from the sensor:

0693W000007ZmIVQA0.png 

The SCL signal is stable until the end.

SCL and SDA are pull up on my board with 10k resistors and the frequency is set at 100kHz.

I had previously used a STM32F334 on the 1st version of my board with all the same components (only the tracks are of cours a little bit different because the footprints of the F334 and the G431 are a little bit different) and I had absolutely no problems.

I am able to write and read memory of the MLX90393 without any problem. The problem only becomes apparent when I try to initiate a measurement on the sensor.. !

Did anyone have any idea what the problem is?

    This topic has been closed for replies.
    Best answer by alxrey

    It is solved. I had effectively a problem with the power supply of the sensor. The track was interrupted.

    I hadn't thought of this problem before because the sensor worked without power supply (only with the i2c voltage, and probably helped with decoupling capacitors) for low-energy command ! As soon as I asked to start a measurement, the current was no longer sufficient.

    Thank you for putting me on the answer's way ! :grinning_face:

    5 replies

    Graduate II
    March 1, 2021

    what if..... the sensor is exhausting its power supply when you command to take a measurement (demanding too much current)

    I would probe the MLXs sensor vcc line at the same time you send this command.

    alxreyAuthor
    Visitor II
    March 1, 2021

    What would cause the sensor to demand too much current? I tried to switch the sensors between the board with the STM32G334 and the G431 one. And the problem "stays" with the uC.

    Graduate II
    March 1, 2021

    i dont have any idea of the configuration of your board.

    But maybe the board with the STM32G431has a weaker voltage regulator? or youre using it more?

    alxreyAuthor
    Visitor II
    March 2, 2021

    The board is powered directly by a power supply with limit current set to 100 mA. In practice the circuit consumes only about 5 mA. There's no other other chips on the i2c bus and nothing that consumes some current.

    alxreyAuthorAnswer
    Visitor II
    March 2, 2021

    It is solved. I had effectively a problem with the power supply of the sensor. The track was interrupted.

    I hadn't thought of this problem before because the sensor worked without power supply (only with the i2c voltage, and probably helped with decoupling capacitors) for low-energy command ! As soon as I asked to start a measurement, the current was no longer sufficient.

    Thank you for putting me on the answer's way ! :grinning_face:

    Visitor II
    April 8, 2024

    Hi Alexrey,

    Would you like to share I2C code for MLX90393? I believe you were able to implement ML90393 interfacing.

     

     

    Thanks.