Electronic – What would cause an ADC to stick on an arbitrary value

adcanalogdifferentialload cell

I have a differential ADC (HX710) that I am using to interface a load cell. The wiring is as follows with (J4) going to the load cell: enter image description here

Mostly, this reads very reliably and accurately. However, intermittently the ADC reading will stick at a seemingly arbitrary range of values (ie. not a power of 2) that would normally represent a very high weight (but not a max reading with respect to the ADC's range). I can't consistently get the circuit into this state. It seems almost random – say every 20th power cycle?

During this failure mode, I can completely unplug the load cell from the system and the ADC will still be floating in this high range.

Under normal circumstances, running the ADC without a load cell returns just the expected unweighted value bouncing around in the noise floor.

Is there a reason that a differential amplifier, like this, might get stuck in a high range intermittently?

Best Answer

This ended up being a software problem. The HX710 has two modes: A) differential input B) DVDD-AVDD measurement. You set the mode for the next conversion period by the amount of PD_SCK trailing pulses in the current conversion period. This is shown on page 5 of the datasheet:

datasheet screen shot

In the driver code, I neglected to disable interrupts during the data clock out period. This was the cause of the intermittent failures. It seems that interrupting during the clock out sequence would sometimes cause the ADC to begin reading out DVDD-AVDD instead of the differential input. That explains why I would see it hang at an arbitrary value not responding to any inputs from the load cell.

Disable global interrupts while driving time sensitive peripherals!

Lesson learned.