Page 219 - ARM Based Microcontroller Projects Using MBED
P. 219

8.22  PROJECT 18—DIGITAL THERMOSTAT                205













            FIG. 8.69  Typical output from the program (normal run).














            FIG. 8.70  Typical output from the program (alarm condition).

            8.22.7 Modified Project

              The project can be modified by adding a buzzer to one of the GPIO ports so that the buzzer
            sounds when an alarm condition occurs. There are two types of buzzers: passive and active.
            Passive buzzers are driven by audible signals and they can generate sounds at different fre-
            quencies. These types of buzzers are normally driven using pulse width modulation (PWM)
            signals or sine wave signals. Active buzzers on the other hand are driven by logic signals and
            sending logic 1 activates the buzzer where the buzzer sounds at a fixed audible frequency. In
            the modified project, an active buzzer is connected to port PC_0 of the development board as
            shown in Fig. 8.71. The program (program: Thermostat-2) configures the buzzer as digital


















            FIG. 8.71  Modified circuit diagram.
   214   215   216   217   218   219   220   221   222   223   224