Power Problem in DS1307 RTC by Disconnecting Power Supply

Thread Starter


Joined Jan 1, 2024
Hi everyone,
I have gotten a strange problem with my circuit. Ac you can see in schematic this a timer RTC with DS1307. In the absence of power supply, ds1307 works with coin battery.
Here I use a 12v adapter as power supply, This 12v is decreased with lm317 regulator to 3.3 for microcontroller and it is also decreased to 5v with a l7805 regulator for ds1307 RTC.
The strange problem is when I disconnect 12v adapter from wall-plug, RTC works with battery and can save time (12v adapter is connected to the board but disconnected from wall-plug )
But when I disconnect the board from 12v adapter RTC does not work and it gets reset when I connect it again to 12v.

I hope you understand what the problem is. Apparently, there is a circuit inside 12v adapter that can affect the board even though it is not connected to the outlet.

Wall-plug-----(disconnect from here)------12v adapter ------------------------------------ board =====>> it works
Wall-plug------------------------------------12v adapter---(disconnect from here)-------- board =====>> it does not works