Schematics and code to create your own Pomodoro timer on a breadboard using Arduino

Those who follow me on Twitter probably saw pictures and quick videos of my digital Pomodoro timer prototype. I used the case of a regular, mechanical timer and built a little Arduino on a breadboard (like, really barebones using a microcontroller) to fit inside it. This is how it looks like:

This was my first hardware prototype ever and I’m quite proud of it! A big thank you to my awesome husband for helping me whenever I got stuck.

In this first part I will show the schematics to create your own Pomodoro timer using an Arduino Micro on a breadboard. This doesn’t require any soldering.

In the second post I’ll show how I did the smaller version fitting inside the Pomodoro timer.

Ah, in case you don’t know: Pomodoro is a technique created to increase concentration and productivity. Learn more here.

How it works

The timer starts with a blue LED “static”, indicating that nothing started yet – I found this useful for knowing exactly when it is rebooted / powered on. When you click the button, it will start a working phase (25 minutes), where the LED will turn red and keep a “breathing” effect while it’s running. A little “buzz” happens when you click the button.

When the working phase is done, it will buzz in a different tone and the LED will turn to a static green color. This indicates that it’s waiting for your input to change to the rest phase. When you click the button (little buzz again) the rest phase starts, and the LED will change to a “breathing” effect. When the rest is done, it will buzz again and show the red static LED that indicates a new working phase should start. And so on. 🙂

This is how it looks like on the breadboard:

Pomodoro on a breadboard with Arduino micro

A video posted by Erika Heidi Reinaldo (@erikaheidi) on Jan 18, 2015 at 11:17am PST

What you will need

Schema

It’s quite simple, there are just a few details to pay attention to. As the LED is RGB we need to make sure the right pins are assigned, because they are controlled individually in the code. Sometimes they have a different spec, but usually we have RED – GND – GREEN – BLUE with GND being the longer tail. In my code I’m using pins RED = 11, GREEN = 10, BLUE = 9.

Also, the pins need to be PWM otherwise the “breathing” effect, that slowly dimmers the LED, won’t show. That’s why we are using these specific digital pins 9, 10 and 11.

And this is how my breadboard version looks like – I used a half-size breadboard so things might look a bit different, but it’s the same thing 🙂

Code

The code basically implements a state machine. The timer phases (WORKING or RESTING) won’t start automatically, it needs an input from the user – so the button status is only checked in the loop when the timer is not running.

It’s highly based on the Arduino website examples and documentation.