Grove Voltage Divider not accurate on stable 12V

Hi everyone,

When using a V1.1 Grove Voltage Divider to check a stable 12V (provided by a 2A wall adapter) the readings are off by about 0.6V. (12.7 vs actual 12.08-12.11). I’m running this from an Arduino Nano with the groove board, powered by my PC’s USB port.

  • I checked with a second identical V1.1 Divider (on a different Pin) and got the same measurements.
  • I measured the 12V using 2 voltmeters (12.08-12.11)
  • I tried both the 3 and 10 setting.
  • I used the provided x * sensorValue * 4980 / 1023.00 with 1000-10000 samples with a 2 ms delay.
  • I’m seeing the same voltage differences when also reading other voltages from other sources.

I’ve collected the 12V results into an array and did some math on them and the sensed voltage looks stable but not accurate:

10 setting:

Array Min : 12656.00
Array Max : 12705.00
Array Square Sum : ovf
Array Arithmetic Average : 12697.16
Array Geometric Average : 12697.18
Array RMS Average : 12697.18
Array Extended RMS Average : 12697.52
Array Q1 : 12705.00
Array Q2 (Median) : 12705.00
Array Q3 : 12705.00
Array IQR : 0.00
Array Standard Deviation : 18.05

3 setting:

Array Min : 12778.00
Array Max : 12822.00
Array Square Sum : ovf
Array Arithmetic Average : 12796.12
Array Geometric Average : 12796.06
Array RMS Average : 12796.12
Array Extended RMS Average : 12796.04
Array Q1 : 12793.00
Array Q2 (Median) : 12793.00
Array Q3 : 12807.00
Array IQR : 14.00
Array Standard Deviation : 10.23

How can I fix this? Thank you for your time.

I removed all other devices from my Arduino. Just the Arduino being powered through the USB port of my pc, the voltage divider on A0, and the 12V from the wall adapter on the divider. Same results 12.08 vs 12.7. Can anyone help me out?

[/Begin Disclaimer]
I don’t have a Grove Voltage Divider, so I can’t guarantee that I can help
[/End Disclaimer]

1. I think the formula assumes that the Arduino Vcc is 4.98 Volts. Can you measure the actual voltage applied to the Arduino? If it’s not 4.98 Volts, use its value (in millivolts) in the formula in place of 4980.

2. Can you apply some known voltage value (less five Volts) directly to Arduino A0 with the Grove Voltage Divider not connected? The formula for actual voltage in millivolts is
Vmeasured = (10-bit ADC Reading) * (Arduino Vcc) / 1024



Footnote: Note that actual denominator in the correct formula is 1024, not 1023. That only makes an error of less than 0.1 percent, which is about 11 or 12 millivolts for a 12 volt scaled input, so it can’t, by itself, explain your observation, but you might as well use the correct formula.



1 Like

Thank you Dave! You are right, VCC is 4.66V. I found this post which really helped me:

I also used a Grove ADS1115 ADC between the voltage divider and the Arduino and that also works.