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.

ADS1255 wrong data appear after a random time

Other Parts Discussed in Thread: ADS1255, REF5025, OPA350

Hello,


I use the ADS1255 with a MSP430 to acquire data and send it to a computer with a RS232 cable. Everything is good. I have the good result but sometimes after a certains times I received data completly false. It happend randomly (1 minutes, 5 minutes, 10 minutes, sometimes never,...).
I check with  scope and the communication with the computer is OK. The problem is when I read the data of the ADS1255 with the SPI (I read the data with the coutinuous mode). The value are wrong there. The only way to solve the bug is to restart my program to restart the ADC.
The problem is really strange and I don't know what can cause it because it appear randomly and also for different PGA and DataRate.

For the measure I use a single ended input between AIN0 and AINCOM. The buffer is disable.
And another little question. I do only a self calibration when I update the register of the ADC but I never do a system calibration. Is there any problem of that ?

Regard

Laurent

  • Hi Laurent,

    Could you share the oscilloscope screenshot of the SPI communication error, as well as a schematic?

    Does your program hold /CS low? You may be getting a glitch on the SCLK. THe only way to recover, would be to toggle /CS, which resets the SPI interface.

    Regarding calibration, system calibration is used to remove offset and gain errors that are caused by the analog signal conditioning circuitry. Self-calibration, on the other hand, only removes the offset and gain errors from the ADC.

    It is recommended to perform a system calibration to achieve the best performance... Since you are disabling the buffer does that mean you are using an external buffer?

    Regards,
    Chris

  • Hello,

    Thanks for the information for thz calibration

    /CS is connected to the ground.
    I don't use the buffer beacause the datasheet says that with the buffer the maximum inpout voltage is AVDD −2.0 and not AVDD. For now it's just a prototype to test the ADC and I don't have a buffer (I use a voltage generator directly connected to the input) but a the end there will be a buffer.

    Maybe I've a problem with the clock. I look to the scope and there is somethings strange. When I read the last byte. The Dataready go high before I the end of the clock. When I don't have the problem everything seems to be ok with the dataready. (The clock of the SPI is at 1MHz and is connected with a wire and pinheader)

    Here is the printscreen with the bug.

    Here is the printscreen where everything is OK

    And another strange things with the dout (yellow) of the adc

    You'll find in attachment the schematic.

    7367.ADS1255.pdf

    Laurent

  • Hi Laurent,

    Thanks for the schematic and oscilloscope screenshots!

    Where did you probe SCLK and DRDY, was it at the ADS1255 or near your MCU?

    The signals look clean, but I'm curious if they look clean at the ADS1255 pins. You schematic shows a connector; might your digital signals be traversing a long wire?


    You could also be getting bad data if your MCU is not reading data out fast enough.

    If a conversion is completing while you're reading out data, you will get a corrupted result. Is /DRDY going high because of new conversion data (the /DRDY pulse should a have period of "1 / data rate")?

    Aside: Looking at your schematic, I'm concerned about R7 on the output of the REF5025. R7 should be 0 Ohms so that the 1uF capacitor is directly connected to the REF5025 output. This is required for stability (see figure 29 in the REF5025 datasheet). It is possible the REF5025 could be oscillating!

    Regards,
    Chris

  • Hi Christopher,

    I probe SCLK and DRDY near the MCU. Now I use the board MSP430-t5510 of Olimex (https://www.olimex.com/Products/Duino/MSP430/MSP430-T5510/open-source-hardware). So I use wire like this (https://www.olimex.com/Products/Duino/Breadboarding/JUMPER-WIRES/JW-110x10/) to connect my PCB with the ADC to the MSP430

    Concerning R7 in the schematics I use a buffer circuit with the OPA350 (Figure 26 of the ADS1255 datasheet) It's the 10k resistor at the input of the OPA350.

    When I have the problem /DRDY doesn't go high because there is a new conversion (The clock speed of SPI is 1 MHz and the datarate of the ADC is 100sps in this example).  It looks like after 18-19 bits the ADc stop to send me the data and /DRDY go high. But where are the missing bits ?

    I've an interrupt on /DRDY and I use the driverlib for the SPI

    // Interrupt on P1.2
    #pragma vector=PORT1_VECTOR
          __interrupt void Port_1(void) {
    
    	P1IFG &= ~0x04; 					// P1.2 Interrupt Flag cleared
    
    	
    	USCI_B_SPI_transmitData(USCI_B1_BASE, 0x00);
    	receive[0] = USCI_B_SPI_receiveData(USCI_B1_BASE);
    	USCI_B_SPI_transmitData(USCI_B1_BASE, 0x00);
    	receive[1] = USCI_B_SPI_receiveData(USCI_B1_BASE);
    	USCI_B_SPI_transmitData(USCI_B1_BASE, 0x00);
    	receive[2] = USCI_B_SPI_receiveData(USCI_B1_BASE);
    
    }

    Regards,

    Laurent

  • Hi Laurent,

    I recommend probing the SPI communication at the ADC pins as well, just so you know what the ADC is seeing. I would be particularly interested to see if there is any ringing on the SCLK pin...

    Prototyping boards and jumper wires can add many parasitic components to your circuit (inductance in particular). Digital signals may not work well when large ground loops are produced during prototyping. Try to route grounding wire as close as possible to the signal wires to reduce inductance! I have also seen someone on the E2E forums use tin foil to shield jumper wires; this significantly reduced the noise pick-up of the wires.

    Shielded twisted pair cables (with the shields grounded on both ends) is the best kind of wired connection you can use in your situation. The other ideal situation would be to have your whole circuit on a single PCB and make sure all traces were routed above a solid ground plane to keep the circuit loop area small!

    Laurent vanstraelen said:
    Concerning R7 in the schematics I use a buffer circuit with the OPA350 (Figure 26 of the ADS1255 datasheet) It's the 10k resistor at the input of the OPA350.

    It is okay to use this circuit, however, the REF5025 has the additional requirement for a 1uF capacitor connected to it's output. You would then need to add another 1uF capacitor before the 10kOhm resistor!

    Best Regards,
    Chris

  • Hello Christopher,

    At the end everything will be on the same PCB. For now I've taken shorter wire. I've also modified my program. I didn't use the Transmit interrupt flag and the Receive interrupt flag to receive data with the spi. Now I use it.

    The program is now running for one hour and still no error :-)

    Ok, I will add the 1uF capacitor.

    Another quick question about the calibration. I do the self calibration everytime I change the datarate and PGA . For the system calibration I must applied myself the calibration signal so it's a little bit harder to do that when the ADC is runing. Can do it only one time when I solder the ADc on the PCB or must I do it at every power up ?

    Regards

    Laurent

  • Hi Laurent,

    Glad to hear you're getting good data!

    Self-calibration will remove many of the ADC errors. System calibration will help remove the errors before the ADC.

    Changing the data rate and PGA should not affect any of the circuitry before the ADC, so self-calibration should be sufficient in that circumstance. The main thing to be concerned about is when those circuits may shift in offset and gain error. You may have increased system offset and gain errors on power-up (before the circuitry warms-up) and across temperature for offset and gain drift.

    It is fairly easy to perform system offset calibration (by using a switch to short both inputs to a mid-supply voltage). System gain calibration is more difficult because you need to have an accurate full-scale input voltage handy. Many times gain calibration is only performed in the lab where accurate supplies are available. If the system needs to operate in the "field", system gain calibration will only be performed once before "field" operation, and then periodically when the system is called back for re-calibration.

    Regards,
    Chris

  • Hello,


    Thanks for the information. Now I understand everythings about the calibration.

    I'm almost sure that my problem comes from the programmation of the MSP. No more problems come since the last post.

    Regards

    Laurent

  • Hello,


    Another question, When I do a system or a self calibration the same registers are changed (OFC and FSC). So when I do the self calibration I erase the value of my system calibration ?.

    I ask this quesiton because with a lab generator when I put 4V my ADC return 4.015V. 15 mV is a not negligible. So if the self calibration erase my system calibration I can still have some error due to my conditionning circuit ?

    Regards

    Laurent

  • Hi Laurent,

    A system calibration should always take precedence over a self-calibration (the system calibration will be more accurate). The self-calibration will not account for your signal conditioning error.

    If you need to perform additional calibration for a particular measurement, I recommend reading the OFC an FSC registers and saving this data so that you can restore it later.

    Hope that helps!

    Chris