Freescale Semiconductor DRM079 manual Temperature Sensor Measurement, = V Dd⎜ Rc⎟

Page 18

Implementation

3.4 Temperature Sensor Measurement

The temperature sensor measurement is performed based on the methodology of an emulated ADC described in the application note, AN3266 “Getting Started with RS08”.

ON-CHIP COMPARATOR

+

MCU BOUNDARY

VDD

RVDD

4k7

7k5

C

 

 

 

 

 

 

TEMP SENSOR

22nF

 

 

 

 

 

 

 

 

 

 

 

 

10k

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 3-3. Emulated ADC Schematic

The schematic of the emulated ADC in this application is shown in Figure 3-3. The ADC input is the temperature sensor resistor ladder. When the comparator is not measuring, the capacitor, C, is fully discharged where the positive terminal of the comparator is pulling low. When the temperature sensor measurement is required, the comparator is then enabled and the terminal turns to analog input, voltage across C starts to ramp up. The 8-bit internal modulo timer is used to monitor the time taken for the RC to charge to a level that matches the voltage across the temperature sensor. The timer counter value is captured and used as the basis for the emulated ADC conversion.

With a 10ktemperature sensor and 7.5kpullup resistor the ADC absolute dynamic range is from 0V to about 0.57 VDD, i.e. about 2.85V. Timer clock is chosen to be eight times slower than the bus clock, the timer resolution becomes 2s. The RC charging profile follows EQ 3-1. Given the RC constant is 4K7Ω ⋅ 22nF the timer counter value against the temperature sensor reading with 5V VDD is shown in Table 3-2.

t

 

–-------

 

V = VDD

1 – e RC

(EQ 3-1)

 

Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0

18

Freescale Semiconductor

Image 18
Contents Variable Speed DC Fan Control using the MC9RS08KA2 Page Variable Speed DC Fan Control using the MC9RS08KA2 Revision HistoryFreescale Semiconductor Table of Contents Freescale Semiconductor Chapter Introduction IntroductionFreescale’s New Generation Ultra Low Cost MCU DC Fan Reference Design TargetsBi-Phase Bldc Motor Bi-Phase Bldc Motor DiagramFreescale Semiconductor Chapter Motor Control CommutationRotor Position Control Commutation Waveforms Speed ControlFault Detection Motor StartupFreescale Semiconductor Block Diagram Chapter ImplementationHardware Resources Control Loop Firmware Control Loop Temperature Sensor Measurement = V DD⎜ RC⎟#63, Mtimmod ACMPSCACF, AcmpscAcmpsc Temperature Conversion Temperature Conversion Table Freescale Semiconductor VR1 Freescale Semiconductor Appendix B Program Listing Mtimtclkrising RtidisableMtimtclkfalling AcmpoutputbothMAPADDR6NVICSTRM, Icstrm $3FFA #HIGH613NVICSTRM, PageselMAPADDR6NVFTRIM, Icssc #ICSDIV2, ICSC2#MTIMBUSCLKMTIMDIV256, Mtimclk KbiesKbipe #255, MtimmodMAPADDR6SRS Rts Drive coilKBISCKBACK, Kbisc MTIMSCTOF, Mtimsc#6, Mtimmod KbiscBUZZER, Ptad #24, Mtimmod#30, Mtimmod Page How to Reach Us