Regarding the lot question, I do not know exactly because I do not have the reels. The last batch was bought few months ago with of volume of over 10.000 pieces and I got 100-150 for test purpose from that lot. I expect to be the same lot, but to be sure I must ask the production site. The small PIC10F322 in SOT-23-6 has only an ID mark on it to know the type and the dot for pin1. The PDIP8 package: 29 of them have the production code 1213, meaning year 2012 and week 13 and the 30th piece is marked 1142, meaning production year 2011 week 42, clear a different lot, the one which gave the result -44°C, 120 ADCti.
The PIC has only one pin for RS232 RA1 connected to one input of PIC18F4550, which has high impedance input, so we cannot speak about sourcing and sinking important current to affect the measurements. And RS232 communication is done 100ms after the measurements of FVR and junction voltage/temperature.
The clock is indeed high 16MHz, but I got the same negative results for SOT-23-6 with 8MHz. With 4MHz and less I get some communication errors, which must be fixed, because the numbers received on display are not good, they are 255. That is a bit strange because the RS232 6 packages data pattern is the same seen on oscilloscope. A debug must be done for 4MHz and less. But important to know is that I need the PIC10F322 to work at 16MHz or at least 8MHz. For 4MHz or less frequency, tests are only to confirm or infirm the finding up to now, but are not suitable for my real application.
Regarding the numbers mentioned by Dan above, I think is good to give some explanations for future readers. If we look into the AN1333 B page 1 there is next graphic:
There we see 0.5735V at 25°C as typical. But that is for only 1 device PIC16F1937. It is nothing mentioned about other PICs with internal temperature indicator and nothing about tolerances between different devices.
From my point of view to use 0.5735V at 25°C is not an absolute reference.
Deviation from 0.5735V may easy appear among devices.
There are technical articles showing the VFD (Voltage Forward) depends by temperature of a diode, a junction and the tolerances, not necessarily done by Microchip.
Then on page 4 we have the next graphic:
There we see the 138 as ADC result for a calibrated device, measured at 25°C and stabilized supply voltage.
Here is how we get those numbers.
On the page 2 we see the Vtemp=VDD-4*Vt, where Vt is the voltage for 1 junction.
Then we get Vtemp=5-4*0.5735=2.706V
Considering the VDD 5V and the ADC 8bits, meaning the result in the range 0-255, then we calculate the ADC result as follows:
- If at 5V corresponds 255, then at 2.706V corresponds 2.706*255/5=138, which is the number from the graphic above on page 4.
In my 1st
case with SOT-23-6 PICs, the ADC result is between 107 and 126.
If we calculate back the junction voltage we get:
- for 107: (107*5/255)/4=0.5245, which gives (0.5245/0.5735-1)*100=-8.54% deviation compared with 1 device PIC16F1937 which has 0.5735V at 25°C
- for 126: (126*5/255)/4=0.6167, which gives (0.6167/0.5735-1)*100=+7.53% deviation compared with 1 device PIC16F1937 which has 0.5735V at 25°C
- The deviation of the junction voltage of the PIC10F322 SOT-23-6 compared with 1 device PIC16F1937 is then +7.5/-8.5%.
- The deviation range is +7.5%-(-8.5%)=7.5%+8.5%=16%
In my 2nd
test with PDIP-8 PICs, the ADC result is between 120 and 140.
If we calculate back the junction voltage we get:
- for 120: (120*5/255)/4=0.5882, which gives (0.5882/0.5735-1)*100=+2.56% deviation compared with 1 device PIC16F1937 which has 0.5735V at 25°C
- for 140: (140*5/255)/4=0.6862, which gives (0.6862/0.5735-1)*100=+19.65% deviation compared with 1 device PIC16F1937 which has 0.5735V at 25°C
- The deviation of the junction voltage of the PIC10F322 PDIP-8 compared with 1 device PIC16F1937 is then +2.5/+19.6%.
- The deviation range is 19.6%-2.5%=17.1%
The deviation range is the almost the same for SOT-23-6 as for PIDP8, only that is shifted with an offset.
Does anybody know the typical tolerance of the silicone diode junction forward voltage?
If we know that then we can think twice why the results are like that.
For my curiosity I tested one more time random some of SOT-23-6 PICs, re-programming them, and I got the same negative numbers for temperature.
It is nothing wrong with the code.
There is an important difference between results obtained with SOT-23-6 and PDIP-8 packages. It is obviously an offset besides the spread of the results in a quite wide range when there is no calibration done.
Based on 30 device, we have for SOT-23-6 the temperature in the range -93….22°C and the ADCti in the range 107…126. That 115°C spread range.
Based on 30 device, we have for PDI-8 the temperature in the range -44…+39°C and the ADCti in the range 120…140. That is 83°C spread range.
The VDD was 4.99-5.00, detected by PIC10F322 with FVR sometimes 52 as 5.02V and sometimes 53 as 4.93V.
It is like a shifting/offset of the results for these 2 packages with 13-14 for ADCti, which corresponds to around 48-50°C.
I need to use SOT-23-6 anyway, but I made the test with PDIP-8 only to double check the possible errors.
The problem is what we get as offset for non-calibrated devices.
The conclusion after such analysis effort is that PIC10F322 gives a too wide range for the temperature measurement which cannot be used without calibration.
The last thing which will be interesting to be analyzed is the idea proposed by Nikolay: a self calibration at first power up with self-writing flash for 1 location memory with calibration coefficient, assuming a constant ambient temperature of around 25°C at first power on/board test.
That would make sense if after such code implementation, the PICs are tested again for a wider range of temperature to see the error range for cold and hot environments.
Unfortunately I have no more time to continue the investigations now, but if are any suggestions/code examples regarding how the code should be written for self-writing at first power on, then later I may be able to test. For me the information from datasheet regarding the self-writing is not enough.
post edited by viki2000 - 2015/07/30 07:29:42