Speedybee f405 wing. Barometer not initialization

Speedybee F405 Wing. I have a problem with loading the barometer driver and the board itself. The board was flashed via DFU with a complete erasure of the Arduplane 4.5.7 chip. Then via Compare, the saved settings were installed. Then everything is calibrated and configured. The problem is that when the airspeed 4525 is loaded and connected via I2c, the board does not load, giving an error: Config Error: Baro: unable to initialise driver. I have more than 10 such boards and the problem does not occur on all of them at once, but later those that did stop working. At first it seemed to me that the problem was in the power supply, because it occurred more often when connected via USB and was fixed by connecting to an external power supply, but now this does not help either. The airspeed sensor is powered by the Vx bus with a voltage of 5V, the voltage is normal. I no longer have any idea what the problem could be!!! Please help!

If you have flashed the FC via DFU and do not load the old parameters for the time being, will the Baro work correctly?

additional to @Target0815
If you don’t connect the airspeed sensor will the baro work correctly?

If there is no airspeed sensor, then the barometer usually works correctly. Now I found out that the problem is in the i2c bus, but I can’t figure out what exactly. Now I see that when the SDL, SDA wires run parallel to each other, and I have them running on a flat IDC cable, the bus doesn’t work.
I also realized that if there is no power to the airspreed, then it also doesn’t work and the board doesn’t initialize at all.
I made a new cable from silicone wires, and twisted them together with 5V and GND and periodically everything works, but it’s very unstable.
The length of the wire harness is about 40 cm.

Has the external airspeed sensor the correct pullup resistor activated. Which resulting resistance can you measure between SDA & Vcc and between SCL & Vcc?
Are the adresses of all devices connected to the bus unique?

Yes, I measured the resistance between the pins. SDL & VCC- 10 KOm, SDA & VCC- 6 KOm
Everyone’s address is different.

Are you running at 100k or 400khz? For 100 Khz I would say it should work fine, I have run up to a meter. For 400 kHz 40 cm could be beyond the limit…

Also, 10Kohm and 6 Kohm pullup is strange, usually they should be the same. Could it be that some sensors have double pullup (SDA)?

I work with ARDUPILOT and I don’t know at what frequency I2c devices work. There are no settings for the bus frequency in Ardupilot. The fact that the resistance is different is also a little strange, but it’s not on one but on all Airspeeds, so it’s not a breakdown of a specific device.
By the way, SDL & GND and SDA & GND are equal to 5.2 KOm if that matters.

Do you have an oszilloscop available?
Are you able to add some extra resistors?
How you measured the resitance, only the airspped sensor or all connected together?

5 kOhm is standard pullup, by the way.

You must make sure that the total of the pullup resistances are correct, i.e. you have to measure this when everything is connected as Juergen said. It could be that one pullup resistance is missing somehow where you read 10 kOhm.

I would suggest trying very short cable run to rule out cabling issues, something like 10 cm. 40 cm, together with not so perfect pullup resistors could easily result in ingtermittent problems. You could also try lowering these by just connecting extra resistors between VCC 5 V and SDL SDA, I would try something like a 4.7 kOhm where you have 10 kOhm measured now, and about 7.5 kOhm where you read 6 kOhm.

I am not sure which frequency is used in ardupilot, but strongly suspect that it would be 400 kHz.

I have an oscilloscope, I can look at it, but I need to understand what is normal and what is not. I measured it with the sensor disconnected. I can add resistors, I need to understand what the total resistance should be.

A short cable would solve the problem, but it’s not possible. Mine is about 40 cm long, I’ll try to shorten it, but it will be less than 30 cm. I’ll try to add resistors.

With an oscilloscope you can check the signals on the lines, measure frequency, signal form and level.
Add resistors so that as @Michail_Belov said you get round 5kOhm pullup on both lines.

First, you must make sure that the cable length is a problem. So for this reason I would try out a short cable, even if it is not useful for your setup.

Second I would try to lower pullup resistors, may be to 3…4 kOhm total. That could improve the signal