When I power the whole thing up with a 5V 2A AC adapter, voltage on the 5V pin and the Vin pin is 4.55ish.
How can I make the 5V deliver 5V so that I don't have to tweak the code every time I change the way it's powered?
Plus, the ADC can reference an internal 1.1V reference. That would be more reliable probably than the fluctuation you might get on the 5V line. You might need a voltage divider so that you don't input more than 1.1V on the analog pin, if you choose to use that.
I checked the power rail once fed from the 5V pin and it does output the same as Vin, that is to say around 4.55/4.65 depending on the USB/DC jack combinations stated in the first post.
When I power the whole thing up with a 5V 2A AC adapter ...
I checked the output of the AC at the plug and it's 5.39V
but when I turn the LCD backlight on it still drops to 4.67V.
Is there a way at all to keep a constant 5V on the 5V pin?