Main Page | Projects Index Gallery IndexSite log


Coded Alarm - Extended Piezo Sounder C



The final Piezo sounder board is designed to generate a series of tones for the basic alarm system.

These are namely:

  • 'Acknowledge' which consist of three tones increasing in frequency with the final tone having twice the length of the first two, this is used to signify corerect code entry
  • 'Error' which consists of four low frequency tones, signifying an error .
  • 'Key Beep' a high pitch tone for use when the keypad is pressed.
  • 'Buzz' a fixed alarm tone for use when the system is in alarm.


Circuit Operation:

The circuit for build C of the sound board is as below:

In this circuit NAND gate A provides a clock of 12Hz, this is required to drive the 4017
decade counter in order to produce a usefull sequenced output. Additionally gates B,C & D provide a simple SR latch and logic for the the first part of the circuit.

Here depending on which of the inputs ('Err' or 'Ack') is triggered either 1 resistor (560K) is
brought into play via 4066/4016 switch D in the case of 'Err' or 3 different resistors (270K/180K/56K)are sequenced via 4066/4016 switch A in the case of 'Ack'.

For either selection the 4017 decade counter is reset by the initial trigger at which time it
immediately starts to count up 0-1-2-.. , this in turn selects the relevant resistors via the
selection diodes producing the desired tones from IC5 (a 555 timer connected in Astable mode).

At the end of the sequence when output 8 on the 4017 is energised the circuit is automatically disabled at which time counting stops. This reset state is maintained until either the 'Err' or 'Ack' inputs are re-triggered and the sequence starts once more.

The next output 'K.Beep' is provided via IC4 (a 555 timer connected in mono stable mode),
here when its input is triggered a 1K resistor is selected via switch C for use with the
Astable tone generator.

The last of the Tone that can be generated on the board is initiated via the 'Buzz' input,
here when the input is energised switch C is closed brining a 100K resistor in circuit with the
555 Astable.

The monostable and 4017 circuits are used in this way so that the PIC can trip the required tone circuit and then immediately get on with other tasks, in this way a minimum of processor time is used.

Circuit Calculations:
By consulting the relevant application notes and data sheets for the devices used, we can calculate the frequencies and duration of the tones that are generated by the circuit when each of the inputs are triggered.

Each in turn will be considered below:


When the 'Err' or Error input is triggered as discussed previously this results in the 4017 being
reset which start the outputs being energised in sequence 0-1-2...

Though the action of the diodes attached to outputs 1,3,5 & 7 a 560Kohm resistor is connected to the IC5 Astable oscillator via switch D of the 4066. At these time periods(1,3,5,7) the Astable is effectively enabled and will generate a tone and conversely at periods(0,2,4,6) the 560Kohm resistor is disconnected disabling the oscillator.

This can be depicted as:

The duration of each of these time periods is determined by the operational frequency of the Schmitt oscillator comprising of the 4093(A) NAND gate, 10Kohm Resistor and 10uF Capacitor. The resulting frequencycan be calculated as:

This results in each of the sequences having a time period of about 0.8 Seconds.

The action of the 560Kohm resistor on the Astable oscillator may be calculated for the formula available from the 555 data sheet:  


Where Ra=560Kohm, Rb=47Kohm and C=10uf

The effect of the analogue switch could also be considered, however from the data sheets for the 4066/4016 devices the equivalent resistances are approximately 300ohms/500ohms @12V. As this will appear in series with the 560Kohm its overall effect on the final frequency will be negligible and so will not be considered here.

The resulting frequency will therefore be:


From this we can say that the overall effect of trigging the 'Err' input will result in four 220Hz pulses lasting 0.8s and all separated by 0.8s apart.  


The 'Ack' input when triggered  connects a 270Kohm, 180Kohm and 56Kohm in the manner
depicted here, these resistors will also result in the equivalent tones being generated:

The result of triggering the 'Ack' input will produce a series tones that increase
in frequency of which the final tone lasts twice as long as the first two.


Next the K.Beep input triggers a monostable circuit the pulse of which will have a duration of:

This closes analogue switch B connecting a 1Kohm resistor in circuit, this will result in a 1.5Khz tone being emitted for 0.11 second, ideal to give feedback from key pad presses.


The last of the inputs simply closes an analogue switch connecting a 100Kohm resistor to the Astable circuit, this will result in a 743Hz output tone.

This input is different from the others in that the tone will only persist as long as the 'Buzz' input is enabled, however as this is an alarm tone the microcontroller will be maintaining an output active in order to drive the alarm bell it is to this output that the input can be tied.


The final design was transferred to stripboard for testing.

The as built board during testing. 





- Extended Piezo Replacement Stripboard C - High Resolution

- Extended Piezo Replacement Circuit C - High Resolution