Battery circuit with Tpl5110

Hi.

I’m working this little project above with sucess but often(once a day) i notice that tpl5110 doesn’t power off and remains on for 2 or 3 arduino cycles(2 minutes each). Then for unknown reason powers off, works like charm and again the same problem. Is it a code error or circuit error?

Is it a code error or circuit error?

Hard to say. Could be a code issue, or possibly some RFI causing some noise on the DONE pin, but if that’s the case I’d expect it to happen randomly. (more than 1x/day) You might try tossing a 10K pull down resistor between DONE and ground to rule out noise on that line.

If you still have the issue after trying that, strip your code down to the bare minimum and see if that helps. If it does, begin adding things back until you identify the issue.