2021-03-09 02:16 AM
Hi Guys, i am using STM8S003F3 controller and i want to that how can i achive 0.1v accuracy when my ADC resolution is 1023 and my total count is 2000.
2021-03-10 04:52 AM
Going to want to use a 16-bit ADC, not going to be able magic 5-6-bits of additional accuracy, can you range/scale so you don't need 0.1v resolution at full scale?
AC or DC voltage
2021-03-10 06:32 AM
Now that's something different.
Any resolution figure is related to the voltage actually presented to the ADC input.
And if I am not mistaken, the STM8 requires all analog (ADC) input voltages to be postive, i.e. > Vss.
So, you need to shift the field input value into the positive range, preferably with an opamp.
And such a level shift can amplify the signal at the same time, to make best use of the ADC.
Like shifting/amplifying it from -1.0V...+1.0V to 0V...+5.0V, minus same headroom for tolerances perhaps.
2021-03-10 08:40 PM
yes did that i got + and - value but the only issue is it is jumping by 2v only mean we can say that 2v and i am looking for 0.1v accuracy or at least 1v accuracy.how can i get that??/
2021-03-10 10:45 PM
> how can i get that??/
Doing some simple math, approaching it from the other end.
You have a 2.0V signal range, and want 0.1V resolution. Which are 100mV, as pointed out.
This gives 2.0V / 0.1 V = 20 steps.
Next 2^n factor greater than 20 is 32, so you would need 5 bit, getting 0.0625V per step.
A 4-bit resolution would give you 0.125V per step.
To get that from a 10-bit ADC, you would just have to right-shift the result by 3 or 4 bits.
If you actually meant 1mV, you need 2.0/0.001 = 2000 steps, meaning at least 11 bit resolution.