CE95272 does not work ... anyone know why?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

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

View solution in original post

0 Likes
6 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

This is my work sheet for calculating the ADC limits

Scott

0 Likes
Anonymous
Not applicable

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);

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

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

0 Likes