Power supply questions

I don't think Vref can (safely) be higher than Vcc.
If you don't measure anything > 4.4V, you could probably simply replace the 5.0 in

float voltage = sensorValue * (5.0 / 1023.0);

with 4.4 .