(Please visit the site to view this file) Thanks Bob for the attention. I need to know if it is possible with ads1232 to measure objects in [Kg] and [g] or even more accurately [0.5g] for example. Or maybe it would be the case to use another component. Could you suggest another? The big problem I see is that when I set an offset I notice a fluctuation in the [ADC-OFFSET] values, which looks a lot like a sine-wave signal over a large span of time. I do not know if it's really a problem or if it's a feature of components that use DELTA-SIGMA, can you tell me that? If it is, I'll probably have issues with other components as well. I'm using: GAIN = 128 SPS = 80 ADC = 5V (SPX3819) VREF = 2.5V ( REF5025 ) VDD = 3.3V I'm using the same load cell. But the same error happens with other load cells. On the PCB board that is being developed it will have the same voltage for excitation and reference, but on this test board I am using the REF5025 for 2.5V. There is no filter in the reference, however I am using a battery to power the AD and the reference, the result should not improve significantly? I believe the average is not working, but I do not know how to improve that reading. Any idea? I do not know what the noise would look like if I'm using the battery. In the code I'm using RTOS (FREE-RTOS), the tasks work concurrently, in fact, concurrently and their structure is loop infinite, this allows the use of FOR and WHILE without interruption of the firmware through timeslice. Below are the MACROS: [code] #define A0 (x) ((x)? (HAL_GPIO_WritePin (AD1232_A0_GPIO_Port, ADS1232 _A0_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _A0_GPIO_Port, ADS1232 _A0_Pin, GPIO_PIN_RESET))); #define SCLK (x) ((x)? (HAL_GPIO_WritePin ( ADS1232 _SCK_GPIO_Port, ADS1232 _SCK_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _SCK_GPIO_Port, ADS1232 _SCK_Pin, GPIO_PIN_RESET))); #define SPEED (x) ((x)? (HAL_GPIO_WritePin ( ADS1232 _SPEED_GPIO_Port, ADS1232 _SPEED_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _SPEED_GPIO_Port, ADS1232 _SPEED_Pin, GPIO_PIN_RESET)); #define PDOWN (x) ((x)? (HAL_GPIO_WritePin ( ADS1232 _PDOWN_GPIO_Port, ADS1232 _PDOWN_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _PDOWN_GPIO_Port, ADS1232 _PDOWN_Pin, GPIO_PIN_RESET))); #define GAIN_1 (x) ((x)? (HAL_GPIO_WritePin ( ADS1232 _GAIN1_GPIO_Port, ADS1232 _GAIN1_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _GAIN1_GPIO_Port, ADS1232 _GAIN1_Pin, GPIO_PIN_RESET))); #define GAIN_0 (x) ((x)? (HAL_GPIO_WritePin ( ADS1232 _GAIN0_GPIO_Port, ADS1232 _GAIN0_Pin, GPIO_PIN_SET)): (HAL_GPIO_WritePin ( ADS1232 _GAIN0_GPIO_Port, ADS1232 _GAIN0_Pin, GPIO_PIN_RESET))); #define DOUT_READ_BIT HAL_GPIO_ReadPin ( ADS1232 _DOUT_GPIO_Port, ADS1232 _DOUT [/code]
↧