What is the FSD on an ESP32C3 ADC?

The docs say with 

adc_oneshot_chan_cfg_t ADC1CH2config = {.bitwidth = ADC_BITWIDTH_12,.atten = ADC_ATTEN_DB_12,};

It's about 2v5, but it depends on VREF...  "Among different chips, the Vref varies, the median is 1.1 V"...  -12db and an FSD of 1.1 should be a max voltage of 4.379v?

Tired of guestimating my readings AKA measure end-to-end and come up with a scalling factor that makes it work I injected various discrete voltages into the ADC with this arragement:

DVM
measured
ADC
conversion
2.838v 4093
2.804v 4088
2.500v 3589
2.000v 2850
1.507v 2143
1.436v 2035
1.255v 1773
1.000v 1410
0.871v 1220

For each measure ment I sampled the value 100 times with a vTaskDelay(50); between each.  Values were between 1 and 8 LSB different... 0.20% variance.

The numbers, if plotted look linear, but the confidence interval R2 is not quite 1!

It seems the ESP32-C3 ADC, at the low and high ends, is non linear.

I targed an ADC conversion value of around 2048 (in reality I got to 2035) and measured the voltage @ 1.436 - I did this test twice, 30min apart.  2035 ±3 is an accurate repeatable reading (±0.147%).

If I'm using an LM335 to measure values from -30 to +30 it should produce output voltages between 2.431v and 3.031v so a resistor divider WILL be necessary to prevent the ADC from clipping. I've used 46.8kΩ and 19.95kΩ arranged to give me voltages at the ESP32 from 1.68 to 2.12, far away from the non-linearity.

The LM335 is connected to 5v via a 3k3 bias current resistor, ensuring there is sufficient current to provide accurate values at it's output.

 

 

Who The F knows...

-12db and an FSD of 1.1 should be a max measurable voltage of 4.379v?

The data presented at https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/peripherals/adc/index.html doesn't really make sense.  12db is not 25% it's actually closer to 25.12%!?

And with a "random" 1.1 doing anything formulaic and expecting an accurate answer just isn't going to happen.