This is in regard to using the Band Gap Voltage (Vbg) to improve the ADC readings in regard to variation in the reference supply (Vref or VDD). We are implementing it to make such improvements, however we can't spend much CPU time on this function.
The reference manual simply states that:
"In order to compensate for VDDA reference voltage variation in this case, the reference voltage
is measured during production test using the internal reference voltage VBG, which has a narrow variation
over temperature and external voltage supply. VBG is mapped to an internal channel of each ADC module."
This does not clarify for what "reference voltage variations" compensation can occur.
From some statements by NXP personnel and from comments out of the sample code provided in "S12ZVC192-Voltage_measurement-CW106" it is clear that using Vbg on the ADC samples can compensate for low supply voltages causing Vref-VDD to be less than 5 volts. We do not need this, we need compensation for other variations.
So the question that we have is, Can the recommended use of Vbg provide SOME compensation for the following:
We are not looking for any guaranteed amount of correction or improvement. The answer to this question will drive our design to only read Vbg once each power up or some continuous readings of it during application operation (Of course, using EEPROM we may even only read it once for each device in our ECU module factory)
Solved! Go to Solution.
Hello Jim,
I am sorry for my inaccurate reply.
Yes, the recommended use of Vbg provide reference voltage compensation for the following:
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jim,
Yes, the variation of VDDX(VDDA, VRH-VRL) voltage in device temperature and Variation from one S12ZVM device to the next may be partially compensated by additional Vbg measurement.
Why partially?
The Vbg reference voltage has a narrow variation over temperature and external voltage supply, but it is still not constant. The Vbg is measured during production test and the test voltage source cannot keep absolutely the same voltage for all the time. But the accuracy of test equipment is definitely still better than an internal voltage regulator.
For maximum accuracy, the Vbg measurement for channel correction has to be as close as possible to channel measurement in the timeline.
The temperature will probably not change very fast, but the VDDX may change very fast for example in the case of switching big load.
Anyway, we should not switch any pin during voltage measurement for best accuracy, however, this may be difficult to manage in real systems.
The example of next source reference voltage variations may be an injection current. This can influence voltage regulator especially in low power modes when injected current is close or bigger than load current (However, we typically do not measure in low power mode).
Currently, I cannot see any advantage in proposed solution with EEPROM. We should use current values for compensating current error.
Idea: I would like to recommend calculate this compensation in integer (fractional) type values instead of using float type as in my "S12ZVC192-Voltage_measurement-CW106" example code. This may significantly reduce computing time.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Radek,
This answers does provide the information and confirmation that we need.
Yes we are using integer (fractional) type values and the Motor Control Library (Math Library) provided by NCP-Freescale.
We are implementing compensation more often than just power up and considering when PWM motor drive is off or low and stable.
Regards, good day,
Jim Williams
Hello Jim,
I am sorry for my inaccurate reply.
Yes, the recommended use of Vbg provide reference voltage compensation for the following:
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------