BL4S210 poor counts per Volt on AIn

We recently upgraded from BL2100 to BL4S210, due to poor availability issues with the former.

Now we are wondering if we made a mistake, because if appears the whole 2048 raw value span is not available. In fact we only have 160 counts / Volt resolution. The BL2100 had 205 counts / Volt.

Then to add to our discontent, the calibration seems to have absolutely no impact on the counts/Volt.

This table below shows the 3 different calibration efforts at 0-10V, 0-5V and 0-2.5V. And successive testing to see what the raw values are. Note that the raw value is always the same

The yellow values were obtained by increasing the input voltage beyond the 2.5V calibrated value.

What is the purpose of calibration if the counts/Volt is always the same?

With the BL2100 we had 204.8 counts per Volt, the much newer BL4S210 has 75% less resolution at 160 counts/V.

calibrate span
raw value

0-10V	0 V		0	
	5 V		816	
	10 V		1635	
				
0-5V	0 V		0	
	2.5 V		405	
	5 V		811	
				
				
0 -2.5V	0 V		0	
	1.25 V		202	
	2.5 V		402	
	5V		810	
	10V		1637	

This does not make sense to me.

What say you?

You are correct, it does not make sense. You are not configuring the hardware for the correct gain code before taking readings with anaIn().

Code in anaInVolts() will configure the hardware (via the internal API _bias_adc()) to take readings with a given gain code. After calling anaInVolts(), you can make additional calls to anaIn() to get the raw values.

But with this hardware, you should call anaInVolts() and store that value since it’s adjusted using the calibration constants.