Kanopy(IIT_Kanpur)

LTC1859 Interfacing with Arduino Due in Bipolar Range

Discussion created by Kanopy(IIT_Kanpur) on Jul 16, 2018
Latest reply on Jul 18, 2018 by ghoover

Hello,

I am using Arduino Due board and trying to interface LTC1859 with it. 

Physical Connections are as follows:

 

AVDD, DVDD : Connected to 5V through 10uF (electrolytic) and 0.1uF (Ceramic) capacitor

OVDD : Connected to 3.3V through 10uF (electrolytic)

COM : Connected to GND

CH0 : Input

SDI : SPI  MOSI

SDO : SPI MISO

SCK : SPI SCK

CONVST : Pin 10

RD : GND 

All Grounds are common. 

 

And program is

 

#include <SPI.h>

#define CONVST 10 //IC PIN 28
#define BUSY 9 //IC PIN 22

 

// IC             UNO      DUE(SPI)
// SCK(26)    13            3
// SDO(23)    12            1
// SDI(25)      11            4

 

int k = 1;
byte x = 0; byte y = 0;   
word data[1000] = {0};  
float voltage = 0, avg = 0;


void setup() {
Serial.begin(115200);
SPI.begin();
SPI.setClockDivider(12);  
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
pinMode(CONVST, OUTPUT);
pinMode(BUSY, INPUT);
digitalWrite(CONVST, LOW);
Serial.print("setup done");
}


void loop() {
//record k ADC samples
for (int i = 0; i < k; i++) {
x = SPI.transfer(B10001000);  // Single ended input at channel 0, 0V to 5V range (See LTC185x datasheet p15-16)
y = SPI.transfer(B00000000);   // Filler

delayMicroseconds(2);   

//Trigger a conversion with a fast pulse
noInterrupts();
digitalWrite(CONVST, HIGH);
digitalWrite(CONVST, LOW);
interrupts();

//Wait for conversion to be finished
while (!digitalRead(BUSY)) {
}
delayMicroseconds(4);
data[i] = word(x, y);
Serial.print(data[i]);
Serial.print(" ");
}
delay(100);

 

for (int i = 0; i < k; i++) {
voltage = (float)data[i];
voltage = voltage / 65534 * 10;    //*5 for 0 to 5V and *10 for 0 to 10V
avg += voltage;


}
Serial.println(avg / k, 9);
avg = 0;
}

 

OUTPUT

for 0-5v Range

for -+5v Range 

 

 

for 0-10v Range

for -+10v Range

 

The IC- LTC1859 is performing accurately in the unipolar single ended range of 0-5v and 0-10v. But it is not responding in bipolar single ended range of -5v to +5v and -10v to +10v. In this range it is getting only 2.5v for -+5v and 5v for -+10v for any input. Any help would be appreciable.

 

Thanks.

Outcomes