to 540 beats per minute. R10 affects mostly the
high-end tempo, so if you want to decrease the
maximum tempo all you need to do is increase its
If you want to use a piezo element, you can
connect it to the PIC output, but you should put a
pot in series with it to control the volume. Since the
output of the PIC is a tone, the piezo device should
not be of the internally driven type. If you need
more volume, you can use the transistor driver
shown in the schematic.
A few comments about the circuit. Diode D1 in
the speaker driver circuit adds a little bias to R6 to
reduce the amount of pot rotation needed before
you get any sound out of the speaker.
I mounted a holder for three AA batteries on
the back of my unit, but I would not recommend
prolonged use with batteries since the current drain
can easily exceed 100 ma with a reasonable
Provision is made for an external power supply
via H2. Any DC voltage between 7V and 35V will
work with the regulator. However, voltages higher
than about 15 may require a heatsink.
I mounted a standard DC power socket such
that the batteries must be removed to connect
external power. H3 is used to allow an audio jack to
connect the output to an external amplifier.
The other application of Circuit 14 is that of an
audio oscillator. The value of C1 should be .01 µF to
increase the frequency to the audio range. The
range of frequencies with the components shown in
Schematic 1 is approximately 120 Hz to 7 kHz.
One of the issues of the 555 in this type of
circuit is that as you vary the resistance of R1 to get
different frequencies, you are only modifying the
charge time (output high) of C1 while the discharge
time (output low) remains constant. The audible
effect of this is that as the frequency is lowered, the
duty cycle is increased, and the sound produced
has more harmonics.
Pictures 2-4 show this using FFT displays.
Picture 2 shows 100 Hz at 50% duty cycle. Note
that the amplitude of the 3rd and 5th harmonics are
decreasing in about 10 dB steps, while the even
harmonics are down about 30 dB. The higher odd
harmonics continue the trend.
Picture 3 is 75% duty cycle, and shows both
even and odd harmonics are high but are
decreasing about 3 dB per harmonic. Picture 4 is
90% duty cycle and shows that all harmonics are
very close to the same amplitude as the 100 Hz
You can use one of the circuits (Schematic 3)
from Part 3 for the PIC audio oscillator equivalent of
38 February 2018
PICTURE 3. FFT of 100 Hz, 75% duty cycle square wave.
PICTURE 2. FFT of 100 Hz, 50% duty cycle square wave.
PICTURE 4. FFT of 100 Hz, 90% duty cycle square wave.