For the Sharp sensor, you can read the higher voltage with a simple voltage divider (two small resistors).
Iwas only refering to the input voltage. The output voltage of the sharp sensor is 2.3V max.
you may eventually end up sampling the voltage right in the middle of the sensor's transition from one voltage to another. If you don't want the occasional erroneous reading, you'll want to power off the sensor and power it back on to make sure you stay synchronized -- this will require two more small inexpensive parts, a current-limiting resistor and a transistor.
I did think about that too, in the datasheet there's a rough timeline that I have measured with a ruler and apparently the time of unstable output before and after a voltage change combined is roughly 1/10 of the overall measuring time of 39ms.
My intial idea (since I read how fast the Arduino is) was to read out the voltage every 10ms (havent given much though on the math yet) and out of five discard all values that haven't come up at least twice.
Since I don't know the exact period of time of the unstable readings this is not a perfect solution and I might go for yours instead.
I'm not sure which parts I will need and how to set them up though?
(The datasheet also recommends a 10yF Cap btw)
Let's talk about power supply
It will be powered by the hub generator.
Long story short, I got a battery buffered regulated 5V (Recom 7805, max 1A) and unregulated 12V (12.3max).
The 5V is used to charge my Iphone which could let the voltage drop slightly but then theres the capacitator and the sensor has a voltage regulator built in too.