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.

ADS1230: some time spike in ADS1230

Part Number: ADS1230

Hello Sir,

we are using ads1230 in our current project.

GAIN: 128 

SPEED: 10SPS

REFP: 2.5V

REFN: GND

code of ads1230 interface is on bit banging.

ADS1230 normal works ok. but some time give spike like 0x3FFF , 0x7FFF etc. reading.

I applied filter logic to remove this spike. stable weight filter removes this spike. but unstable weight unable to handle the spike.

I have attached the ads1230 code and schematic. 

 

 Please let me know what should I do?

 

char ADS1230_Read_Byte(void){

unsigned char i=8;
char rdybyte = 0;

while(i--){
rdybyte <<= 1;
ADS1230_SCLK = 1;
_nop_();
_nop_();
rdybyte = (rdybyte | ADS1230_DOUT);
_nop_();
_nop_();
ADS1230_SCLK = 0;
_nop_();
_nop_();
}
return rdybyte;
}

long ADS1230_Result(void){
long temp;
union adtemp{
long l_values;
struct{
char byte_Z;
char byte_H;
char byte_M;
char byte_L;
}adbytes;
}data ADRESULT;
EX0 = 0;
ADRESULT.adbytes.byte_Z = 0;
ADRESULT.adbytes.byte_H = ADS1230_Read_Byte();
ADRESULT.adbytes.byte_M = ADS1230_Read_Byte();
ADRESULT.adbytes.byte_L = ADS1230_Read_Byte();
ADS1230_SCLK = 1;/////
_nop_(); /////////
_nop_(); ////////
_nop_(); //////////
_nop_(); /////////////////
ADS1230_SCLK = 0; ////////
ADS1230_DOUT = 1; /////////
StarADFlag = 0;
temp = (long)(ADRESULT.l_values);
if(temp & 0x800000)
temp |= 0xff000000;
temp = temp / 16;
return (temp);
}

  • Hi Ajay,

    It would appear that there is some missing information in the schematic. It appears that the ADS1230 PDWN pin is connected to a micro. The PDWN pin must stay low for at least 10us after the supplies are at nominal operating voltage (see Figure 30 on page 19 of the datasheet). If you have the PDWN pin connected to a micro, I would suggest that you hold the PDWN pin low on power up, bring it high, and then pulse to make sure the ADS1230 has started properly.

    In the past we have seen issues with ferrites/inductance in the supply lines. This can sometimes cause issues on power up. Pulsing the PDWN may also help if there are power startup issues with your circuit.

    I see that you are using a voltage divider for the reference. This may seem like a good idea to increase the dynamic range, but this will also add some noise of the resistors and any drift of the resistors to your measurement. In the end you may be better off connecting the analog supply directly to the reference inputs to maintain a good ratiometric measurement.

    I see in your code that you are reading 3 bytes of data. The ADS1230 is a 20-bit device, so when reading 3 bytes you are sending additional clocks that issue an offset calibration which extends the length of time for each conversion cycle. As you are bit-banging, I would suggest that instead of issuing 3 bytes of data, that you issue a single command to read 20 bits of data and save the result to a signed 32 bit value.

    Also, you need to verify that the clock speeds are within the required limits. Scope or logic analyzer shots would be helpful to verify your timing. You also need to make sure that you read the data when DOUT/DRDY transitions from a high to low state. All data should be read from the device before the next end of conversion of the data may become corrupted.

    You are also using 2 different ground symbols. The analog and digital grounds should be connected together using a low-impedance connection.

    Best regards,
    Bob B