Improve ADC Readings with Averaging Filter #105
Loading…
Reference in New Issue
No description provided.
Delete Branch "linuswck/thermostat:improve_adc_readings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
This PR reverts this PR and adds an averaging filter on the pins adc readings in order to reduce noise due to hardware flaws or STM32f4x ADC. Please refer to the original PR for the details of hardware issue.
Mainly, 16 point averaging on adc readings on I_TEC current readings are added as this may be plotted in latter release of GUI program
According to AN4073, STM32F4x Internal ADC has a high dispersion on the adc readings(+-20LSB). The dispersion can be reduced via a simple averaging filter.
This is a hot fix patch to reduce the noise of the readout. The i_tec and v_tec readings should be handled by a DMA instead, which will be done in another PR.
Experiment with Different Number of Averaging Points
HW Rev2_2_1 without Capacitor Fix:
HW Rev2_2_1 with Capacitor Fix:
Kirdy Thermostat's Readings
Kirdy's Thermostat section and the Thermostat here share very similar hardware. Kirdy already has a voltage buffer on the ITEC current readout pin. The readout is done by 8 point averaging with DMA handling the adc data readout.
Proposed Hardware Fix
For applications requiring low I_TEC current readings noise on Thermostat hw rev2_2_1, you can add two 10nF capacitor onto STM32 pins.
[WIP] Improve ADC Readings with Averaging Filterto Improve ADC Readings with Averaging Filter