When connected to a PC via USB, my S5 would charge but the device was not recognised. My USB drivers were up-to-date and I was using the original Samsung USB provided with the phone. This worked for me:
Dial *#0808#
Under USB Settings, check MTP button and click OK. Try connecting your phone to...