Today I tried laying out the pomodoro timer on a small breadboard I had lying around.In the end, I could fit everything on the board, so that was good news. There are two major drawbacks to this, however: firstly, as you may notice, there’s no power laid out here yet; and, secondly, I’m going to have to solder this point-to-point.
As far as power is concerned, I’m planning to use a 3.3V coin battery, which I was hoping to mount somewhere on the back. However, given how tight everything is mounted, that may not be an option. I’ll pretty much be using every little bit of real estate there. Firstly, of course, for the leads of the components, but as they’re all placed so close to each other, I’ll have to do point-to-point soldering, I’m assuming right now. That will also imply I won’t have a surface left to glue a coin battery mount to. I may have to resort to leaving that just trailing on a side.
Either way, I’m looking forward to soldering these components on soon, now that I have a basic layout going.
Yesterday, I liberated the Atmega328p from the Arduino Uno, and installed it in the breadboard. I rewired the full thing to fit on the one board, changed the resistances for the LEDs around to 220Ohm (as I moved from the 9V to a 3V power source), and had to fiddle with the code a bit to get the ports correct. I’m pretty pleased with a fully working breadboard prototype. The next step is to solder it to some perfboard, and have a mobile prototype ready. Perhaps if I enjoy it enough, I’ll actually make some PCBs for this.
One thing that I might consider to add is a small switch near the buzzer to turn the audio off or on if needed.
As I mentioned yesterday, I learned a little bit more about ISP, and so I learned not only how to run the Atmega328P without an external crystal timer, but also how to flash it on the fly. I’m pretty happy with this redesign right now, and don’t see it changing significantly. Possibly, another revision might replace the IC with a version of ATtiny, seeing as how eight ports are not used in this design. As far as the actual schematic is concerned, I’m pretty pleased with how orderly it came out, though I’m less pleased with how the ISP module connects to the Atmega328P: there are 11 crossing cables in there, due to the positioning of the AVR-ISP-6.
If I were to clean this up, I’d have to basically make a new symbol for the Atmega328p that would fit that general principle. PB0, PB3, PB4, PB5, and PC6 are better suited to be placed on the left side of the Atmega328p, considering they’re all set as inputs. That would make the whole image much cleaner as a result. I guess if I ever do end up making a fourth revision, I’ll clean that image up for a more final result.
Yesterday, I also managed to run my first succesful test of uploading an Arduino sketch using the USB programmer. I haven’t tried uploading directly through AVRDude just yet, because that would involve compiling my own code, which would be the next step. First, I wanted to see whether uploading itself would work. So, I hooked up my USB programmer to the Arduino Uno, and used the Arduino IDE to flash the Atmega328P via the programmer (for which it uses AVRDude in the background anyway). It went off without a hitch! I also tried setting the lfuse to 0xF2 to have it run on its internal clock, which results in the program running half as slow (as the internal clock is 8Mhz versus the 16Mhz external crystal). So, I did have to adjust some timers to have it run correctly again.