This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS8688A: Intermittent behavior with ESP8266 SPI interface to ADS8688A, works ~25% of power on cycles

Part Number: ADS8688A
Other Parts Discussed in Thread: ADS8688EVM-PDK, ADS8688

Tool/software:

I have a ESP8266 (NodeMCU board) connected to a ADS8688a (on a board purchased from an online reseller) and am running into an odd problem.  About 25% of the power on cycles (i.e. turning everything on), the system works fine, the ESP8266 will communicate with the ADS8688a and do so the entire time the boards have power (i.e I can take multiple readings from multiple channels at at least 100 Hz sample rate).  But about 75% of the time the system starts up, the ESP8266 reads either 0 or 65535 (min or max voltage at whatever range it is set to), and doesn't change at all.  The only way to get everything to work is to power cycle several times until the rare time when everything seems to work correctly.

My first thought was that there was a bad connection between the ESP8266 and the ADS8688a board.  But, when the system starts up in a "working" state, wiggling all the connecting cables and wiring doesn't seem to break it; similarly, when it starts in a "broken" state, wiggling things doesn't fix it.  This doesn't rule out a bad connection but seems to make it unlikely, at least in terms of cabling.  I should also mention that power cycling that results in a "working" or "broken" startup doesn't involve any movement of the boards.  So if it was a bad connection somewhere, it'd be very subtle and not sensitive to any external mechanical input.

I've also tried adjusting the SPI speed.  The library I'm using (from https://github.com/siteswapjuggler/ADS8688a) has it run at 17MHz, but I've tried 16MHz, 10MHz, 1MHz, and even 30kHz  (my code samples pretty slowly anyways), and reducing the SPI speed does not seem to help at all.  I've had similar results using a different library (https://github.com/SBKrogh/ADS8688_ADC_ARDUINO which is based on the first).

When the power cycling results in a "working" state, the system works very nicely.  I've verified that, at least with the second library, it reads and reports voltages correctly, at least on Ch0, sampling at the desired rate.  But most of the time startup results in a "broken" state, sometimes with all input channels stuck reporting +10.24V, sometimes (more often) -10.24V.  There is no change in physical configuration or code between power cycling resulting in "working" and "broken" states.

While this all sounds to me like a SPI issue, I'm confused as to why it would work nicely sometimes, and remain working nicely until a power cycle.

The ADS8688a gets power from the Vin on the NodeMCU board, which is powered from USB (either a computer or a USB power pack).  SPI is connected as expected, Daisy is grounded, RST/PD is connected to the ESP8266 as well.

  • Hi DrNeon,

    Welcome to our e2e forum!  Is your ADS8688 PCB our ADS8688EVM-PDK or is it a piece of 3rd party hardware?  When powered up in the non-working state, what is the voltage level at REFSEL?  What voltages do you see at REFCAP and REFIO?

  • Hi Tom, thanks so much for the quick response!  It is a piece of 3rd party hardware (https://www.amazon.com/gp/product/B0BG2D4LZ8c).  When I next get a chance (not sure if today), I will try to find those pins or traces and measure the voltages when powered up in a non-working state.  Looking at the board and some minimal documentation I've found, I now think it may be set up for an external reference, I wonder if that is the issue?  I still don't understand why that would cause intermittent behavior instead of just plain not working at all.  Anyways, I'll try to get those voltages and report back.

  • If the REFSEL pin is open (floating), that could explain the behavior you are seeing.

  • Finally got around to measuring this.  REFSEL is around 3.3-3.4V, connected via a 1k resistor to DVDD (which is provided by a SPX3819-3.3 chip on the board, with 10uF and 100nF capacitors, at least according to the circuit diagram I was provided)

    In this most recent test, I powered on the board and microcontroller, saw Ch0 reading pinned to +10.24V, measured REFSEL at 3.36V.  I then power cycled everything (unplug then plug back in the USB power pack I'm using to provide 5V to the NodeMCU (ESP8266) board, and hooking up its Vin to the Vin on the ADC board) , and saw Ch0 reading actually meaningful voltages, REFSEL at 3.4V.  Power cycled again and saw Ch0 pinned to -10.24V, but REFSEL still measuring at 3.4V.  No obvious differences in REFSEL between working and non-working states.

    I haven't' had a chance to track down REFCAP and REFIO, will try to get to that.  The board is set up such that I can move a resistor to have REFSEL at GND (through the same 1k resistor) instead of DVDDD, I plan to try that and see if having it set to use the internal reference causes this issue to go away.  External reference is supposedly provided by an ADR444, and the default configuration is to use that.

    I was provided with a circuit diagram for the board and can upload that if it helps.

  • Yes - please do upload the schematic.