The mounting hardware still need some work, but the device is working now:
There are a few comments to add:
The mounting hardware still need some work, so you can expect some writing about it
The two currently used buttons also has remote capability through a 3.5mm Jack. The external buttons drive the internal ones through optocouplers. This is not isolated just there for providing some noise immunity.
There are place on the board for crystal. I don't know if such precision is required, but I didn't populated yet.
Based on my breadboard design I created a schematic in KiCAD, designed the PCB and ordered from ALLPCB.
It arrived in a week:
Started to populate it - here comes the problems:
I chosen a wrong size package for the ATTINY85, so I have to bend the pins to be able to solder in
The micro USB connector wasn't far enough from the edge
The 3.5 Jack had two missing holes.
Those was easily correctable. So the build (without the display):
After resoldering the ATTINY for a few times, I was able to download the code, but nothing appeared on the display or the LEDs. Scratching my head. Then I realized, that the ISP connector has all of the pins required to drive the TM1637. So I connected this external display to it:
It was working. I started to measure the board, and instantly realized the problem. The VCC and GND pins of the TM1637 was swapped. How this happened? I mirrored the TM1637 part in the KiCAD. After this the GND pin went to the top of the drawing and the VCC to the bottom. After this I connected the power pins as usual. The VCC to the top and the GND to the bottom. IDIOT!!!!
I got a request, to design and build an electronic metronome. You can find several on the market, but the problem it is ether producing voice or the classical mechanical metronome. The requirement here was a visual effect. To be precise four LEDs for 4/4 beat. It is required for drumming where you have no chance to hear the clicking (or maybe just through headphones). So the idea:
Pick an MCU (in my case it is an ATTINY85)
A three digit LED display to see the beats per minute
Two buttons to change the speed
Four LEDs (in my case four RGB LEDs to be able to change the color from code)
Power Supply, and the usual things needed for such circuit.
If you check the things above, you can quickly realize, that there is not a chance to drive the things above from an ATTINY85. Here come into the picture an article I wrote earlier: http://pakahuszar.blogspot.hu/2018/01/tm16xx-arduino-library.html The library I wrote for the Titan Microelectronics display drivers originally made for this project. So you can add a TM1637 to the picture above. It able to drive 6x8 LED segments, plus read 2x6 buttons. It is more than enough for LEDs, display, and the buttons. After writing the library, the actual code of the Metronome was quite simple. First I built the whole thing on breadboard, but using an Arduino UNO instead of the ATTINY85: