Pomodoro Timer

As I wanted to test a rotary encoder, I made a pomodoro timer, see also https://en.wikipedia.org/wiki/Pomodoro_Technique. In the lock-down phases during Corona I do use it to prevent long sitting hours at the computer screen. During my lessons I use it to prevent long talks to the students. Here it is:

Pomodoro timer in action

Functionality

The switch/push button on the left is for switching it on and off. After switching on it starts at 25:00 minutes as the default pomodoro setup.

The rotary switch with push button on the right is for changing the countdown time:
first push – stop timer and set the minutes with rotary encoder
second push – set the seconds with rotary encoder
third push – start timer at time set, you can start at first push next time

When the time 00:00 is reached the display will blink and keep blinking. The buzzer will buzz three times.

Hardware

The display is a TM1637 chip with 7-segment display. I used a debounce circuit for the push button on the rotary encoder.

As microcontroller I used my MiniPill LoRa without a LoRa module, so basically a STM32L051C8T6 microcontroller. You can use any STM32 chip board for this project, for example a Bluepill or Blackpill.

A 3V buzzer is added for signing that the time has elapsed.

I used 2 Hammond cases (red and transparent) and switched the top-lid to get a red front.

Software

This time I used STM32CubeIDE for programming this project. I used the Timer-Interrupts for the rotary encoder and an Interrupt for the push button on the rotary encoder.

You can find the code here: http://git remote set-url origin git@gitlab.com:iot-lab-org/stm32l051c8t6_tm1637_encoder.git

Leave a Reply

Your email address will not be published. Required fields are marked *