[PIC] PIC16F887 > ADC > External Vref of 2.5 V

Eric_O

Advanced Member level 4
Joined
May 31, 2020
Messages
107
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
1,024
I decided to use an external voltage reference of 2.5 V on AN3 with LM385-Z-2.5.

Regarding the Texas Instrument datasheet of LM385-ADJ, and schematics / formula at page 2, figure 6, when using 5 V for VCC, R2 = R3 = 10 K, and when testing the output voltage at pin « + » of the regulator, without being connected to AN3 of PIC, I never obtain around 2.5 V. I only obtain 1.373 V.

Some one can enlighten me ?

Thanks
 

Attachments

  • LM385 ADJ.pdf
    1.5 MB · Views: 47
  • IMG_7269.jpeg
    1.8 MB · Views: 47

Hi,

it´s not clear how you wired it --> show a schematic. Hand drawn will do. But it should be complete with informations of power supply and ho/where you connected the DVM (both wires)

You said you use the
LM385-Z-2.5.
This already is a FIXED 2.5V voltage reference that does not need resistors to adjust the output voltage. It is preset to output 2.5V!

But you linked a datasheet to LM385-ADJ ... which is the ADJustable version of voltage references. With them you need resistors .. and to adjust the output voltage in a wide range.

--> use the correct datasheet!

Klaus
 

    Eric_O

    Points: 2
    Helpful Answer Positive Rating
hello,
and what is the value of R1 ... no way with 50k
 

With LM385 Z 2.5 datasheet and 200 K resistor … everything is OK : 2.5 V at output.
Thanks
 

Hi,

if you are aware of Ohm´s law ... then you should know that you operate it outside recommended operating conditions.

--> Please do your math.

Now you say it does work ... This may surely be ... but function is simply not reliable. At least expect increased accuracy error and increaed drift.
It may not work now .. in your house...
But it may refuse to work ... after years, at different temperature, with a different (same type) LM385z2.5.

Klaus
 

Sorry,

I do not understand the first paragraph of your answer. Because in LM385-Z-2.5 datasheet, page 19, figure 16, they is no formula to use and any resistor to calculate. Just one 200 K resistor.

As you did recommand me in former answers, it’s better to use an external voltage reference, that’s what I did.

I do not understand the last paragraphs, concerning « function », and « … after year … ».

Please, which circuitry you could suggest in order to have a reliable temp measurement with this LM185 ?

Thanks.
--- Updated ---

Sorry,

I do not understand the first paragraph of your answer. Because in LM385-Z-2.5, page 19, figure 16, they is no formula to use and any resistor to calculate. Just one 200 K resistor.

As you did recommand me in former answers, it’s better to use an external voltage reference, that’s what I did.

I do not understand the last paragraphs, concerning « function », and « … after year … ».

Please, which circuitry you could suggest in order to have a reliable temp measurement with this LM185 ?

Thanks.

 

I do not understand the first paragraph of your answer. Because in LM385-Z-2.5 datasheet, page 19, figure 16, they is no formula to use and any resistor to calculate. Just one 200 K resistor.
Figure 16 gives two additional informations:
* Micropower .... and means here the low current limit of operation
* supplied by 9V
* there is no load (current)

At the very beginning of the datasheet ... page #1 it says: "Operating Current of 20 μA to 20 mA"

But indeed if you look for operating conditions you should use the according datasheet section: "ELECTRICAL CHARACTERISTICS"
--> Minimum Operating Current --> Design Limit: 20 μA

You, as the designer, need to follow these rules for correct and reliable operation. Also all the oter specifications, they are listed for a reason.

I´m no friend of designing at the very limit ... because if something unexpected happens ... you risk to leave the safe operation area.
But for you .... leat´s try to go to this limit:
Thus we use the specified 20uA as the LM385 lower limit.
Now we want to calculate the resistor:
For this ... according Ohm´s law we need to know two values:
* the expected voltage across the resistor
* the expected current through this resistor
-> Voltage: the worst case is: when the supply voltage is at minimum, and when LM385 voltage is at maximum.
A 5V supply surely does not perfectly 5.000V all them time. According power supply input, load current, device type, temperature drift.... you should expect it to be less.
How low.... I can only guess, because I don´t have any information about your circuit regarding this. Thus I assume it to be 5% below nominal --> 4.75V
The maximum LM385 voltage is 2.530V (this is the 100uA current... to be on the sae side)
-> Current: Here you need to understand that the resistor current needs not only to supply the LM385 ... but also the load. In your case the PIC´s REFerence input.
To go to the limit ... you need to use the MAXimum current to be drawn (by all loads. I don´t know if anything else than the PIC is connected).
I don´t take the effort now to read the PIC datasheet ... thus I use a guessed number of 10uA max (over device, aging, temperature....)
-> Now it´s time to use the most basic formula in electronics: Ohm´s law:
R = V / I
-> R_max = (V_min / I_max) = (4.75V - 2.53V) / (20uA + 10uA) = 2.22V / 30uA = 74kOhm.
We are not finished yet .. because if you buy a resistor ... it comes with tolerance. Let´s say you use a +/-1% tolerated one (over part, time, temperature..)
Thus you must not use a real resistor with less than 74kOhm / (1 +1%) = 74k / 1.01 = 73.27 kOhms max (nominal value)

--> use a resistor with less than 73.27 kOhms
This is the very limit for save operation.
(Now it´s time to recognize that 200k is far too high for safe operation)

***
My way:
--> I usually calculate with a supply voltage to be 10% less than nominal (mind this value should cover even small negative spikes in the microseconds)
This is 4.5V.
Also one has to consider additional load currents like stray currents in PCB and capacitors.

For the LM385 I either use values used for specification. In this case
* I see they use 100uA for testing their behaviour.
* Another approach is to use half of them max value: = 20mA/ 2 = 10mA
* Another way is to use the square root of (min_current * max_current) = sqrt ( 20uA * 20mA) = sqrt(400nA^2) = 630uA
Which method you use is your choice. (You would go for higher current if you have unknown conditions like voltage and load current, you would go for lower current if you are battery operated or you want to keep self heating of total application low)

What´s the idea behind the "square root" method?
--> it gives you the same "safety factor" to lower and to upper limit.
This means: the factor to lower limit is 630uA / 20uA = 31.5
the factor to upper limit is 20mA / 630uA = 31.7
A factor of 31 is huge btw. You usually would use tis method when the two limits are rather close to each other. Example: when given "100uA min to 200uA max."

****
I mentioned capacitors.. Yes, this is a REFerence node. It should be kept low noise. I probably would add a 1uF ceramics capacitor close at the PIC.

For the calculations above ... maybe Excel is useful. Then you can can input your application parameters ...
and it automatically calculates
* min resistor, and the according current, power dissipation in REF and resistor
* max resistor, and ....
* and what else you are interested in

You may use the same excel file to calculate current limiting resistors for optocoupler, LEDs, zeners.... and so on

Klaus
 

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…