I'm using the internal ADC in the LPC54018.
I started with the included driver example lpc54018_adc_basic which uses the internal temperature sensor.
I have executed the provided code on two different eval boards with similar results, values of about 725 at room temperature.
Based on the data for the temperature sensor I was expecting something closer to 650 or so given tolerances.
Room temperature is about 24c.
Has anyone seen these results with the internal temperature sensor?
The driver code does run a self calibration.
Is there additional offset calibration required?
I think it is sensing temperature. I put a finger on it, and the returned value get's smaller. Not by a lot. It changes by -5 counts.
Thanks,
Dave
Hi Jeremy. Thank you for your response to my question.
I have looked through the datasheet and UM11060 to try and better understand what Burst mode actually does.
I find a lot on how to enable it, but I haven't found much information about how it affects latency, timing, or what is actually happening during Burst Mode. Does Burst Mode perform averaging? Or provide a longer sampling time?
If there is documentation on the ADC operation modes and how it affects conversion timing maybe you could tell me where I can find this information. Are there additional Application Notes on the ADC? It would be nice to know more about ADC conversion timing. As well as any information that indicates how different Modes affect accuracy or repeatability.
As a note, the measurements of the Temperature Sensor voltage are very consistent for me. Not indicative of a noisy measurement. From one measurement to the next it is within 1 count of each other. Readings at room temperature are around 720. Between two eval boards, the reading is about 15 counts different. The only problem is that the reading is Indicative of a temperature of 0C or less.
Note at turn on I do see that the reading starts out at a value of 725, and then gradually reduces to 720. I'm assuming that this is the device warming up and the temperature is increasing. I understand this behavior. I just don't understand the large offset that I'm seeing at room temperature. If I put a finger on the device the temperature reading reduces further.
Also my understanding is that "Sample Time" allows the user to increase the duration of the Sample time to insure that the Sample and Hold circuit has time to charge it's internal capacitance. I could see that this could be affecting my result. Would increasing Sample time, or reducing ADC clock rate improve my results?
As a secondary question:
In our application we will be making calibrated measurements on some analog signals. We will be performing our own calibration externally from the ADC. We will have Lookup Table data where one dimension of the table is temperature. We will have our own separate temperature sensor that the calibration will be based on. I think that may mean that we should not perform A/D calibration at power turn-on. Would you agree?
Any information you can provide would be greatly appreciated.
Dave
Hi Jeremy,
I didn't see your attached application note. I am relatively new to the community so maybe I'm not looking in the right place.
I am still using the basic_adc example code.
I modified the code yesterday so that I can inject a DC voltage to the ADC on Channel 4 which connects to J10.
I am using a linear power supply for the source.
I have measured the input voltage to the ADC.
The conversion to digital looks reasonable.
But there is a somewhat large positive offset of about 100 counts, or 80 mV.
The measured VREFP is 3.289 VDC.
I also experience a large positive offset on the Temperature Measurement for the internal temperature sensor.
It looks like the A/D calibration may not be applying the correct offset.
How can I modify the offset value?
You had mentioned using Burst mode. I reviewed the documentation again. It appeared that Burst mode runs conversions repeatedly. You had indicated that Burst mode would provide a better result. I was hoping you would explain Burst mode to me so I can determine if I should be using this mode. And what impact there would be to timing.
Thank you,
David
Hi David Bennett,
Thanks for your reply.
1) How can I modify the offset value?
-- In my opinion, maybe you can consider the optimize the ADC external circuit to minimize the ADC errors related to the external environment, and the application note : AN5250 would guide you on how to make it.
2) I was hoping you would explain Burst mode to me so I can determine if I should be using this model. And what impact there would be to timing.
-- As you know, the burst mode will enable the ADC to convert the external signal continuously, it can provide us more conversion results to get rid of the affection of the accident error happens.
Note: I attach the previous attachment again, please check it
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Thank you Jeremy,
I will run the example project that you sent me this week and review the temperature results.
Dave
Hi David Bennett,
Thanks for your reply.
1) Would increasing Sample time, or reducing the ADC clock rate improve my results?
-- No, I'm afraid not.
1) I think that may mean that we should not perform A/D calibration at power turn-on. Would you agree?
-- No, the calibration should be done prior to ADC conversion.
I've attached an application note which describes the example that logs temperature on LPC54018 LPCXpresso board LCD using the graphics library features of emWin, you can refer to it for details.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi David Bennett,
Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
After power-up, the temperature sensor output must be allowed to settle to its stable value before it can be used as an accurate ADC input.
In further, for accurate measurement of the temperature sensor by the ADC, the ADC must be configured in a single-channel burst mode. The last value of a nine-conversion (or more) burst provides an accurate result.
So give a try again.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------