Ceri recommended 47K and 91K, which I agree looks like a great fit.
Robert said his sensor is on a 5v supply, and the signal is likely proportional to that supply. So it has the potential for error based on that supply (is it 5.000v or somewhat higher or lower). So, another pair of resistors, used to measure the 5v supply itself may be necessary to extract the most accurate signal. These need to be matched, or precision resistors to avoid introducing more errors.
In this situation I too would not recommend the diodes; near-zero sensing, diode variations and temperature sensitivity could ruin the accuracy of the measurement.
Lastly, filter the analog input as heavily as possible, because the mbed analog input is often noisy. This filtering could be with capacitors at the analog inputs, software, or both. Depending on how fast your input signal may change, there will be some compromise here.
The mbed AnalogInput has a maximum input voltage of 3.3V. I have a 5V device that I would like to interface to it, what should I do? (option #1) using a voltage divider with two 1K Ohm resistors. (option #2) how about using an op-amp?
Anybody has a better solution?
Here is what I am trying to do: I have a Allegro A3516 hall sensor has a range from 0V to 5V output. Which represent -800Gauss to +800Gauss. When it is at 2.5V, it is 0 Gauss.
Please help.