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.
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
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?
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.
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 */
/* 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;
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.