Welcome to Freewebmaster.fr
Home > Hardware > Metronome
I always loved electronics, and I really love drums. After spending a very long time without practising electronics, I decided to start to build a metronome without using any micro-controller, dsp, etc. Why ? Because that an interesting challenge, and that's good to remember the basics, and also because I found that this is actually totally feasible [1]. You will see that I realised the display and the sound generator separately. Theoretically they should work together, but I never had the time to test.

Tempo display

Since we want a precise time reference, it's better to use a quartz-based oscillator. But, on the other hand, we need to be able to change the oscillator frequency. Shall we use two oscillators then ? One as a clock reference, and the other one as an adjustable frequency ? That's exactly what I did! Indeed, the CD4553 is a 3-Digit BCD Counter, and it has four very useful inputs: So, we need a clock input, with a variable frequency in order to set up the tempo. We also need another clock, that is used as a reference, to trigger the RES, LE, and DIS inputs of the 4553.

Crystal-based clock

To trigger the CD4553 inputs, we need a very accurate oscillator, a crystal oscillator is thus an obvious choice. Among the various existing crystal oscillators, I used a CD4060 with a 32,768 Hz quartz. Together with a few resistors and capacitors, this leads to the following:
Crystal oscillator using a CD4060 counter.
The Q10 output provides a 32 Hz square wave (32,768/210). The reason for that low frequency is that we will need a much higher frequency for the clock input of the CD4553.
Now that we have a reference clock at 32 Hz, we need to trigger the CD4553's inputs in the right order. The best thing to do is then to add a decimal counter between the CD4060 and the CD4553. Thanks to that, we will be able to trigger the different inputs sequentially.
So, what we want to do is:
  1. Disable the clock input of the CD4553 (DIS input)
  2. Set LE to zero, so we can memorise the new count, then set it back to one.
  3. Reset the counting (we are now ready to count).
  4. Set DIS to zero to finally count the pulses on the CLK input.
  5. Repeat from 1.
Using a simple counter like the CD4017 will perfectly work for us. The only "tricky" part is that we need an inverter at the Q1 output of the 4017, see figure 1.2. I also added a high-pass filter at the Q3 output in order to covert the voltage into a pulse.
Wiring between the CD4017 and the CD4553.
Note that C6 is used to set up the refresh rate of the 4553. So here we are, everything's now ready for the display. The wiring is pretty straightforward as the 4553 and 4543 are especially designed to control three 7-segments displays. We just need to add three transistors and resistors, and seven resistors to control the current of each segment.
Wiring between the CD4543 and the 7 segments displays.
This part is now done, and according to figure 1.2, the 4553 counts pulse on its CLK inputs during half a cycle of the 4017 (because its DIS input is connected to CO output of the 4017). Since the CO output of the 4017 is actually a clock with a 50% duty cycle and a 3.2 Hz frequency, the 4553 is counting pulses during 1/6.4 seconds. In other words, the displayed number will be given by CLK/6.4, where CLK is the frequency of our second oscillator (the one with an adjustable frequency). So it looks like we need to have an oscillator on which we can easily change its frequency.

555 timer astable

The easy, and efficient, way is to build a 555 timer in astable mode.
555 timer in astable mode.
As you can see, this is just a common 555 timer in astable mode, with a potentiometer (R1) that is used to tune the astable frequency. The capacitors and resistors determine the oscillator frequency and duty cycle. A careful choice of these components is necessary to set the tempo range of our metronome. As an example, I give some values here that correspond to a range of about 74 bpm to 215 bpm as shown by the figure 1.6.
555 output frequency as a function of the potentiometer value.
That works for me, but, you can change it if you want. Here is an Octave code that can be useful to you:
R1 = 1e3; R2 = 4.7e3; C = 100e-9; P = linspace(0, 10e3, 1000); Ra = R1; Rb = R2 + P; f = 1.44./(Ra + 2*Rb)/C; a = 100*(Ra + Rb)./(Ra + 2*Rb); figure(1) plot(P/1e3, f/6.4) figure(2) plot(P/1e3, a)
For your information, I always try to have a duty cycle that is close to 50%. So that's it, we have a device to display the tempo on three 7-segments displays. Here's a quick video that shows you how it works:

