COVID-19 & Shipping Updates
In line with government guidelines, all Jaycar company-owned stores are open to all customers. We encourage customers to take advantage of free delivery for online orders over $99 or use our free 1hr Click & Collect service. We thank you for your support as we continue try to keep our community and stores safe. See here for the latest on delivery delays.
We usually think of soldering irons, pliers and oscilloscopes when we think of electronic tools, and while this project may not be useful to the electronics enthusiast we think it's a good way of showing how Arduino based tools can be useful in other fields - in this case for musicians. The Duinotech Metronome has adjustable tempo between 20 and 240 bpm and can be set to accent anywhere between every beat and every eighth beat. It also gives a display of the classical name for that tempo.
Bill of Materials
|1||XC4410||UNO Main Board|
|1||XC4454||LCD Button Shield|
The LCD Shield fits directly on top of the Arduino.
Solder the buzzer onto A3, A4, A5 of the LCD shield. Mount the LCD Shield on top of the UNO.
Download the source code, extract into a new folder, open the .ino file in the Arduino IDE and press upload.
The sketch for this project uses a few of the libraries that are included with the IDE so there shouldn't be any extra libraries to be installed unless you have a very old version of the IDE. You should be able to load the sketch, select UNO board and its serial port, and upload straight away. The Metronome should start working straight away. If you don't get any sound try checking the connection between the Buzzer Module and LCD Shield. One of the features of the sketch is the use of the Timer interrupt to provide a precise interval between tones.
Operation of the Metronome is simple. The buttons have the following functions:
|Select||Save current setting to EEPROM|
|Up||Increase count between accented beats|
|Down||Decrease count between accented beats|
|Reset||On reset the EEPROM settings are loaded so this can be used to restore settings|
Being able to customize a project is what we like about Arduino and this one is no different. If you don't like the names and tempi that are displayed they can be changed in the tempos and temponames arrays. The notes that are played as tones can also be changed in the accnote array.
As we mentioned earlier, the use of precision timers is essential to this sketch. The slowest the Metronome can go without overflowing its counter is actually 15 bpm, and it can go much faster than 240 bpm if necessary, although the tones might merge into one another if it goes much faster. We've tested this sketch on the Leonardo too, and it can substitute if you don't have an UNO.
Another feature that could be handy is reprogramming one of the buttons to turn the Metronome on and off if necessary. We thought a handy feature would be 'follow-the-beat', which is why we put the Buzzer Module on the analog pins. The plan was to read the Buzzer (they also respond to sound like a microphone), detect the beat and display it, but we couldn't quite get it working.