Measure the reverse current.Hi ,
I need to measure temperature using diode like 1n4148 , how can I do that ?
Regards![]()
Yet another great Jim Williams app. note. Well worth reading.One method that works well and gives good accuracy is described on Page 7 of this Linear Technology application note.
Probably just as well, though it would take a few more parts. The LTC1043 is a handy little beast, in part because it's got four SPDT analog switches, and also a built-in oscillator for operating them. Saves PCB space and works real good.I wonder how well the circuit would work with CMOS analog switches such as the CD4066?
It depends on priorities. If I am being cheap (typical) than I use the pieces-parts I have on hand. If I am doing a production design then optimizing for size, weight and power makes sense.Probably just as well, though it would take a few more parts. The LTC1043 is a handy little beast, in part because it's got four SPDT analog switches, and also a built-in oscillator for operating them. Saves PCB space and works real good.
how can i measure the reverse current ? And...how to convert it to degree ??Measure the reverse current.
Why are you choosing a diode for temperature measurement and when you have no clue how to do it and need to be walked through the whole process?
you can buy an off the shelf temperature measurement device if you need to measure somethings temperature..
Are these guys just doing your homework or something?
you mean i should read the voltage at 0 degree and use the same value as a refrence point ?Don’t measure reverse current. A diode simply changes forward voltage by -2.1 mV per degree Celsius. That is, each degree warmer, the voltage drop of a diode goes down by 2.1mV.
Then if you multiply (amplify gain) -47, you’ll get a 0.1 volt change at the output of your amplifier for each degree change.
Notice it says, minus 47 gain, you need an inverting amplifier.
Finally, you need some reference point (offset) because you don’t want to just measure temp change, you want to have 0-degrees C, read, zero volts on your meter. I’ll let you think about that.
http://ww1.microchip.com/downloads/en/AppNotes/93016A.pdf
/* two point temperature diode calibration code from
* http://www.ti.com/lit/an/sbaa073a/sbaa073a.pdf
* https://www.ccsinfo.com/forum/viewtopic.php?p=173294
*/
#define ZERO_DEGC_IN_CENTIK 27315ul // centi-K = 0.01K units
struct {
// alpha numerator and denominator
uint16_t alphan; // ADC bits
int32_t alphad; // 0.01K units
} calibration;
/*
* Initialize module
* 89.5F (31.9C) = alphan 293
*/
void inttemp_init(void)
{
// arbitrary values
calibration.alphan = 293;
calibration.alphad = 319 * 10 + ZERO_DEGC_IN_CENTIK;
}
/*
* Single point calibration to assumed ambient temperature
*/
void inttemp_calibrate(int16_t temperature)
{
// alpha = delta diode voltage / temperature
calibration.alphan = inttemp_deltav();
calibration.alphad = ((int32_t) temperature * 10 + ZERO_DEGC_IN_CENTIK);
}
/*
* use the CTMU to measure the internal temp diode and return a voltage
* It's only good for about +- 1.0C resolution at best but it will work
* for time measurement calibration drift
*/
uint16_t measure_chip_temp(uint8_t mode)
{
L.ctmu_data = LOW;
L.ctmu_data_temp = HIGH;
ADCON1bits.VCFG = 2; // Vref+ = 2.048
ADCON0bits.CHS = TEMP_DIODE; // Select ADC channel
CTMUCONHbits.CTMUEN = LOW;
if (mode) {
CTMUICON = 0b01111111; // 55uA CC max trim +62%
} else {
CTMUICON = 0b01111110; // 5.5uA CC max trim +62%
}
CTMUCONHbits.CTMUEN = HIGH;
CTMUCONHbits.IDISSEN = LOW; // end drain
PIE3bits.CTMUIE = LOW; // don't generate CTMU interrupts for edges
CTMUCONLbits.EDG1STAT = 0; // Set Edge status bits to zero
CTMUCONLbits.EDG2STAT = 0;
CTMUCONLbits.EDG1STAT = 1; // start current source
wdtdelay(20); // CTMU setup time before sampling
ADCON0bits.GO = 1; // Start conversion
wdtdelay(20); // wait for ISR to update buffer
CTMUCONLbits.EDG1STAT = 0; // deactivate current source
CTMUICON = 0x00; // current off
return L.pic_temp;
}
/*
* Measure delta voltage across internal diode at two currents.
*/
uint16_t inttemp_deltav(void)
{
uint16_t v1, v2;
v1 = (uint16_t) lp_filter((float) measure_chip_temp(LOW), 1, HIGH);
v2 = (uint16_t) lp_filter((float) measure_chip_temp(HIGH), 2, HIGH);
return v2 - v1;
}
/*
* Read current internal temperature in 0.1C
*/
int16_t inttemp_read(void)
{
// temperature = delta diode voltage * (1 / alpha)
return((int32_t) inttemp_deltav() * (int32_t) calibration.alphad / (int32_t) calibration.alphan - ZERO_DEGC_IN_CENTIK) / 10;
}
thanks a lot for your appreciated effort
should i adjust the reference point at the max gain ?! why ?
how i determine the max gain and the resistors' values in the circuit ?
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
Schottky diode with low leakage current | General Electronics Chat | 8 | |
| U | Generator fuel shutoff circuit diode selection. | General Electronics Chat | 20 | |
|
|
10A10 diode - Schottky? | General Electronics Chat | 34 | |
|
|
Measure Diode Resistence | Power Electronics | 13 | |
| W | How can I measure the piv of an unknown diode? | Test & Measurement | 13 |