Pomodoro Breadboard

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.

This photo shows all the components of the pomodoro timer on a breadboard, with a long ISP-6 cable in the middle leading off-screen.
The finished prototype on my breadboard. As I wired this up, I discovered that some of the ports on my schematic were off. Fortunately, now that I have an ISP in there (that wide cable in the middle there), I could just adjust the code slighlty to match the ports that I had on the schematic.

One thing that I might consider to add is a small switch near the buzzer to turn the audio off or on if needed.

This image shows the electrical schematic of the pomodoro timer.
I adjusted the schematic based on the redesign, and also cleaned it up a little more from the last iteration. The only thing I can see that would make it neater is to adjust that reset connection between the ISP and the ATmega328P so that the reset line is at the top, to clean up the resistor. However, I didn’t feel like editing up the schematic in KiCad, save it to a new library, and so on.

Pomodoro Timer r2

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.

The third revision of the Pomodoro timer, which is likely to be a final version for the time being.

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.

AVR ISP

I’m trying to learn a bit about in-system programming of microchips, and specifically some of the Atmel chips. I have an Arduino Uno lying around, on which I programmed a simple Pomodoro timer, as well as an ATtiny that I wanted to use to experiment more with.

That Pomodoro timer idea was a lot of fun to make, and taught me a bit about bit masking and so on, but I never got to putting it on some perf board, because that would either require getting a 16Mhz crystal in (something I’d just not gotten around to) or otherwise setting some fuses in the Atmega328P (something I had no idea how to do). Recently, I found this tutorial on Assembly programming microchips that seemed quite fun, and it require the purchase of an AVR programmer. Fortunately, you can pick one up for about €5 if you go off-brand, so I just got one. As luck would have it, that’s exactly what I need for both purposes.

The tutorial on Assembly I’m intending to follow is written for Windows, and so includes plenty of references to Atmel Studio. As is usual in these cases, Atmel Studio is not available on Linux, so I had to explore alternatives. After a lot of hits and misses (usually involving using an Arduino Uno as a programmer), I end up finding a YouTube channel where somebody made a helpful tutorial series on moving from using an Arduino to going as close to “bare metal” (i.e. using little software) as possible. So, not only do I learn I can use AVRDude on Linux to achieve my goal of following the Assembly tutorial, I also learn that I can flash my Atmega328P with this thing so that I can break that out of the Uno board and use it standalone. Score!

I look forward to being able to complete that Pomodoro project in its first iteration soon, and thereby picking up some relevant skills for the later tutorial as well.

Happy about a silly little thing

I’m trying to learn a little bit about microchip programming for fun, and bought an ATtiny and a USB programmer to follow along with a tutorial. Sadly, it seemed that I lacked a necessary plug to interface the two. A grab through my components and some sloppy soldering later, I have a little adapter that I’m happy enough with. Yay!

The soldering is a little sloppy, but it works! It was quite tricky, since the perf board I had was without copper islands, but we do what we can with what we have.

Quest for new headphones

So, a while back my old headphones, a decent pair of ATH-M50X broke. They’ve served me well for over seven or eight years or so, though they did need some work. I ended up replacing the earpads with some velour ones, as the regular ones ended up making my ears really uncomfortable. I also ran into the standard problem with ATH-M50Xs, which is the broken hinge for which I had to insert a paperclip to keep it going. And, as they all tend to do in the end, the headband started flaking off, so I had to replace that with a cover. So, now that these have broken, I have been looking around for a new pair.

One thing that’s rather important for me in headphones is easy of replacing each part. I used to buy Sennheiser headphones before I had my ATH-M50X, and invariably the cable would break, rendering the otherwise fine headphones useless. With the ATH-M50X, however, I could replace the cables twice over its lifespan, and it still worked fine, up until the actual right speaker died on me. So, my first requirement is for parts of the headphones to be replaceable, and most importantly the cable. Secondary to that would be having non-proprietary parts; one downside to the ATH-M50X is that the cable has a proprietary hinge, meaning that you heavily limit the cables you can buy.

Back when I bought my other headphones, they were pretty top-of-the-line as far as budget headphones went. Now, of course, we’re almost a decade further on, and the market has apparently moved on quite a bit as well. I’m very tempted by the AKG K702, a set of open headphones that get rather good reviews (which, incidentally, is much cheaper in the Netherlands). The advantage of open headphones, apparently, is that they have a much larger soundstage than closed headphones, resulting in much more authentic sound. The downside of this is sound bleed: because the headphones are open, you will hear more outside noises, and the outside will hear what you’re listening to as well. So, these are generally recommended for indoor use.

Before, I used headphones quite a lot while out and about, because I had a four-hour commute daily. Now that I have moved, my travel time to work is reduced to only a couple of minutes. The main use for headphones while traveling now would be for airplanes, for which open headphones are decidedly unsuitable. During COVID-19, this isn’t so much of a concern, but once this apocalypse is over, Tracy and I would like to visit her family in America again on a regular basis, so it’s a serious consideration to make.

It looks like the AKG K371s are a decent compromise to make, or possibly a pair of AKG K271 for a similar form factor to the K702 (which I do appreciate quite a lot). I’m struggling with the question whether I should sacrifice the audio quality of an open-back set of headphones for a situation which, frankly, probably isn’t happening often anymore. Before COVID-19, I would likely travel by plane two or three times per year which, added to the several hours of commute per day, did necessitate the closed-back headphones. Now, though, I may just settle for a really good pair of headphones for around the apartment, and perhaps a much cheaper set for once we start traveling again.

Incidentally, right now, I’m using a set of Bose QuietComfort 35 II and they are just awful headphones. They are not comfortable to wear for longer periods at all, and the sound quality is surprisingly low. It’s overly bassy, and sounds quite boxy, with an extremely narrow soundstage (then again, what else to expect from Bluetooth headphones?). When Tracy tried them on, she described the experience as claustrophobic. The one thing that these headphones do much better than any other set I have ever used is active noise cancelling – without a doubt they are the king in that respect. If they weren’t so expensive, I would buy a pair of these just for plane travel.

Electronics: Pomodoro Timer

Now that my law degree is taking a bit of a backseat (a lot has been delayed because of the COVID-19 pandemic), I’ve dipped back into my electronics hobby. I’d basically put that on a backburner to favor the law degree. So what am I to do with so much time? Well, use my very basic electronics skills to make something to manage time!

Continue reading “Electronics: Pomodoro Timer”