Making Pomidor, a Pomodoro timer

Last updated: 22 days ago

Published: over 4 years ago

raw source | baked source

I made an electronic Pomodoro timer from scratch. Read on for a story on software, PCB design, production and assembly, with a sprinkling of inevitable catastrophe.

Working from home is easy for some, harder for others. I’m… undecided as to where I place on this spectrum. Some days WFH is a blessing, I’m insanely productive and very comfortable. Other days I can’t focus for beans.

While researching various focusing techniques I was reminded of Pomodoro. I last tried it as a study aid, as it was intended, at university. It didn’t really work too well for me back then, so I dropped it and never came back to it.

I quickly installed a browser extension and got cracking. And it worked. The cycle of focus-pause-focus worked really well for me this time around. It also forced me to make good plans of attack for everything I did, split it up into blocks of ~30min. It also felt better than just having a timer count up. When I look at a timer and it says 2 hours and progress has been slow, I feel guilty. Pomodoro timer is always counting down towards a reward: a break, a cup of tea, a snack, a longing look outside.

Also forced longer breaks every so often helped my back pain, by pure virtue of reminding me that I need to take breaks and stretch every once in a while.

So, I installed an extension, it works, I’m happy, blogpost over. Right? Well, no, obviously wrong, come on.

Prototyping Pomidor

I decided to build a physical object for Pomodoro tracking. Something I could interact with and somewhat more importantly, that didn’t have to live in my browser. I’m doing more pure backend development than web development recently, so it’d be nice to reclaim Chrome’s pile of RAM every now and again.

I had a vague concept of a box - kind of like a smaller alarm clock - with a single button up top and an LCD in the front. The idea was that a press on the button will start/pause/continue the Pomodoro or break period. I also decided on turning off the display after a few seconds from the last interaction so it does not draw my attention (ooh, shiny).

Also around this point, I decided on a name: “pomidor” means “tomato” in Polish, exactly like “pomodoro” in Italian.

This is what an evening of prototyping got me:

And it works… surprisingly well. There are quite a few kinks in the software, especially around debouncing the button, but it does what it’s supposed to do: Pomodoros like crazy.

The software lives over here: paweljw/pomidor. You may note that it’s an Arduino sketch (.ino), but an Arduino seems conspicuously absent from the photo. Well… a real Arduino certainly is, but that ATmega328P chip can be loaded with an Arduino bootloader. It’s not optimal, but I didn’t feel like messing with avr-gcc and wanted to leverage niceties like a pre-built library for LCD manipulation. Some constraints to keep in mind if you wanted to replicate it: the bootloader is large, Arduino sketches compile to rather large hexes, and you need an ISP to load anything onto an ATmega this way.

Making it permanent

Having something working, I decided to get a PCB made for it. I designed the circuit over at EasyEDA. It’s more or less intuitive to use, but I’d save myself a ton of hassle if I read their tutorials first. RTFM is forever it seems.

And while designing it, I did something stupid. I didn’t commit fully to a finalized board, instead placing a slot for an ISP connection and generally trying to make it something halfway between a devboard and Pomidor itself. Obviously, I didn’t know it was stupid when I did so, so I happily generated a Gerber file, sent it over to JLCPCB and waited for my boards.

A couple weeks later they arrived in the mail, and looked just peachy:

I collected the parts, heated up my soldering station, burned my fingers once or twice and assembled one.

It didn’t work.

Now the more electrically-inclined amongst you have been yelling “of course, ya dolt!” about since the schematic. It’s wrong: it’s missing a button which is normally pulled up by R1, but it still has R1, putting the ATmega328P in permanent reset.

Thankfully, that’s somewhat fixable: by replacing it with a 0 ohm resistor (a wire would also work) I got the chip to boot.

However, that obviously ruins the programming circuit: as the RST line is forcibly pulled high, I’d have to cut that resistor out every time I wanted to reprogram the board - the ISP has no way to reset the chip on its own terms. Oh well, it works, good enough.

Or is it…

The follow-through

The original plan was to make a 3D-printed case for it, slap that board in and just use it even in it’s broken state. But as I shared my design fail on some private channels, a few people asked me about kits. As in, would I be willing to sell them a board, a set of parts and the case so they could put one together.

Say of me what you will, I’m not known for shipping broken hardware. (Software doesn’t count!)

So this story continues: I already prototyped a v2 circuit. It also got a few more “user-oriented” features: a DIP switch for selecting Pomodoro period and break length, switches for power and sound, and an actual USB port for power. I also included a voltage regulator (since it won’t be powered off of a power supply I know and trust), and nixed all the development related headers and wiring.

I’ll share more about Pomidor v2 as that stage draws closer to completion - I figure since I’ll have to make assembly instructions anyway, why not make a post of that as well? :)


Comments (0)
Add a comment