Replies: 7 comments 14 replies
-
The reason is, the ADC has a gain error. The ADC internal value reach the maximum value (4095) sooner than the input reach the reference voltage. The ADC can not masure the voltage slightly smaller than the reference voltage. So the last 31 steps lost. This behaviour compensated by software so this is the reason for the maximum value of 4064.
The difference between 1500 and 1540 is around 1%. I think it is acceptable because no electrical parameters were written in the databook. By the way. Did you disabled pull up resistors and digital input functions during measure? |
Beta Was this translation helpful? Give feedback.
-
Thank you The curious thing with that difference is to me: there are only two values, nothing between, only one or the other. The Boards i'm using are with the LQFP32 package, - is there a similar situation with double connections ? |
Beta Was this translation helpful? Give feedback.
-
Maybe you can use the differential amplifier for that. BTW, I remember there's a register to turn off the digital input circuitry to reduce ADC noise, maybe you can try that too |
Beta Was this translation helpful? Give feedback.
-
Just to sum it up: We're not talking about accuracy, but different readings of the same voltage depending on the input pin used? I doubt the LGTF is less accurate at the Atmega, which has 10 bit resolution with +-2 LSB, makes about 0,4%. As +-2 LSB is quite some regular value on that cheap ADCs, and LGTF has 12 Bits, it must be much better. Different pins reading different values, that's really interesting. Would you mind to tell us if there are groups of pins maybe, or which ones are off by large? Asides from pulling resistors, it could be the multiplexer, or even different types of internal circuitry (which has really good documentation in the datasheet). Given that you drive the inputs strong enough (guess you had to build up a resistor divider if measuring solar cell voltage). I didn't see such thing until now, but have to admit that I never compared all the inputs.... |
Beta Was this translation helpful? Give feedback.
-
Yes, we're not talking about accuracy, but different readings of the same voltage depending on the input pin used.
I don't measure the voltage, only the (short sircuit) current, so no resistor divider is involved. :) @dbuezas : turning at the registers is much over my skills... ;) |
Beta Was this translation helpful? Give feedback.
-
If you need to measure voltage differences between two pins, the lgt328p has an internal differential amplifier with configurable gain, see here: https://github.com/dbuezas/lgt8fx/blob/master/docs/differential-amplifier/readme.md Y in theory you can measure differences of 5v/2^17= 38uV. |
Beta Was this translation helpful? Give feedback.
-
A little update to this storry. But what the test also shows: The ADC don't work up to 5V, it returns the max value of 4064 already at 4.65 V. Because i tested "board powerd by USB" i checked the voltage of the USB port, its stable by 5.06 V. |
Beta Was this translation helpful? Give feedback.
-
Hi,
after building a gauge to meassure and store current i found some things at the ADC where i'm curious about.
First: the max value i get is 4064 (board powerd at 5V Pin, ADC pin at same source)
Secound: I get a different output at some ADC Pins if i put the same voltage at it. E.g. at one pin i get 1500, with the same voltage i get 1540 at some different pins but others show also 1500.
I try'd a few of the purple boards now und each shows the same behavior, - expecting a little different at the difference.
Beta Was this translation helpful? Give feedback.
All reactions