27. Ember – A Pomodoro Desk-Lamp Controller

Background

I use a Pomodoro timer to track my work.

This is a productivity technique where work is split into 25-minute segments called Pomodoro’s followed by a 5 minute break. It’s upto what you do on the break. Take a walk, close your eyes, grab a drink. The point is that you physically MOVE.

However, what I find happens is that I continue working beyond the 25 minutes. I need some way to enforce the break.

Thus, this project was born!

Once the Pomodoro expires it will toggle a lamp, shining intense bright light into my face, telling me to take a break. A relay will switch on the lamp, indicating that it’s time to take a break.

Also, Ember prevents a sedentary lifestyle promotes active fitness. This is important as in the service economy, a large portion of jobs is someone sitting behind a desk staring at a screen. This can be detrimental to your health.

Ember promotes active fitness through regular breaks

How Ember works

A 4-digit 7-segment display is used to configure the length of the work period/Pomodoro and the length of the break. By scrolling the knob (hehe) on the encoder, you can vary the time which I believe is a nice aesthetic touch. Pressing the button on the encoder switches from setting the Pomodoro to setting the break. Another press begins the Pomodoro.

The timer begins decrementing until zero is reached at which point the relay toggles the lamp, indicating its time to take a break.

The relay load-side is rated for 10A, 240VAC which is plenty for controlling a desk lamp.

Hardware Connections

NOTE: THIS PROJECT USES 240V MAINS. DO NOT TOUCH AC MAINS UNLESS YOU’RE A LICENSED ELECTRICIAN. (I can since I’m a professional).

I used custom symbols for the GPO and desk lamp. I discovered that controlling a desk lamp is fairly straightforward. After tearing one apart, it works by a DPDT switch simply toggling the AC mains. Thus, if we want to control it, I added the relay as an additional switch in return path of the circuit.

Things to watch out for:

  • Verify if your 4-digit 7-segment display is common-anode (CA) or common-cathode (CC). This significantly changes the circuit

The schematic is available at my GitHub repository.

The Software

Full source code is located in my GitHub repository.

Showcase