cancel
Showing results for 
Search instead for 
Did you mean: 

Drop voltage SCL I2C

alxrey
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
alxrey
Associate II

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 ! 😀

View solution in original post

6 REPLIES 6
Javier1
Principal

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.

we dont need to firmware by ourselves, lets talk
alxrey
Associate II

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.

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?

we dont need to firmware by ourselves, lets talk
alxrey
Associate II

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.

alxrey
Associate II

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 ! 😀

PRout.1
Associate II

Hi Alexrey,

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

 

 

Thanks.