Arduino Pomodoro Timer

Some days are worse than other. On these bad days you don’t feel like working, people are constantly interrupting and, in general, not much is being done. When I have a day like this I use the Pomodoro technique to get back on track. The basic idea of the Pomdoro technique is that you try to focus solely on your work for 25 minutes minimizing all external and internal interruptions. You measure the time using a tomato shaped kitchen timer and hence the name – Pomodoro. Using the actual Pomodoro timer might seem like a good idea at first but in reality is not. The timer is ticking quite loudly which is annoying not only for you but also for people around. Using a software timer (I tried http://timemanage.me/) did not work for me either – other people can’t see it so it is impossible for them to know you are in the middle of your Pomodoro. On top of that you can’t check how much time is left without switching windows and losing focus which contradicts the very goal of Pomodoro (i.e. avoiding interruptions). This is why I decided to build my own Pomodorro timer. The requirements were simple – the timer had to be standalone so that I could check how much time is left with just one glimpse. To help prevent from external interruptions it also needed an indicator showing other people that I am busy. Meeting the first requirement was quite simple – a TM1637 based 4-digit LED display seemed good enough for the job. The second one was a bit harder. I got a little creative and bought a mood enhancing light (you should have seen my wife’s face when I showed her what I ordered) on Amazon. Now, that I got two most important parts the rest of the project was quite easy. I needed a few more parts like Arduino board (I went with Arduino Nano because of its size), a button (needed for restarting the timer), a color LED (to light my cube to indicate when I am busy) a small breadboard and a handful of resistors and jumper cables. This is the end result:

This project is quite easy but is really fun. You can try building a timer like this yourself. First connect the parts as shown on this picture:
PmodoroTimer_bb
Once the hardware part is done you need to upload the code to control the circuit. You can find the sketch in my ArduinoPomodoroTimer github repo. The most complicated part of the code is setting up the interrupt handler. I took it from my other project where I built a digital clock using an LCD display from an old Nokia phone. Take a look at this post for more details. Another complex piece is handling the LED display. Again, I wrote a very detailed post on this very subject a while ago so take a look at it to understand the code. The rest of the code is just about changing the color of the LED when the timer reaches 0 and reacting to button presses and is pretty straightforward.

Happy Pomodoring (is it even a word?)!

Advertisement
Tagged , , ,

8 thoughts on “Arduino Pomodoro Timer

  1. Fons says:

    Hello. I have found your article with this awesome countdown with the TM1637 and I have a question for you. Is it possible to speed up the countdown in any way, for example with button actions?

    Thanks in advance and regards.

    Like

  2. Maciek says:

    I try to use timer for hour & minutes instead min&sec. and use switch not only to start Pomodoro timer but freeze time when switch is off.

    To do first condition I’ve changed 2 values exp.:
    const unsigned long sprintDuration = 36000000; // 25 minutes=1500000 for t=1000
    unsigned long t = (unsigned long)(time/1000); // default 1000 t=1s, for 60000 t-1min

    but if I do that, double dots flashing not every sec. but min. Code is clear form me only a little bit and I do not know how to do that – any suggest please.

    Is it possible to stop counting if switch is changing from position on to off & start again as switch is next on?

    thank You for any suggest

    Like

  3. Carlota says:

    Hello, I love what you’ve done, I think it’s a fun project and easy for beginners. I’m actually a beginner myself and I was wondering if you could use this same design and code on the Arduino Nano Every?

    I’ve tried already and there seams to be a problem with the code somewhere around lines 45 to 73. I would really appreciate your help, thank you.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: