neukyhm:

Sorry if this topics doesn't go here. I have Arduino UNO reading the output voltage of a DC step-down converter fixed at around 2.7V.

The measure is done through a voltage divider made with 1M and 100K resistor (obviously with the 1M one pointing to the voltage to measure and the other is between ground and A0).

I have taken into account the 100M impedance of Arduino, and when I read the voltage I get 2.48V when it should be 2.69V measured with voltmeter.

I have tried to set the reference to default and also reviewed the formula to convert 0-1023 to voltage several times, what am I doing wrong?

This is the formula I'm using: Voltage = 11.01 * 4.7mV * analogRead(0);

The 11.01 is the voltage divider.

PS: everything is common grounded.

I think you're better off just drawing a circuit diagram, because your description of the circuit doesn't seem to tie in with the values that you wrote ---- such as .... where do the values of 2.48V and 2.69 V come from?

You mentioned a voltage divider ---- with 1 M connected to 2.7V on one end, and the 'other' resistor connected between 'A0' and GND. So this suggests that A0 is connected to the mid-point of this voltage divider.

So A0 should be reading an equivalent voltage of around 0.245 volt, right? Or.... around level **50** (in the range from level 0 to level 1023) with a 5V reference.

You mention that the UNO is reading the output voltage of the step converter. So this suggests that A0 is connected to the 2.7V output of the step converter? But, on the other hand, you're also suggesting later that A0 is at a different location ----- at the mid-point of the divider.

So.....the question is .... which is it? Which location is A0? At the moment ---- your description suggests A0 is connected to two different spots at the SAME time. That is "**I have Arduino UNO reading the output voltage of a DC step-down converter fixed at around 2.7V.**" versus "**the other is between ground and A0**".

You need to describe what you're doing more clearly and accurately. Eg. You're trying to estimate (or measure) the voltage at the output of the DC converter by first measuring the voltage at the mid-point of the divider, and then using that measured voltage to calculate (estimate) the voltage at the top of the divider. In other words, if the voltage feeding the top of the divider is 'B', and the midpoint voltage of the divider is 'A', then A = {100/(100+1000)}*B.

So B = {(100+1000)/100}*A = 11*A

So if the divider midpoint voltage A turns out to be 0.245454545..... volt, then B would be calculated to be 2.7V.

If your 5V reference supply (for the arduino) isn't accurate (ie. is not close enough to 5V), then your measurement of 'A' would be out by a little bit, and the relative error would then propagate to your value of 'B'.

Note that if you are using this 'back calculation' method to estimate the voltage 'B', then to say the following is quite misleading : "**I have Arduino UNO reading the output voltage of a DC step-down converter**".