Implementation
Hall sensor output is connected to the MCU’s GPIO port, PTA2, which has a programmable edge trigger keyboard interrupt (KBI). The programmable edge trigger feature provides an effective way to monitor the Hall sensor signal. As mentioned in the previous section, the direction of rotation can be detected by the polarity of the Hall sensor output edge. Monitoring the signal edge is achieved by altering the KBI edge trigger polarity for each commutation step.
Ambient temperature reading is taken from a temperature sensor which is equivalent to a diode. Temperature variation alters the diode channel current as well as the effective channel resistance. The temperature sensor is combined with a 7.5kΩ resistor in a potential divider arrangement. The
As described in the previous section, the motor speed is controlled by varying the absolute
3.3 Control Loop
Figure 3-2 shows the firmware control loop flow chart. The KBI or Hall sensor output is continuously monitored for trigger signals within a defined time. A motor fault condition occurs when there are no trigger signal, and the firmware goes into a forever loop. Commutation is stopped and the buzzer is alarmed.
The target PWM period based on the temperature sensor reading is updated every 128ms. And on each 180 degrees rotation of the rotor (two commutation steps) the actual PWM period is compared with the target PWM period. If they are different, the absolute
On each commutation step, reading of the temperature sensor contributes a delay to the actual
Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0
16 | Freescale Semiconductor |