Other Parts Discussed in Thread: ADS125H02, ADS124S08, ADS1235
Hello, good afternoon. I'm here seeking help to solve some issues I'm having while using the ads131m08 to read load cells. I'm setting up the ads131m08 to sense 5 load cells.
My configuration is as follows: CLOCK 8.192MHz, OSR = 1024, 4kSPS, FSR = ±1.2V / 32 = 37.5mV. I configured a local value for each channel (where I encountered problem [1]). The load cells are 4-wire, 2mV/V, powered with 15V, and they are in good condition.
Currently, I'm only using 2 cells for testing, channels 3 and 4 of the ads. The cells are powered in parallel from the same 15V source. When calibrating the zero point, the cell in channel 4 settles around 0.3 to 0.5kg. However, the cell in channel 3 varies between 1 and 20kg after calibration. Sometimes it fluctuates by 10kg, and other times it jumps to 20kg above and then drops back.
I calibrated the scale and the offset (ocal registers). In the datasheet, it mentions gain calibration for each channel using the registers CHn_GCAL_MSB and CHn_GCAL_LSB, which is where I encountered problem [2].
Let me explain each problem/doubt:
Problem [1]: From what I understand, the ocal value is used to set the ADC at value 0, which in this case would be the value 8388607, but the obtained value is different by a few hundred. Here's a snippet of my code:
# Calculamos la diferencia con el punto medio 8388607
valor_ocal = 8388607 - valor_a_tomar_por_offset
print(f"valor por offset: {valor_a_tomar_por_offset}")
if valor_a_tomar_por_offset == 0:
valor_ocal=0
print("valor ocal: ",valor_ocal)
# Convertimos a complemento a dos si es necesario
if valor_ocal < 0:
valor_ocal_complemento_a_dos = (1 << 24) + valor_ocal
valor_ocal_complemento_a_dos &= 0xFFFFFF
elif valor_ocal>0:
valor_ocal_complemento_a_dos = valor_ocal
valor_ocal_complemento_a_dos &= 0xFFFFFF
else:
print("estoy reseteando:")
valor_ocal_complemento_a_dos = 0
#continue...
Problem [2]: I assumed there might be a gain error, so I thought of calibrating it, but I'm not sure what value to use. Is there a calculation involved, or is it trial and error?
Problem [3]: Is there any guide available for calibrating the ads?
Problem [4]: When I power the load cells with a source that shares the ground with my ads circuit, the cells lock into a value. But if I connect an external source to the load cell circuit, they work "correctly." I read about a ground loop, but I'm not entirely clear on it.
I'll attach a simple diagram of my circuit for reference.