Afro(Blue) ESC i2c @400khz

I need help in getting my Afro ESC (30A) working steady over i2c @400khz (high speed). Using i2c at the standard speed of 100khz works well. However, when increasing the bit-rate, the data transfer is poor (data corrupted etc).

To my understanding the 16Mhz cpu should be able to run i2c at 400khz. My thinking is that the time consuming PWM execution is affecting and causing this problem. I have tried to disable the PWM executinon (no assembler expert), manged to break (can’t use the programming tool over PWM) the ESC…

Does someone have feedback regarding this? Are the Blue ESC’s working @400khz?

Thanks in advance!

Hi Oscar,

We also had trouble getting the Afro ESCs to work on high speed I2C. We generally used 100 kHz and often recommended going down to even less, like 10 kHz, to improve reliability. We no longer support I2C on any ESC that we have due to the reliability issues.

I2C is really intended for use over very short distances, like a few centimeters, and it is really susceptible to noise.

I’m sorry I don’t have better news!

-Rusty

@0ggeeee,

I originally built a BR2 using the Blue ESC thrusters and tried controlling them with I2C, but found that the longest control cable runs required me to drop back to around 75khz to get reliable transmissions.

The I2C bus is really not designed for long cable runs and was envisioned for short runs between circuit boards or outboard components.

Regards,
TCIII AVD

@rjehangir & @tciii thanks for the reply!

My build is rather compact, no cables longer than 10 cm. I also have an IMU on my i2c bus working great in high speed mode. I guess I will do some further investigations. I really like to have feedback from my ESC’s, preferably at high speed.

Cheers,

Oscar

1 Like

Hi Oscar,

The code on the microcontroller is really demanding so it doesn’t spend much time servicing the I2C bus. I think that’s probably the issue and I fear it might not be possible to improve that without a strong understanding of the assembly code.

-Rusty

1 Like