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:- A clock input (CLK).
- A master reset input (RES).
- A latch enable input (LE).
- And a disable input (DIS).
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: 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:
- Disable the clock input of the CD4553 (DIS input)
- Set LE to zero, so we can memorise the new count, then set it back to one.
- Reset the counting (we are now ready to count).
- Set DIS to zero to finally count the pulses on the CLK input.
- Repeat from 1.
555 timer astable
The easy, and efficient, way is to build a 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. 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)
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:- One second between each note.
- Half a second between each note.
- A quarter of second between each note.
- A eighth of second between each note.
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:
- One second between each note: divide by 22 + 21
- Half a second between each note: divide by 23 + 22.
- A quarter of second between each note: divide by 24 + 23.
- A eighth of second between each note: divide by 25 + 24.
- The output of the 555-timer monostable.
- The output of the second counter (fig.2.3).
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.References
# | Author | Title | Year | Journal/Proceedings | URL |
---|---|---|---|---|---|
[1] | Régis KOLLY | Métronome électronique | ? | URL |