-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify adc.c and USE_PRECISION_OPAMP
adc.c used a buffer of 2 x 256 x 2 byte = 1024 bytes to calculate the sum over the last 256 values for oversampling. This is pretty useless in the first place as accuracy below 1K are not to be expected even with a precision opamp instead of the TLC27L2. The current implementation at least gets rid of the buffer completely by using a running average method. Along with the change the sampling is reduced to once per ms instead of ever 100us, which was an overkill, new values are delivered every 256ms now, which is good enough. USE_PRECISION_OPAMP switches the internal gain to 0.36845 as the pre-amplifier is supposed to have a gain of 222.2 (see adc.c). At 300 degree C it uses 834 LSBs instead of only 307. Using an OPA2333 or similiar and replacing the trim resistors by fixed (and accurate) resistors will do the trick.
- Loading branch information
Showing
2 changed files
with
76 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters