Some of the android mobiles automatically get disconnected from wifi connection. I noticed this happens with few of  the Wifi routers not all which could be compatibility or DHCP lease issue with those routers.

Only solution to over come is assigne static ip for your Android device, so no mobile is nothing to with DHCP lease and all and it never gets disconnected again.

How to assign static ip to Android mobile.  

Go to settings from the menu.

                         

How to know which ip should be used.

Open your lapton to which wifi is connected and working. 

Open command prompt and hit the below command
ipconfig
\
heck the ip pool subnet and gateway. You give the DNS as 8.8.8.8 (google DNS)

Gil...