主题中讨论的其他器件: ADS1232REF、 TPS7A20
工具与软件:
我正在使用数据表中提供的参考原理图中的 ADS1230、该原理图连接到轴上的一个电桥以测量扭矩。 它连接至 Nucleo-G431KB、在该应用中只需通过位 扑交换即可进行通信。
接着发送一个额外的时钟脉冲、在读取20位时将 DOUT 拉至高电平、从而确保数据就绪。
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);
返回 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.