hello .. eric ! i want to ask about something
About the temperature . someone implement the project like me with these values :
Vref=1.28 v . applied on pin9 is 0.64 v
Why is pin9 at 0.64v, it should be 1.28v in order to give a Span of LM35 [1.28v] = 255 adc value.
LM358 works as buffer .
Repeating myself, in this application a buffer is NOT required, it serves no purpose.
he used these formulas :
To get the minimum span that the adc can identify . min-span=Vref/255
This should be equivalent to 1.28v/255 , when the Vref is 1.28v
To get the Vin . Vin= Dout * min-span
This should read: adc value out = [Vin /1.28v] * 255
then :
=1.28/255 = 5.01 mV
So for 5mV CHANGE in Vin ,,,, adc val = [0.005/1.28] = 1 count CHANGE
BUT a 5mV change is only equal to 0.5Cdeg change in temperature at the LM35, so a 1Cdeg change would give an adc value of 2.
He said that this the min-span according the formula. and we know that the adc will give us 10 mV / centi but here will give us 5mv/centi ..... which mean we will take the output of the adc and divide it by 2 to get the tempr .
So if you want to convert this adc value of 2[decimal] to 1Cdeg, you need to divide by 2.
example : if the output is 00000010= 2 in decimal then the program will read 2 and divide it by 2 to get the tempr ...... 2/2=1 c .
Yes.
is that make any sense ? i asked him about why you divided by 2 ? but he did not respond till now ?
Look at my explanation above.
what do u think ?
note : the program is working fine as this person illustrated .