Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AD7730 not calibrate

Status
Not open for further replies.

PathakS

Newbie level 3
Joined
Oct 2, 2017
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
79
Hello,
I am using AD7730 IC to read load cell data. I am trying to calibrate AD7730 ic using MV generator.The output range is 0 to 20 mV in unipolar mode.

The calibration procedure I have done is as follows:-
1) System zero scale calibration on 0 to 80mV range when Ain+ve and Ain-ve terminals are open. nothing will be connected here.after doing system zero scale calibration the value I get is 3mV.


Code dot - [expand]
1
2
3
4
5
// internal Full-scale calibration
  WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_INTERNAL_FULL_CALIBRATION| 
  MR1_BU_UNIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_RANGE_80MV|MR0_CHANNEL_1);
  while(!((P2IN&BIT0)==0)){} //wait for calibration complete
    __delay_cycles (200);


2) System zero-scale calibration on 0 to 20mV range.set "0" on mV generator.the value I get after system zero scale calibration is 0.02mV


Code dot - [expand]
1
2
3
4
5
// system zero-scale calibration
    WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_SYSTEM_ZERO_CALIBRATION| 
    MR1_BU_UNIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_RANGE_20MV|MR0_CHANNEL_1);
    while(!((P2IN&BIT0)==0)){}  //wait for calibration complete
      __delay_cycles (200);//200




3) System full scale calibration on no range selected.set "20mV" on mV generator.The value I get after system full scale calibration is 20mV


Code dot - [expand]
1
2
3
4
5
// system full-scale calibration
   WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_SYSTEM_FULL_CALIBRATION| 
   MR1_BU_UNIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_CHANNEL_1);
   while(!((P2IN&BIT0)==0)){}  //wait for calibration complete
      __delay_cycles (200);



The value I get during Zero scale calibration is 0V and during full scale calibration is 20mV.
after performing calibration I am trying to read voltages from 0 to 20mV which is set on mV generator but the value I get in resistor are different.
When I set 11.80mV on mV generator in resistor I get 0xFFFFFF ( 20mV).It means instead of showing 0xFFFFFF on 20mV it will shows on 11.80mV.

Calculations:-
LoadCellData = ReadData();
LoadCellData1=LoadCellData;
milivolt1 = (LoadCellData1*20)/(2^24);
Please help me where I am going wrong??
 
Last edited by a moderator:

Hi,

Post a schematic and where you connected the mV generator and where you read the values.
Also, power supply, reference...frequencies...and all other informations that are important to run the IC.

Klaus
 

Hello Everyone,
I make some changes in hardware design:-
1) POL pin tie to Ground instaed of connecting to GPIO pin of microcontroller.
2) RESET pin is connected to +3.3VDC instead of connecting to GPIO pin of microcontroller.
3) Unused pins (AIN2(+)/D1,AIN2(-)/D1,ACX,ACX')are connecting to AGND.

-Reset the adc by writing 32 times 1's in ADC


Code C - [expand]
1
2
WriteRegister(CR_SINGLE_WRITE,4,0xFFFFFFFF);
    __delay_cycles (200);



-I can successfully read default value of register after reset the adc.
-I just did internal full scale calibration on 80mV, then internal calibration on 0 to 20mV range and write gain and offset register in AD7730( The Gain and offset registers are read it during calibration mode,
-I followed exact calibration procedure for 0 to 20 mV range as per given in datasheet but outut is unstable.it keeps jumping up and down(for ex for 0.02 mV I got 0.04 to 0.08 mV ).
-I just want stable and correct output. I am attaching screenshot of readings which I have taken and code for your reference.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*  this setup is for data out rate of ADC is 50 Hz for calibration only,Chop mode filter enable, skip off and fast off
      * Internal full scale calibration for unipolar input,24 bit data mode,5V reference,channel 1
      * Internal zero scale calibration for unipolar input,24 bit data mode,5V reference,channel 1
 */
    /*internal calibration*/
    WriteRegister(CR_SINGLE_WRITE|CR_FILTER_REGISTER,3,FR2_SINC_AVERAGING_2048|FR1_SKIP_OFF|FR1_FAST_OFF|FR0_CHOP_ON);
    __delay_cycles (1000);
 
    WriteRegister(CR_SINGLE_WRITE|CR_DAC_REGISTER,1,DACR_OFFSET_SIGN_NEGATIVE|DACR_OFFSET_NONE);
    __delay_cycles (200);
 
    WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_INTERNAL_FULL_CALIBRATION| MR1_BU_UNIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_RANGE_80MV|MR0_CHANNEL_1);
    while(!((P2IN&BIT0)==0)){} //wait for calibration complete
    __delay_cycles (200);
 
WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_INTERNAL_ZERO_CALIBRATION|MR1_BU_UNIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_RANGE_20MV|MR0_CHANNEL_1);
    while(!((P2IN&BIT0)==0)){} //wait for calibration complete
    __delay_cycles (200);
    
    // write offset register
    WriteRegister(CR_SINGLE_WRITE|CR_OFFSET_REGISTER,3,0x800010);
      __delay_cycles (200);
      
    // write gain registers
    WriteRegister(CR_SINGLE_WRITE|CR_GAIN_REGISTER,3,0x65DD20);//592035   65DD20
    __delay_cycles (200);  
    WriteRegister(CR_SINGLE_WRITE|CR_FILTER_REGISTER,3,FR2_SINC_AVERAGING_100|FR1_SKIP_OFF|FR1_FAST_OFF|FR0_CHOP_ON);
    __delay_cycles (1000);
    WriteRegister(CR_SINGLE_WRITE|CR_MODE_REGISTER,2,MR1_MODE_CONTINUOUS|MR1_BU_BIPOLAR|MR1_WL_24_BIT|MR0_HIREF_5V|MR0_RANGE_20MV|MR0_CHANNEL_1);
while(!((P2IN&BIT0)==0)){} //wait for device ready for conversion    spi_tx(CR_CONTINUOUS_READ_START|CR_DATA_REGISTER); //read continuous data mode



Does anyone have idea about what to do to get stable readings. Is there any mistake to write in filter register(filters which I have set are correct??)

IMG20190723221236.jpg
 

Attachments

  • IMG20190723221236.jpg
    IMG20190723221236.jpg
    498.9 KB · Views: 140

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top