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 with PIC16F877A.

Other Parts Discussed in Thread: ADS1230

Hello Sir,

      First, Thank you for the great support..In my previous mail actually i meant "x weight"(some unknown weight approximatly above 1 kg) and not "x wait".[SORRY for the mistake i  had made].Unfortunately, i do nt hv osciloscope to view output pulse from ADS1230.Actually in my improved code i m applying 23 SCLK  ,when DRDY/DOUT goes low.And this routine continues for  " four times",whenever DRDY/DOUT goes low.( i just want to do this to skip the data from DOUT , till the " Digital Filters" get settled and wait for the 5th low pulse from DRDY/DOUT).And i valid the data only after the 5th low pulse from DRDY/DOUT.This routine will only  continue, if there is a abrupt change in "input".Is my procedure correct...?...Please help..i m adding  my outline of the program routine..thanks IN ADVANCE..............by 

                                     Ajith.

PWDN=1;                     //Power down of ADC

for(;;){                              //infinite loop 

while(DOUT){              //waiting for DRDY/DOUT to become low,first time

NOP();

}

clock_23pulse( );        //sending 23 dummy SCLK(serial clock)    

while(DOUT){              //waiting for DRDY/DOUT to become low,second time

NOP();

}

clock_23pulse( );   //sending 23 dummy SCLK(serial clock)  

while(DOUT){         //waiting for DRDY/DOUT to become low,third time

NOP();

}

clock_23pulse( );  //sending 23 dummy SCLK(serial clock)  

while(DOUT){       //waiting for DRDY/DOUT to become low,fourth time

NOP();

}

clock_23pulse( );  //sending 23 dummy SCLK(serial clock)  

while(DOUT){  //waiting for DRDY/DOUT to become low,fifth time

NOP();

}

data=clock_valid_pulse( );   /// Now the data from DOUT is valid

}                //end of the infinite loop

 

 

  • Hello Sir,

             My output in the 7 segment display is stable now.I am measuring positive reading from 6kg load cell.But the output is showing like this..0xFE, 0xFFE, 0xFFFE, 0x1FFFE, for every 'x' wait added on load cell.Why this happens.Where i missing the codes in between each readings... Please Help..Thanks in ADVANCE...........by 

                                                                          Ajith

  • Ajith,

    I am confused by what you are asking.  What do you mean by 'x' wait?  You should always be reading 20 bits of data each time.  You need to verify with an oscilloscope that the data output from the ADS1230 is matching the software value that you see as you are converting a binary value to an integer.

    If by 'missing the codes' you mean less than 20-bits of data, you need to verify that your code is working as it should be.  Your code value should always represent 20-bits.  So do you mean to say that 0xFE is a positive value representing 0x000FE?  As I remember from your code, your throw away 4 results in each loop, is this the 'missing the codes' you are talking about?

    Best regards,

    Bob B

  • Ajith,

    The procedure appears to be correct.  Have you calculated the expected code for the voltage (weight applied) to see that the code is matching what you think you should be getting?

    Best regards,

    Bob B 

  • Hello Sir,

         My ADS1230 with PIC16F877A is working fine.(Thanks for your great feed back)....I want to clarify some doubt regarding the hardware setup.Please Help..

    1.Which is the most suitable bypass capacitor for ADS1230.In datasheet page no: 10, they  preferred poly capacitor(0.1uF).why tantalum capacitor is not recommended.(if there any chance for future complaint,if i use poly capacitor as bypass capacitor.)

    2.In some ADC boards they used to cover the ADC ic with some hard gel type substance.Can i used this gel  to cover the ADC,will this affect the performance of ADC?.What is, its advantage.

    3.Which are the major faults that ADS1230 may obtain,and how to avoid faults.

    Please send your valuable suggestions.....

     Thanks IN ADVANCE 

                                                      by Ajith

  • Ajith,

    For bypassing a MLCC (ceramic chip) capacitor of 0.1 to 1uF is used for bypassing of the supplies.  This is used because of the very low ESR and ESL .  Poly caps are used on the analog stages as they are very quiet.  This includes the cap that is applied across the CAP pins of the ADS1230.  Mica could also be used but they tend to be very physically large.  You could use a poly for bypassing, but this tends to be an expensive solution for bypassing.

    Sometimes an encapsulation materiel is placed over the ADC to keep moisture out of the circuit.  This may also help thermal affects to some degree as well.

    The largest problems that may be encountered with the ADS1230 is noise, ESD, EMI/RFI and drift.  Obviously good circuit design and PCB layout will help you achieve good performance.  Using low noise supplies will also help.

    Best regards,

    Bob B

  • Hello Sir,

      First ,Thank you for your great support...In my project interfacing ADS1230 interfacing PIC16F877A,I m converting the counts into weight using the formula..

    long data=((adc count - zero count  -tare count) * (calibration weight) / (span count - zero count))

    For " tare count"  which value should i take. In my program i  take the "tare count " = "(adc count - zero count)",  Its working but the problem is when the" adc count" is  reading negative value(i.e. adc count < zero count) i read the data using the formula

    long data=((zero count - adc count - tare count) * (calibration weight) /(span count - zero count))..........,  but the tare value remains the same(i.e. tare count = (adc count - zero count). .so the value (zero count - adc count - tare count) remains in negative value,so i m unable to read the value,when the value "adc count" goes less than "zero count".

    So how to solve this problem,how to provide the correct tare system in my unit.

    My output shows some value around '5000' without load=zero count.

    if i put the weight around 1 kg for calibration it shows the value '8000'=span count and 

    adc count = 'updated adc readings'.

    (The values provided are approximate)

    Please Help me to solve this problem,,i m waiting for your valuable suggestion. Thanks IN ADVANCE

         by  Ajith.

  • Ajith,

    Part of the problem is the way you structured your formula.  The adc_count should always be the highest value, but you subtract it from the zero_count in the 'negative' case.  So you need to swap those two values.  I'm having a little trouble interpreting some of your nomenclature.  For example, span_count to me would be a difference and not a measured code value.  It looks to me that span_count is the calibrated weight return code.

    So let's look at this in steps.  To do a two point calibration you need a minimum value and a maximum value.  The minimum value is the no weight condition (cal_min).  The maximum value is with the calibrated weight added (cal_max).  So the calibrated slope is equal to the calibrated weight divided by the difference of the cal_max and cal_min (1000/(cal_max - cal_min).

    The cal_min is the no weight code value, so you need to subtract that reading from any measurement (ADC_result - cal_min).  The actual weight in grams will be the result code minus the no weigh code times the slope ((ADC_result - cal_min) * (1000/(cal_max - cal_min)).

    The above formula does not take into account TARE.  If you place an empty container on the scale, you would want to remove that weight from any measured contents so you would remove that resultant reading.  TARE is the difference in the no weight code and the code you now want to make as the zero point (TARE = ADC_result - cal_min).  For the final measurement you will want to remove the TARE value from the end result ((ADC_result - cal_min - TARE) * (1000/(cal_max - cal_min)).

    You should not be seeing the ADC_result less than the cal_min, but if you do then you need to add the tare value instead of subtracting it as the ADC_result is now less than cal_min.  I hope that explains the equation a little better and the values you should be using. 

    Best regards,

    Bob B