High voltage drop on Nano outputs caused by sketch

I have just spent about a week debugging a similar issue using (I think) the same Arduino Nano board as you. Something I came across which did help is the analogReference() function. Check what the default voltage is for your board, it might not be the 5V you expect it to be - it wasn't for me!

There's more info in the arduino documentation about the options for different boards.