Hi everybody,
i designed a custom board with ads1115 and ESP32-wroom-32e. i am using pca9306 ic to level shift from 5v to 3.3v on i2c bus. Sometimes, it return -1 or minus value like -12365. i am using ads as single ended. i found a problem on i2c pull- ups and measured with oscilloscope. i was using 3.3k on low side and 4.7k on high side and rising edge was not sharp. So i lowered the resistors and tried again. Also lowered the i2c speed to 50khz from 400khz. it was making -1 every 300-400 measurement but now every 1500-2000.
Also, i am getting adc data on loop and loop time is 40ms, when it return -1, it also higher loop time to 1040. i am using millis to make loop( not delay function) and next loop time get 2-3.
What can cause this problem? How can i solve this issue.
Thanks
Best regards.
Example log on bluetooth
17:19:14.311 40,1490
17:19:14.328 40,1489
17:19:15.435 1039,‑1
17:19:15.443 3,1489
17:19:15.445 40,1485
17:19:15.504 40,1487
17:19:15.508 40,1490