The Samsung S5 has a nice feature to automatically switch between Wi-Fi and 4G to make sure there is always an internet connection. You go to Wi-Fi and then select the option at the top:
And for the most part this probably works pretty well. Except for me and some others.
The problem began when I was trying to communicate with my new amplifier via WiFi and it lost connection every 10 seconds. At first I blamed the amp and then the router. It was still losing connection when the phone was 2cm away from the router. I was contemplating buying a new router (lots of cursing and swearing at this stage) when I did checked if anyone was having the same problem.
Then a little pointer from this site (and some others) http://forums.androidcentral.com/samsung-galaxy-s5/387300-samsung-galaxy-s5-constantly-dropping-wifi-2.html pointed me to this setting.
I turned the setting off and happy dayz 🙂