Temperature Indicator Module

16 views
Skip to first unread message

David VB

unread,
Jun 5, 2024, 12:36:06 PM6/5/24
to jallist
Hi,

I would like to use the Temperature Indicator Module of a PIC10F322 to make a fan run at a PWM ratio depending of the temperature.
In my use case, the temperature can vary between 30 and 50 °C
The result must NOT be precise, since I will add a pot on one of the ADC pins to adjust the speed

I am using the formulas given in AN1333 ( https://www.microchip.com/en-us/application-notes/an1333 ) to get default values of the ADC for a given temperature.

But I get results which seem to be wrong, because the resolution sems completely off:
(Remember: the ADC in 10F322 is only 8-bits)

Temp
ADC

30
139

31
140

32
140

33
140

34
140

35
141

36
141

37
141

38
142

39
142

40
142

41
142

42
143

43
143

44
143

45
143

46
144

47
144

48
144

49
145

50
145

Maybe I converted the formula not correctly ?   Here it is, for the second column of the first data line:
=((5-(4*(0,659-((A2+40)*0,00132))))/5)*255

Has anyone already worked with that Internal Temperature Indicator ?
Is my formula above correct ?

Any help is welcome !

Thanks,

David

Rob CJ

unread,
Jun 5, 2024, 12:45:12 PM6/5/24
to jal...@googlegroups.com
Hi David,

The formula says:  VDD - Mode * (0,659 etc.)

I assume Mode is 4 but you are using:   VDD - (Mode * (0,659 etc) which is not the same.

Kind regards,

Rob




Van: jal...@googlegroups.com <jal...@googlegroups.com> namens David VB <pinhe...@gmail.com>
Verzonden: woensdag 5 juni 2024 08:58
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] Temperature Indicator Module
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallist/8b757cd8-93b8-4b6d-9ed6-535263f85127n%40googlegroups.com.

David VB

unread,
Jun 22, 2024, 9:03:45 AM6/22/24
to jallist
Hi,

thanks Rob,

I changed the formula to =((5-4*(0,659-((A2+40)*0,00132)))/5)*1023

The new results are:


30
559

31
560

32
561

33
563

34
564

35
565

36
566

37
567

38
568

39
569

40
570

41
571

42
572

43
573

44
574

45
575

0
   527

-40
484

100
635

Does this seem coherent to you ?

Thanks !
Reply all
Reply to author
Forward
0 new messages