6 Replies Latest reply on Sep 7, 2018 4:29 AM by vsrs

    CE95272 does not work  ... anyone know why?

    scott_2272156

      I have been trying to run an application CE95272 on my CYCKIT-043 that uses SAR ADC and interrupts on a limit detection.  I saw one discussion on this same subject but there was never an answer as to why it was not operating. Could i get some help in using this type of approach in a similar design i am trying to do.  I am only wanting to measure current in a sense resistor and voltage on my power buss.  I will attach my project (CE95272) for review.

       

      For me i never see an accurate measurement ... say i put in 20mV i should see 200mV on Uart to PC Screen.  This never happens it either runs continuously reading and displaying the wrong values.

       

      Scott

        • 1. Re: CE95272 does not work  ... anyone know why?
          user_242978793

          I am confused just where are you applying the 20mV to?  You said that all you want to do is measure the current on the sense resistor and voltage on your power buss.  That is what the example does.  Are you adding extra resistors to measure another current? Are you using low noise resistors with high tolerances? If your setup is different that the example PDF please give us your setup.

          • 2. Re: CE95272 does not work  ... anyone know why?
            scott_2272156

            My setup is exactly like CE95272 ... i am using the same values, basically the instrumentation amplifier is set for a gain of 10.  So if i put in 20mV I am supposed to read 200mV out of the differential amplifier but all is see is basically noise.   I also noticed in another post someone else with this same issue and it was never resolved.  Yes I do have .01% resistors in my setup (expensive little buggers!).   In the same circuit i have an additional  input that is single ended measuring battery voltage and it works perfectly.  So i am confused as to why i only see noise.  Its if as if the two op-amps are not connected or not configured right.  Any way i would sure like to understand whats going on to fix this issue so i can get my circuit operating.  FYI i down loaded CE95272 project from Cypress with all the same connections and i still get the same problem!  The only difference is i am using CY8Ckit - 043.  The down load i attached earlier has my exact pin-outs i used.

             

            FYI to answer your question i am applying the 20mV to the pre-amp inputs on the two opamps.

             

            thanks for the assistance

            Scott

            • 3. Re: CE95272 does not work  ... anyone know why?
              scott_2272156

              OK .... I found my issue and it was when i did a build, the complier if thats the right word for it, moved my Out_2 pin to a different pin.  I moved it to the proper pin (and locked it!) and it is now working and tripping on the right voltages.

               

              However with my C being moderate at best, can someone aide me as to why the UART on channel one displays the input voltage and not the output voltage?

               

              For Example:

              When I put into the input 25mV or 75mV the LED come on indicating a value of 250mV or 750mV which is with in the limits settings of the ADC configuration. The settings of the ADC are at 1F4 and 5DB in Hex.  According to my calculations these settings are correct for 250mV and 750mV.  Yet the UART only displays the input voltage ... this confuses me can this be explained.

               

              Scott

              • 4. Re: CE95272 does not work  ... anyone know why?
                scott_2272156

                This is my work sheet for calculating the ADC limits

                Scott

                • 5. Re: CE95272 does not work  ... anyone know why?
                  scott_2272156

                  In an effort to try to solve this question my self  ... is there anyone who can tell me were to locate information as to this code in CE95272.  there is no referance to this API in the ADC_SAR-Seq data sheet.  i also looked at AN68403 and there is no referance there either.  I am trying to find out why i am getting the right conversion reading.  I belive the limit values are correct but i do not understand how the conversion get done properly.

                   

                  Below is the code in question

                   

                   

                      /* Start ADC conversion */

                      ADC_StartConvert();

                      /* Calculate gain for the first channel */

                      adcGain = (((int32)ADC_SAR_WRK_MAX_12BIT * ADC_10MV_COUNTS) +

                                ADC_DEFAULT_VREF_MV_VALUE) / (ADC_DEFAULT_VREF_MV_VALUE * 2);

                      adcGain *= GAIN;

                      ADC_SetGain(CHANNEL_1, adcGain);

                  • 6. Re: CE95272 does not work  ... anyone know why?
                    vsrs

                    Hello Scott,

                     

                    If you see the ADC_CountsTo_mVolts API you can see that the API removes adc_gain( stored in ADC_countsPer10Volt) factor  and actual voltage is returned. That is why you are seeing the actual voltage given as the input.

                     

                    Best Regards,

                    VRS