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.

ADS1218: Data output problem

Part Number: ADS1218

Hello,

I was interfacing ADS1218 ADC with microcontroller Arduino UNO with SPI clock of 1MHz using oscillator of 4MHz. I was able to get the data when I have applied constant DC signal, varying signal to channel (AIN0,AIN1: differential mode) at different sampling rate (up to 100sps and corresponding decimation ratio). But after 1month I have checked again while applying similar sets of input with same code (first writing to registers and reading the registers and then wait for DRDY ,RDATA command then reading data from ADC), when I am reading the registers settings all 16 registers are reading FF values and further no data is coming.  Please suggest me what can be the possible solution.

Thank you

Regards

Sushmita Chaudhary

  • Hi Sushmita Chaudhary,

    As you are using a prototyping setup that was previously working, make sure all connections are appropriately connected.  At the ADS1218 device pins make sure that there is a good AVDD and DVDD supply voltage with respect to AGND and DGND.  Also make sure that the RESET, PDWN, and DSYNC pins are high.  Verify that the POL pin is set appropriately for the SPI SCLK mode you are using and that all SPI communication signals are present.  And lastly verify that the XIN pin is actually getting the 4MHz clock.

    Best regards,

    Bob B

  • Hi Bob,

    AVDD and DVDD supply voltages are fine as well as AGND and DGND. RESET, PDWN, and DSYNC pins are also high. POL pin is set appropriately for the SPI SCLK mode. But Xin is not reading 4MHz , SCLK pin (fosc: )  is also not reading 1MHz now as measured from oscilloscope. Whether it is a crystal oscillator problem?

    Thank you

    Regards

    Sushmita 

  • Hi Sushmita,

    Can you send me a schematic showing how you have the ADS1218 connected?  I really can't help troubleshoot what you are doing without a schematic of how things are powered and connected.  Are you providing the master clock from an attached crystal (connected between XIN and XOUT), from an external oscillator (connected to XIN) or are you providing the clock from another source (like the UNO)?  The ADS1218 will not work without a clock.  The SPI clock comes from the UNO.  Maybe attaching a picture of your setup would also help.

    Best regards,

    Bob B

  • Circuit schematic.pdf

    Hello Bob,

    I have attached the schematic of my circuit. The master clock is provided using an external crystal of 4MHz connected between Xin and Xout and a necessary 20pF capacitor. SPI clock of 1MHz (minimum SCLK period is 4*tosc =1MHz as per datasheet)  is coming from UNO (clock is 16MHz) by dividing the Arduino clock by 16 using the SPI.setClockdivider function in the software.

    I also have one doubt also if suppose the master clock oscillator (4MHz) is damaged and if I provide an SPI clock from Arduino (let's say 4MHz) to the Xin pin of ADC (that is SPI clock and XIN both inputs are 4MHz)then DRDY should always toggle right?

    Thank you

    Regards

    Sushmita

  • Hi Sushmita,

    If both AVDD and DVDD are at nominal operating voltage and PDWN and DSYNC pins are pulled high the device should start operating if the crystal starts to oscillate.  20pF cap loading is probably too large a value to start oscillation.  Are you using a PCB for the ADS1218 circuit?  The crystal needs a low impedance connection, so if this is a prototype situation with a bunch of wires, then it may be difficult for the crystal to start oscillation.

    You really can't use the same clock for both SPI and master clock.  The master clock must be continuous and the SPI clock requires that there are some delays between commands and data.  If there is another clock pin available on the Uno that can be used to drive the master clock (XIN pin) at 4MHz then that would be easier than you could use the same 1MHZ clock for the SPI.

    Another option would be to use a separate oscillator clock source instead of the Uno or the crystal.  These are self-contained crystal oscillators with usually a CMOS output that can directly drive the XIN pin.

    Best regards,

    Bob B

  • Hello Bob,

    I am using PCB for my circuit. and all the components are SMD-based, there are no bunch of wires. I have ordered the crystal oscillator also.

    Without connecting ADC to Arduino to check timer function: I have made software modifications in which I have made timer operation to generate 4MHz frequency on one of the pins of Arduino and SPI clk is from SCLK of Arduino (1MHz). So in an oscilloscope, I am able to get both waveforms on the Timer pin and SCLK pin.

    With connecting ADC to Arduino:  After this, I connected the ADC Xin pin to the above timer pin (4MHz) and SPI pin of both ADC and Arduino. After uploading the modified code, I checked the DRDY status in an oscilloscope, it was not toggling at all, it is showing always high on an oscilloscope. Xin pin was showing 4MHz clock pulses but the SCLK pin was showing a random waveform (not an 8 pulses waveform).

    When I did not connect ADC at that time SCLK pin was showing 1MHz frequency with 8 clock pulses and the timer pin was showing 4MHz frequency.

    What can be the possible reason?

    Thank you

    Regards

    Sushmita

     

  • Hi Sushmita,

    I reviewed the schematic again and one thing I missed was BUFEN pin.  The BUFEN pin should not be left floating.  If you don't intend on using the buffer then the pin can be tied low otherwise it should be tied high.  This however should not effect your communication.

    If both of the supply pins are nominal operating voltage, and the RESET, PDWN and DSYNC pins are pulled high, then with the clock provided the DRDY should toggle. 

    One thing you can verify is orientation and direction of your pins for the ADS1218 for the PCB footprint.  I have seen instances where the footprint follows the wrong direction which will place the connections in the wrong places on the ADS1218.  It is also possible that the part has become damaged and does not respond correctly.  Where did you get the ADS1218?  We have seen some past instances of counterfeit parts.  Would it be possible for you to send me a picture of your setup?

    Best regards,

    Bob B 

  • Hello Bob,

    In my case, the BUFEN pin was floating but it will not affect SPI communication or DRDY status, right? 

    From TI products, we have bought this ADC. I have ordered the new 4MHz oscillator and will get it within 4-5 days, If this also does not work I will replace the ADC. I have attached a picture of my setup. 

     ADC part no: ADS1218Y/150 

    What will be the better suggestion whether to replace the  ADC with the new part ADS1218 or to buy another part number other than ADS1218 so as to avoid the repeat problem?

    Thank you

    Regards 

    Sushmita Chaudhary

  • Hi Sushmita,

    BUFEN pin will not prevent communication to the ADS1218.  I think a good part of the problem is you are using a trace connected PCB with a 2-layer PCB with no real ground plane.  Most likely this is the issue with the crystal not starting up.  It is possible to use a 2-layer board, but not without some improvement.  Also, if you are providing an external clock you should not have both the external clock and the crystal connected at the same time.  Regarding PCB layout take a look at this FAQ.

    From the picture it is not clear if power is being supplied to AVDD/AGND.  It also appears that the RESET pin is floating, as there is no evidence that anything is connected to that point.  I think there is still lots of troubleshooting of your current board before making any additional changes.  Can you send me the gerber files for the board so that I can review all of the connections top and bottom-side of the board?  Also, can you tell me what each of the colored wires are connecting to/from on the board?  I would be glad to help resolve the issues you are having, but I need more information.

    Best regards,

    Bob B