[SOLVED] ADC value to tempatature conversion

Status
Not open for further replies.

sammey_geek

Junior Member level 1
Joined
May 22, 2013
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Visit site
Activity points
1,395
hi...
i am using 10 but ADC and internal voltage ref is 1.1 v. i connected potentiometer to the 5th cannel of ADC. can anyone tell me how to calculate temparature from ADC value..with one example...tanx in advance
 

hi...jinzpaul4u..tanx for the reply....is it possible to convert adc value to time?? if u tell me how ..it will be soo helpful for me....tanx in advance..
 

What are you trying to measure? What is the max raw adc value you get for max adc input? What is the range of input you are measuring?
hi sir,

i am using ATTINY88 ..i am using this timer value for timer mode i am using 16 bit timer for that...and using potentiometer i am varying the voltage..and i have to convert the ADC value to time....

this is the output i have to get
ADC Value Time in min ADC value Time in min
1 1 (when pot is at minimum) 34 48
2 2 35 50
3 3 36 52
4 4 37 54
5 5 38 56
6 6 39 58
7 7 40 60
8 8 41 65
9 9 42 70
10 10 43 75
11 11 44 80
12 12 45 85
13 13 46 90
14 14 47 95
15 15 48 100
16 16 49 105
17 17 50 110
18 18 51 115
19 19 52 120
20 20 53 130
21 22 54 140
22 24 55 150
23 26 56 160
24 28 57 170
25 30 58 180
26 32 59 190
27 34 60 200
28 36 61 210
29 38 62 220
30 40 63 230
31 42 64 240 (when pot is at maximum)
32 44
33 46
 

okay i will explain u abt my project..... there is a timer mode in my project.... if i give particular time delay..the light has to switch on at that time...for that i am using 16 bit timer... it has to work between 1 min to 240 mins. for example i want to switch on light after x mins.....i have to vary the potentiometer so that i ll get some ADC value..that ADC value should be converted to time.....is there any formula to convert it to time??
 

Hello there,

for example i want to switch on light after x mins.....i have to vary the potentiometer so that i ll get some ADC value..that ADC value should be converted to time.....is there any formula to convert it to time??

I am confused here.

to control timer for x mins why are you using adc and potentiometer??
 

So, your adc value will decide the timer value. Do like this. create a timer of 500 ms or 1 minute as it is your minimum time. Use a counter to hold the no of interrupts. use a variable time2run to hold the interrupt value calculated on adc value. Your max time is 240 minutes. So convert max raw adc value to no. of interrupts needed for 240 minutes (depends upon Fosc). In isr check if counter == time2run.
 
Status
Not open for further replies.

Similar threads

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