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.

ADS8681: Problems to read data from ADS8681

Part Number: ADS8681

Hello, There ! 

In one of the my project, I am trying to communicate ADS8681 with Arduino Mega-2560 using SPI Mode. On oscilloscope, getting the correct waveform across SPI pins of Arduino, but when trying to read (+- 10V) Analog data range and it shows correct 16-bit variation on variable input at display module (LCD). But Whenever removed the input (No Load at Transducer) it gives random values instead of "0". I would be grateful for any advice how to receive suitable data.  

Following picture shows corresponding waveform when there is input for (Load at Transducer) for ADS8681 

Following picture shows corresponding waveform when there is no input (No Load at Transducer) for ADS8681 

References which i used :

1] ADS8681: Configuration Issues

2] ADS8691:  how to read register value of bit[0:15]

3] ADS8689: 32 bits register reading command sequence

4] ADS8681: Problems to configure ADS 8681 to a Arduino MKW 1010 Wifi via SPI

5] ADS8681

Source code :

#include <SPI.h>
#include <LiquidCrystal.h>

#define SS 53    
#define SCK 52   
#define MOSI 51  
#define MISO 50  

uint16_t receivedVal16 = 0 ;

LiquidCrystal lcd (38,37,36,35,34,33);

void setup()
{
 lcd.begin(16,4); 
 SPI.begin();                  
 SPI.setBitOrder(MSBFIRST); 
 SPI.setDataMode(SPI_MODE0);

 digitalWrite(SCK,OUTPUT);
 digitalWrite(MOSI,OUTPUT);
 digitalWrite(SS,OUTPUT);
 digitalWrite(MISO,INPUT);  
 
digitalWrite(SS, HIGH); //Write RANGE_SEL_REG
delay(10); 
digitalWrite(SS,LOW); 
SPI.transfer(0xD4);
SPI.transfer(0x14);
SPI.transfer(0x00);
SPI.transfer(0x01);

digitalWrite(SS, HIGH); //Write DATA_OUT_CNT_REG
delay(10); 
digitalWrite(SS,LOW);
SPI.transfer(0xD4);
SPI.transfer(0x10);
SPI.transfer(0x41);
SPI.transfer(0x00);
}

void loop() 
{
digitalWrite(SS, HIGH); //Write RANGE_SEL_REG
delay(10); 
digitalWrite(SS,LOW);
SPI.transfer(0xD4);
SPI.transfer(0x14);
SPI.transfer(0x00);
SPI.transfer(0x01);


digitalWrite(SS, HIGH); 
delay(10); 
digitalWrite(SS,LOW); 

receivedVal16 = SPI.transfer16(0x00);  
lcd.setCursor(0,1);
lcd.print(receivedVal16);

delay(100);
}

  • Hi Intersense,

    When you said 'No Load at Transducer', does this mean your ADC input has been completely disconnected? Is there any front-end components including amplifier at your ADC input? 

    If there is no any amplifier or other components at the ADC input, the ADS8681 should output a ~2.2V code for +/-10.24V range when the input floats physically. Please refer to my explanation in the following post. However,  the code you are showing for No Load at Transducer above is 0xD414 which indicates a 6.7V voltage on the ADC input. Therefore, your schematic will be very helpful to address the issue. 

    ADS8681EVM-PDK:  Analog Input Circuit

    Best regards,

    Dale

  •  Thank You for your response ! 

     'No Load at Transducer', It mean that connected transducer at the input of ADS8681 at initial/normal position of transducer (-10V at that time). When we are varying the input using transducer from -10v to +10v  in that case display shows correct variation (from 0 to 65,535) but when going from -10v to +10v it shows random value (65,535 to random value) instead of showing it "0". 

  • Hi Intersense,

    When you said "going from -10v to +10v", do you mean you are switching from -10V to +10V directly? like a step response as an input to the ADC? I would ask again, is there any other component between the transducer and ADC input? the schematic will be helpful.

    Regards,

    Dale