Configuring and using the AD7172-4

Hi All

I have been trying to configure and use the AD7172-4 for about a week now and am not having much luck.

My Setup

  • Communicating with an PIC24 device - SPI signals look good. Viewed with a scope and edges look correct. Also reading registers back from the device appear correct.
  • AVdd1 = 5V
  • AVdd2 = 3.3V
  • IOVdd = 3.3V
  • PIC24 is at 3.3V
  • Caps on supply lines as suggested by datasheet.
  • Ref+ = 2.5V
  • Ref- = (A)GND
  • Tested input values 0.25V, 0.35V & 0.5V using millivolt source

I have tried two different setups.

  1. My own setup/configuration, from looking at the datasheet.
  2. One from register values specified by the AD7172-4 Eval+ software (used is simulation mode). In this, the physical input pint AIN5 is routed to analogue channel 3, which is set to use setup config1. The simulation seems to be correct.

I am using Single Conversion mode. After the conversion I am waiting a fixed amount of time before polling the status register to see if conversion is done. Please note that I am only doing this during testing, as I know waiting for a fixed time will not be practical in my final application. 

On a side note, I was initially polling the MISO pin (with CS high) at the PIC end to see it go low to indicate a completed conversion, however, when I probed it with a scope, this line seemed to decay over a (longish) period of time, rather than just drop as I would have expected. Unfortunately, I did not record the decay time. 

I am then looping through the 'Single Conversion - Wait - Poll - Read' sequence 1000 (now particular reason, also tried 1500) times, then instructing the PIC program to stop on a breakpoint. 

Now what I am seeing is the last read value seems to vary dependant on the my wait duration. The longer the wait duration the higher the value read. Furthermore, the value seen actually seems independent of the actual voltage applied at the input. At 100ms delay, the read value appears to be around 0.5V regardless of the input voltage. 

While I know it is virtually impossible for anyone to tell me what is wrong without actually seeing my configuration in detail, I would like to know if anyone has had a similar experience and seen similar effects? Or, if anyone could provide any suggestions. 

I think I have mostly exhausted possible issues with the configuration of the device and now am considering it to be a hardware issue.  

Thanking you in advance.

Chithambaram

Parents
  • Hi Jellenie,

    Thank you for your continued support. 

    Yes, I am getting the correct value on the reference line, 2.5 V.

    I have also being trying a few other things in order to check the basics. I have configured the device to use both (Ref+/Ref-) and (AVdd1/Vss) as references and the ((AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)-) & (Ref+/Ref-) in inputs. Essentially avoiding separate external measurement inputs. 

     

    I have tried three combinations of the above inputs and reference (the one missed out was (Ref+/Ref-) as both reference and input, the this would not theoretically work).

     

    In the other combinations, the value predicated by the evaluation software (in simulation mode) and my prototype hardware matched, however it was half what I was expecting. Furthermore, the value 'created' by using (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)- as the channel input seemed to change dependant on the reference, while AVdd1 and Vss remain the same. Is this normal?

     

    As this was showing fairly sensible values (baring the factor of 2 error), I re-configured the device for an external input.

    Initially this did not work, however when I tried a different input pin, the values now seem sensible.

     

    Please note, that I previous did try all the input pins, however at that point there was no guarantee that the rest of my configuration was correct. So it looks like I either have broken the Ain5 input or there is a problem with the soldering on my prototype board. My final boards should be in shortly and hopefully Ain5 will work in them.

     

    So at the moment I, hopefully, only have the issue of why the value 'created' by using (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)- as the channel input seemed to change dependant on the reference, while AVdd1 and Vss remain the same. 

     

    AVdd1 is 5 V and Vss is 0 V, so am I correct in thinking that the value presented the the ADC should be 2 V?

     

    However what I am seeing the following:

     

    When reference is set to AVdd1 & AVss and input is set to (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5), both the hardware and simulation shows 0.5 V.

    When reference is set to  Ref+ & Ref- and input is set to (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5), both the hardware and simulation shows 1 V.

     

    Would you also have any suggestions for the factor of 2 error I have been seeing, when reference is set to AVdd1 & AVss and input is set to Ref+ (i.e. 2.5 V) & Ref- (0 V). In the case both the hardware and simulations shows 1.25 V.

     

    In all cases, AVdd1 is 5 V and AVss is 0 V.

     

    Thank you in advance.

     

    Chithambaram

     

     

Reply
  • Hi Jellenie,

    Thank you for your continued support. 

    Yes, I am getting the correct value on the reference line, 2.5 V.

    I have also being trying a few other things in order to check the basics. I have configured the device to use both (Ref+/Ref-) and (AVdd1/Vss) as references and the ((AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)-) & (Ref+/Ref-) in inputs. Essentially avoiding separate external measurement inputs. 

     

    I have tried three combinations of the above inputs and reference (the one missed out was (Ref+/Ref-) as both reference and input, the this would not theoretically work).

     

    In the other combinations, the value predicated by the evaluation software (in simulation mode) and my prototype hardware matched, however it was half what I was expecting. Furthermore, the value 'created' by using (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)- as the channel input seemed to change dependant on the reference, while AVdd1 and Vss remain the same. Is this normal?

     

    As this was showing fairly sensible values (baring the factor of 2 error), I re-configured the device for an external input.

    Initially this did not work, however when I tried a different input pin, the values now seem sensible.

     

    Please note, that I previous did try all the input pins, however at that point there was no guarantee that the rest of my configuration was correct. So it looks like I either have broken the Ain5 input or there is a problem with the soldering on my prototype board. My final boards should be in shortly and hopefully Ain5 will work in them.

     

    So at the moment I, hopefully, only have the issue of why the value 'created' by using (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5)- as the channel input seemed to change dependant on the reference, while AVdd1 and Vss remain the same. 

     

    AVdd1 is 5 V and Vss is 0 V, so am I correct in thinking that the value presented the the ADC should be 2 V?

     

    However what I am seeing the following:

     

    When reference is set to AVdd1 & AVss and input is set to (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5), both the hardware and simulation shows 0.5 V.

    When reference is set to  Ref+ & Ref- and input is set to (AVdd1 - AVss)/5)+ & (AVdd1 - AVss)/5), both the hardware and simulation shows 1 V.

     

    Would you also have any suggestions for the factor of 2 error I have been seeing, when reference is set to AVdd1 & AVss and input is set to Ref+ (i.e. 2.5 V) & Ref- (0 V). In the case both the hardware and simulations shows 1.25 V.

     

    In all cases, AVdd1 is 5 V and AVss is 0 V.

     

    Thank you in advance.

     

    Chithambaram

     

     

Children
No Data