The rotation speed R of the motor is measured by a tachometer. You should measure R every 20 ms with a resolution of 1 rps
The rotation speed R of the motor is measured by a tachometer. You should measure R every 20 ms with a resolution of 1 rps. The rotational speed will vary from 0 to 250 rps (0 ≤ R ≤ 250 rps). The output of the tachometer is an ugly-looking digital wave with a frequency 100 times the motor speed. Thus, 0 ≤ f ≤ 25 kHz (Figure 13.26).
Figure 13.26
Tachometer frequency is a function of the motor rotation speed.
The desired rotational speed (R* also in rps) comes from an 8-bit parallel input port. A new value is available on the rise of Ready. The fall of Done is an acknowledge signal back to the input device signifying that the microcomputer no longer needs the data. The timing is shown in Figure 13.27.
Figure 13.27
Sensor timing.
The interrupt-driven control algorithm should be implemented at 50 Hz (U(t) is the duty cycle in percent):
U(t) = ∫0 (R* − R(t))dt where R* and R(t) are in rps and t is in seconds