Let me try to describe my schema:

There is 12V acid battery constantly charged with DC 13.8v 500ma, on that power (battery) is connected attiny85 thru 78l33 voltage regulator + capacitor 470uf,

thru 7805 is powered ESP32 (it have own voltage regulator to 3.3v) with capacitor with same value. Devices communicate over I2C with 10K pullup resistors to 3.3V on attiny side. Wires are few inches long.

Everything works fine when there is external(charging) voltage, when I disconnect it, I2C bus stop working. I haven't trying to lower pullups or connect them on other side - ESP32 . I do not see the reason why that stop working when was powered on battery. (guess my knowledge is not enough :) )

  • 2
    \$\begingroup\$ Let me try to describe my schema Uhm, it is much clearer if you just make a drawing, that can even be on a piece of paper, make a photo of that and include it here. \$\endgroup\$ – Bimpelrekkie Apr 3 at 8:42

Does the I2C work when you restart it again without the charger?
If so, the problem is likely that disconnecting the charger causes a di/dt which couples into your I2C lines.
Measure your I2C with a scope and check what happens when connecting or disconnecting the charger.

EDIT: 10k\$\Omega\$ is quite high and makes the I2C signals sensitive to more than only a charger being (dis)connected. I would lower them anyway to, like, 1 kOhm.

  • \$\begingroup\$ I connected 4.7k pullups on other side (ESP32) one and it stopped working (i2C buss), remove them and still not working, guess something was burn out. Changed ESP32, same now need to write another attiny and see what is going on. Attiny works and do what it need to do, but communication is down. \$\endgroup\$ – user3503519 Apr 4 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.