Piano Metronome




Introduction: Piano Metronome

About: Now retired but have a passion for robot design and construction. Also enjoy programming, my career was largely commercial programming and design work using Cobol, Fortan, and industrial automation and integra…

This project was conceived of after I examined the types and styles of various off-the-shelf Metronomes. I am currently learning to play the piano and having a Metronome in order to keep time was necessary. I felt sure that I could build one based on a standard Arduino Uno R3 board. The resultant Metronome has a combined light and sound feature which can be customized to reflect the tempo of the beat. While V1 of the project is complete a V2 is being considered based on some new features such as adding a 18650 Battery shield to allow charging of the batteries via a USB charging cable. I added a simple time display feature in this version, however a future version could include the time in providing a fixed number of beats option.


1. Arduino UNO R3 card and DC Plug, terminal type

2. DS1302 Real Time Clock plus 2032 button battery

3. Two pole switch, coloured wires, PCB female plugs, heatshrink, PCB board, 3mm plastic supports

4. LED plus 330ohm resistor

5. PAM8403 Digital Amplifer 3W

6. Digital Rotary Encoder with central push button

7. 8 Ohm 1W speaker

8. 20 X 4 line LCD screen using IC2 communications

9. 50x90x150mm project box

10. 4 x Neopixel RGB common anode LEDs

11. 2 x Adjustment push on control knobs.

12. 2 * 18650 batteries and twin battery holder

13. two pole switch.

14. a quantity of plastic M3 20mm board supports and 5mm screws

15. Blank PCB board, 20mm x 50mm approx.


I freely accept that getting all of the above components into a 50x90x150mm project box is not easy and a larger project would have made things easier. However as the completed project shows it is possible. While I have not shown it, I recommend constructing the circuit on a suitable breadboard and testing its operation with the downloaded software. Construction starts with four equally spaced 8mm holes drilled into the top of the project box, to allow the four LED lights to be located there. Additionally, two 5mm holes are drilled on the face plate for the rotary encoder and Amp Volume control, a single 5mm hole is drilled in the center of project box’s side to allow access to the speaker, finally a single 12mm hole is drilled on the side of the project box to allow the Off/On circular two-pole switch to be installed.

Using a jigsaw and file a 96mm by 40mm square opening is made in the front panel to allow the 4x20 display to be inserted into the opening. It will also be necessary to drill 10 * 3mm holes in the front (4) and back panels (6) of the project box to allow for the M3 screws. The Arduino UNO R3 is wired to its components as laid out in the attached Fritzing circuit diagram.

The faceplate logo print, see attached PDF, is printed cut to shape and attached to the front panel of the project box. The IC2 controller is soldered to the 20x4 LCD screen and this screen is then attached to the front panel, after being inserted into the square cutout and fastened using 4 x M3 screws.

The two-pole switch is inserted through the 12mm hole on the side of the project box and the 8W speaker is glued to the inside of the project box so that the middle of the speaker is directly opposite the 5mm hole on the project box’s side panel. The rotary encoder and Amp volume control are attached to the inside of the project box’s lid and both of the knob control bars are past through the face plate so that they finish in the correct position in the center of the logo printout. Finally, the two control knobs are pushed onto the control bars.

When soldering the twin 18650 battery holder, ensure that the batteries are in series so that a total voltage of 7.2V is supplied, via the DC plug, to the Arduino. The 4 RGB LED light array is constructed using a blank PCB board, as per the Fritzing diagram. Where possible connections between components should be soldered, however if Dupont wires are used then it is recommended that all are glued in place after being tested.


The Volume control increased the sound level if turned to the left, and decreased the sound level if turned to the right. The Menu/Tempo control initially starts in the Tempo option and turning it to the left will Increase the tempo while turning it to the right will reduce the Tempo. By clicking this same control, at the end of the light sequence, the menu options can be cycled through: Tempo, Sound formats, Light formats, Adjust clock Hours, and Adjust clock Minutes. If the unit is switched off the default Tempo (67), Sound (x,x,x.), and Light (G,G,G,G) formats will be restored.


Version 3.1 of the software allows the user to adjust the Tempo from 20 to 250 beats per minute, at the same time the screen will display the description of this tempo, for example the range 41 to 60 beats per minute will display “Largo”. There are nine different sound formats including silent, with two different sounds, a short beep or a longer beep. In addition, there are nine different light formats including off, with two different lights available to select either red or green. The final two menu options are for setting the clock time, using the control, the values of the hours and minutes can be adjusted. A range of 0 to 59 for minutes and 0 to 23 for hours.

The following Arduino Library files are required:

#include (stdint.h)

#include (SPI.h)

#include (OneButton.h)

#include (Rotary.h)

#include (Wire.h)

#include (LiquidCrystal_I2C.h)

#include (Adafruit_NeoPixel.h)

#include (DS1302.h)

All of the above files can be found on the www.github.com web site. The software was compiled against the Arduino Uno board and used Ardunio IDE version 1.8.13

Arduino Contest

Participated in the
Arduino Contest

Be the First to Share


    • Pets Challenge

      Pets Challenge
    • Leather Challenge

      Leather Challenge
    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge



    1 year ago

    Very fine 'ible! In about half a year my old piano will finally arrive from my parents house in New York where its been since I bought it in 1978. I'm now retired and living in Japan. Other than keeping it in tune during my periodic visits home I've not played the thing in 40 years. Will have to find a teacher to try to get my skills back, but I'm very much looking forward to our reunion!

    I have an old mechanical metronome in the classic triangular shape that's in good condition. I think I will build your circuit but put it in a triangular shaped base that the old metronome can fit onto. That way I can use either one depending on the song, or my mood, or whatever. Thanks for the idea!


    1 year ago

    Excellent iBle. I am designing a build of my own synthesizer and have been trying to decide on how to incorporate a metronome, now I can modify this for a Nano and insert into my Synth case design.

    Thank you..


    Reply 1 year ago

    Hi, thanks for the comment. I agree with the reversal of the Tempo knob, simply re-fit the Rotary Encoder in the opposite direction inside the project box should do it. The beep / dot sound uses a simple beep command, I suggest that if this was replaced with a playable MP3 sound file, which contained a "click" this would certainly sound better. I have done this using an MP3 player attached to the Arduino, see any of my clock designs.


    1 year ago

    I like your design of having the LED’s on the top where one does not have to look directly at them for the visual effect. Some commercial models as types from Korg incorporate visual beats, “dots” into their LCD screen where all of the other graphics are, not so easy to see without focusing. Now that you’ve introduced the possibility of us building a metronome ourselves, we can customize away. Only thing I would have done differently is to reverse the direction of the knob for tempo, I prefer to turn clockwise to increase, as we would with volume. Perhaps I may also add the option to have the audio be a wooden sounding knock or click instead of a beep, for the traditionalist among us.


    1 year ago

    Just what I needed. I also am just learning to play the piano. This guide is right on time. :) I will be making one of these in the coming weeks.


    1 year ago

    Great work:)