Assumptions:
- to use all LEDs
- realized on a microcontroller
- system is to be clocked by “punching rhythm”
- construction is to be cheap
Operation of the system:
System using LED is to present a pendulum motion known from mechanical metronomes. This is a much better solution than just listening to the beeping – it shows how long you have to wait for beep. Setting the rhythm is double tap in the housing (a place on the left side). The first tap resets the counter and lights LED on the far right side, while the other continues the started rhythm from the left LED. The key to pause and resume work and turn off the device (hold longer). The rhythm can be modified during beeping as well as during a pause – then after the second tap the metronome will start automatically. If there will not be the second tap, the metronome will automatically start after about 2,5s. There is also auto-off function that will work if after 20s on the pause there will be no tap.
The program was written in Bascom and takes after compiling a little more than 1300 bytes. LEDs are powered multiplex. Originally it was supposed to be 16 pieces (there is a place on the board) but it turned out that in this case only 14 pieces are available. Working resolution is about 0,5ms. Maximum speed of beeping is around 150ms, minimum 2,5s.
The biggest problem was appropriate placing the piezo sensor. The device had to be sensitive enough to easily recognize taps and so resistant to external signals and do not respond to a clap etc. Some modifications were introduced to the amplifier input stage (220nF added to filter too high frequencies) and the sensitivity changes a little (there is a capacitor in parallel with the resistor 100k). Interestingly, even sticking the piezo sensor is very important. The best results can be got from such a solution as in the picture.
A standard buzzer was used as the sound signal. There is a gate in the program (change in a single line), which allows the generation of sound but the buzzer is more practical (small size) and louder. The only thing (not incorporated in the diagram), which was added was a headphone output. The signal was pulled by the capacitor and potentiometer from the collector of the output transistor.
At the end, a short presentation of how it works in practice:
Link to original thread (useful attachment) –
Metronom tap-tempo na Attiny24