Hi,
We are using ADS1014 in our design in single differential mode. Two FSR output from an Op AMP is connected to AIN0 & AIN1 of ADS1014.
We have taken reference of ADS1015 driver from TI SDK 7.01 (Linux kernel 3.12) and ported to ADS1014. Following are the changes done in the driver.
//config |= (channel & 0x0007) << 12; commented Multiplexing configuration, since ADS1014 doesnt support Multiplexing
static const struct sensor_device_attribute ads1014_in[] = { SENSOR_ATTR(in0_input, S_IRUGO, show_in, NULL, 0), /*GH: As only one differential signal is connected to ADS1014, we limit the channel numbers to 1 */ // SENSOR_ATTR(in1_input, S_IRUGO, show_in, NULL, 1), // SENSOR_ATTR(in2_input, S_IRUGO, show_in, NULL, 2), // SENSOR_ATTR(in3_input, S_IRUGO, show_in, NULL, 3), // SENSOR_ATTR(in4_input, S_IRUGO, show_in, NULL, 4), // SENSOR_ATTR(in5_input, S_IRUGO, show_in, NULL, 5), // SENSOR_ATTR(in6_input, S_IRUGO, show_in, NULL, 6), // SENSOR_ATTR(in7_input, S_IRUGO, show_in, NULL, 7), };
Also, commented in1_input to in7_input, since we are using single differential input on ADS1014.
#define ADS1014_CHANNELS 1 -> Changed channels from 8 to 1.
Please let us know, if these changes are ok or something else needs to be changed for supporting ADS1014.
While testing, when force is not applied on FSR (RV1 & RV2) 0V is applied to AIN0 & AIN1 and ADC reading is 0.
When force is applied only on RV2, 2.5V is applied on AIN0 and 0V on AIN1 and ADC reading is measured as 2048.
However, when force is applied only on RV1 2.5V is applied on AIN1 and 0V on AIN0 and the ADC reading is measured as 129087. This reading seems to be wrong. Also, when both the FSR are pressed, ADC reading is measured as 129087. Ideally, when both the FSR are pressed, approximately same input voltage is applied to AIN0 & AIN1. However, ADC reading is measured as 129087. Please let me know, if I am missing something here. PGA is set to 2 and data rate as 4.
Please let me know, if the changes done to ADS1015.c for supporting ADS1014 is valid.
Attached the snapshot of FSR & ADS section herewith.
Request your help on this.