Other Parts Discussed in Thread: ADS1232REF, TPS7A20
Tool/software:
I'm using the ADS1230 as in the reference schematic provided in the datasheet, connected to a bridge on a shaft to measure torque. It is connected to a Nucleo-G431KB, where communication is simply done via bit bashing.
The 20 bits are read, then an additional clock pulse is sent to pull DOUT high as it is read to ensure the data is ready.
int adcRead () {
int i = 19;
int32_t tempTorque = 0;
uint8_t bit_i = 0;
while (i >= 0) {
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);
HAL_Delay(1);
bit_i = (int)HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_7);
tempTorque = tempTorque | (bit_i << i);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET);
HAL_Delay(1);
i--;
}
if (tempTorque & 0x00080000) {
tempTorque = tempTorque - 0x00100000;
}
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);
HAL_Delay(1);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET);
return tempTorque;
}
Occasionally, this leads to the DOUT pin being pulled high by the ADC after the first clock pulse
to read, and remaining high for ~500ms, and this is read by both the microcontroller and verified
on an oscilloscope. The clock pulses have been verified + counted on the oscilloscope, and as expected we
get 20 bits of data and the last write leads to DOUT being pulled high until it is ready during a normal read.
We run the calibration routine on startup, sending 26 clock pulses to the chip, though even with this we still
get the erroneous+inaccurate reads, and even during normal reads that we have ~9-10 noisy bits, even with a large
bulk capacitance of 33uf over the 3.3V line. We are not using a proper voltage reference, and instead
the 3.3V line from the microcontroller, but this provided us no serious issues with the HX711, and measurements
with an oscilloscope show that we should be getting greater accuracy than we are. We also note during long periods of no
reads that the ADC occasionally pulls DOUT high for seemingly no reason.
How can we prevent these erroneous reads, and reduce the noisy bits? The ADS1230 is in 10SPS mode, running at 3.3V
with a 1000 ohm bridge with sensitivity coefficient 2, so we aren't fully taking advantage of the range of the amplifier,
but we still do not expect noise this significant.