Wifi Drop connection

Hi,

I am building an irrigation system.
after a few days of trying to debug the system Today, I realize that my NodeMCU board re-connect to the AP on average every 11:30 (between 11:24 to 11:45 min.) minutes. How to solve it? any suggestions?

the related code is

setup
{

WIFI_Connect();
}

loop
{
if (WiFi.status() != WL_CONNECTED)
{
WIFI_Connect();
updateState(2,2); // this function update thingspeak service with the status,
// I got every 11:30 min update.
}
}

void WIFI_Connect()
{
WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay ( 250 );
}
}

Such a regular time suggests that some external process is kicking you off. Could be a wireless timeout, but it seems a bit short. Does it happen if you're using the wifi rather than just checking for connectivity?

Maybe you have a IP address clash and the router is deciding in the other device's favor.

Are other devices using the wifi ok?