The available range of tempo is 25 to 274 bpm, of course, as said earlier, it can be easily changed, especially if you use wire wrap!

Sound generator

We now need some sound. Of course, everything will be based on the 555 timer astable frequency. At 384 Hz the number 60 will be displayed (384/6.4 = 60 bpm), which means that we need a 1 Hz click. However, it would be much nicer to have different time signatures. We can thus, for a tempo of 60 bpm, have the following options: It would be even better to have two distinct sounds, to allow more complex time signatures. As it can be quite easy to do, I decided to focus on time signatures from 2/4 to 10/4.
Firstly, we consider only one sound for the metronome. We want to be able to set up the sound duration and its tone. To that end, we will need two 555 timers, the first one in monostable mode, and the latter in astable mode. The first 555 will be used to set the pulse duration, and will trigger the second one in order to have a square signal of given frequency and duration.

However, before we do that, we need to make sure that we can trigger the first 555 according to the set tempo. Since the tempo is controlled by the frequency of the very first 555, we need have to have 60 bpm for a frequency of 384 Hz. Thus, to get a eighth of second between each note, we need to divide the 555 frequency by 48: 384/48 = 8 Hz. Luckily, 48 = 32 + 16 = 25 + 24. The same applies for a 4 notes, 2 notes, or 1 note per measure: of course that works whatever the tempo is. Building a setup to perform this operation is pretty straightforward, as we only have to divide by a sum of powers of two. We just have to use a decimal counter and some AND gates to perform the reset at the right moment. So here's the result:
Use of AND gates to trigger a monostable to set up the click duration.
Note that I used a low-pass filter to connect the output of the gates to the reset input of the counter, just in case... I also added some switches so we can select the rhythm signature. We know have to connect the output to a monostable, which is a standard 555 timer in monostable mode. Remember that the 555 generates a pulse when it receives a signal at the trigger input that falls below a third of the voltage supply. We thus have to invert the signal, using a simple one-transistor inverter:
555-timer in monostable mode.
The value of C9 will fix the pulse duration: for example, 1 µF will give 6 ms. A pulse duration of about 10 ms is very common for a metronome, but you can choose any duration you want. The next step is to change the time signature from 2/4 to 10/4. For that purpose, we can, again, use a decimal counter:
Use of a counter and some switches to change the time signature.
Now it's time to generate some sound. We need two inputs: The astable will have to generate two distinct tones: a "normal" tone, and a acute tone to mark the end of the measure. To that end, we will use a common astable, made of a 555 timer, which will have a switching capacitor in order to change its frequency. The next figure depicts this setup, where T2 is used to make a inverter, and to switch T3.
Two-sound astable.
The normal tone is obtained when the output of the counter (fig.2.3) is low, T2 is then saturated, so the capacitance used in the astable is C11 + C12. Thus, the astable frequency is: f = 1 ln ( 2 ) C ( R 23 + 2 R 24 ) where C = C11 + C12 = 200 nF, which means that f = 454 Hz (which is close to 440 Hz). On the other hand, the acute tone is obtained when the output of the counter is high. In that case, C = C12, as no current is going through C11. The astable frequency is now doubled: f = 907 Hz. The following video shows how such a circuit behaves, in a 4/4 configuration:

In this video I didn't use any AND gate, as I hadn't received the chips yet...

Putting it all together

We need to do one last thing: connect the display to the sound generator. Unfortunately, I didn't have enough time to do that part, but, in theory it should work, and you should have a nice metronome! In case you'd like to build it, here is the schematic of the whole metronome, in pdf format: metronome.pdf. Or may want to have the eagle files of the whole project: Metronome.zip.


[1] Régis KOLLY Métronome électronique ?   URL