|
CustomPCBWay
|
x 1 | |
|
ATTINY85-20PU |
x 1 | |
|
vibrating motor |
x 1 | |
|
BC547 |
x 1 | |
|
resistor 100 ohm |
x 1 | |
|
resistor 56 ohm |
x 1 | |
|
resistor 220 ohm |
x 3 | |
|
schottky diode |
x 1 | |
|
RGB led |
x 1 | |
|
battery 3.7v |
x 1 |
|
arduino IDEArduino
|
|
|
Hot glue gun |
DIY Pomodoro PCB Watch - Boost Your Productivity!
Story
Hi everyone, now I have an exciting project for you – we're creating a Pomodoro Technique PCB Watch from scratch. And guess what? This project is made possible thanks to our amazing sponsor, PCBWay!
I am a fan of productivity stuff, but I often find procrastinating after doing some work. I tried the Pomodoro technique and it suits me. But the problem is I use it on my phone, often sliding into social media. So I decided to make something off the phone and got the idea of making a watch. So, If you're ready to enhance your productivity in style, let's dive right in.
NOTE: A slight error in the footprint of the diode(terminal direction), just solder it the other way.
Introduction to the Pomodoro Technique
Before we jump into the project, let's quickly talk about the Pomodoro Technique. It's a time management method that involves breaking your work into focused intervals, typically 25 minutes, followed by a short break. This method helps to enhance your concentration and efficiency and also helps to reduce burnout.
I took inspiration from this project from Hackaday. Thanks to accidentalrebel
So to make it in a watch format we need to consider some important things, like:
- It should be small (so we need a small microcontroller like the ATTINY85)
- The battery should last long enough
- It should be sturdy and neat. (so make it on a PCB)
Testing on Breadboard
Before moving it to a PCB design I first tried everything on a breadboard. You can find the schematics below. Note: You need to program your attiny85 before doing this.
What I learned from doing this?
I learned many things like PCB designing, PCB artwork, watchdog timers, and power modes. Since this is a watch, its battery should last long enough.
Programming the Microcontroller
We need to program our ATTINY85, and for that, I am using an Arduino as an ISP (In System Programmer). You can watch this to learn how to program an attiny85.
Copy the code below and upload it using your programmer
- To lower power consumption, the code makes use of the ATTiny85's watchdog timer to do a countdown (but it is not that accurate).
- The code also uses sleep mode to reduce power usage
- Turned off the unnecessary ADC and set all unused pins to INPUT_PULLUP to save power
Schematic and PCB Design
I first searched for a good black-and-white image of a tomato( since the Pomodoro timer always comes in that shape)
Then I removed its background and uploaded it to a software called Inkscape where I made some edits and got the outline for the board and also made another.svg file for the silkscreen. (will provide these in the attachments). Then made the outline to a.dxf file and uploaded it to EasyEDA. Then I measured my wrist and made the outline of the board in that measurement. Also made two rectangular holes for inserting the strap
PCB Fabrication -- PCBWay
Once our design is ready, PCBWay takes the reins, ensuring our PCBs are fabricated flawlessly. When we receive our PCBs, we'll move on to the assembly stage. A huge shoutout to PCBWay for making this process smooth and enjoyable! https://www.pcbway.com/
They provide high-quality printed circuit boards (PCBs) at unbeatable prices. Look no further than PCBWay, your one-stop solution for all your PCB needs!
About battery performance
I have been testing with this circuit on and off the breadboard and PCB for about a month now and the battery is in nice health
Final Touches
After the PCBs arrived I soldered everything and I glued the Lipo battery to the back of the PCB using a glue gun.
Then as a final touch, I put the strap for the watch(It is actually the adjustable strap on a backpack) and attached velcro to it using staples.
Testing
I have mentioned that the timing is not that accurate. This project relies on the ATTiny85's internal clock for timing which is not very accurate. Also, we have set the watchdog timer's timeout to be 4 seconds.
Here are some test results:
First I tried it for 3min and 1min break:
Then here you have the results for 25min and 5min break:
Using Your Pomodoro PCB Watch
This watch works like a Pomodoro timer. It gives you a vibration when 25mins is over and another vibration, to let you know that your break is over. See the below GIF
If it is a watch it should tell you the time right? Yes, it does, but only informs about how much time is remaining in your 25min (or I would say, in your focus time).
If you want to know approximately how much time is remaining, you can press the pushbutton and the LED will show you Green, Orange, or Red. If it is between 0 and the first 15min it will show you, Green,
If you want to know approximately how much time is remaining, you can press the pushbutton and the LED will show you Green, Orange, or Red. If it is between 0 and the first 15min it will show you, Green,
If you want to know approximately how much time is remaining, you can press the pushbutton and the LED will show you Green, Orange, or Red. If it is between 0 and the first 15min it will show you, Green,
I now wear this watch all the time and it has improved my daily productivity (might be because of my excitement, but it works for me)
problems I Faced
I couldn't get a slide switch of that same footprint as in the PCB so I soldered two conductive legs and added a jumper between them to act like a switch.
And also made the mistake of not measuring the footprint of the pushbutton. So I had to make some adjustments and finally, the pushbutton compromised to solder it to the PCB.
At first, I thought of using a common cathode RGB LED for the PCB, but my LED broke and I couldn't find them in my nearby stores. So instead of that I adjusted it with atri-color LED. So be careful if you are using an RGB LED, make sure to change the code.(comments in lines 11, 151, 158 )
Issues
I tested this watch several times and it has an inaccuracy of 2 minutes for 25 minutes, because of using the watchdog timer. But don't worry I have rectified it in the code.
Conclusion
Even at the time of writing this, I am using this pomodoro PCB Watch :)
And there you have it – our own Pomodoro Technique PCB Watch. I hope you enjoyed this project as much as I did. It's not only a functional time management tool but also a fantastic way to dive into electronics and PCB design. Until next time, happy making!
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/power.h>
#include <avr/wdt.h>
#include <util/delay.h>
const byte motorPin = 1;
const byte buttonPin = 0;
const byte R = 4;
const byte G = 3;
// R+G = Y
volatile uint8_t pb0Pressed = 0;
volatile unsigned long wdCounter = 1; // Volatile tells compiler to reload each time instead of optimizing
unsigned long motorDuration = 500000;
unsigned long motorDuration_startend = 300000;
unsigned long waitDuration = 0;
unsigned long wdCounterTarget = 345;//345; as i hve 2min variatioin //15*YOUR MIN gives the input value 15*3 =45 =3mins
unsigned long wdCounterTarget_breaktime = 67;//67; // 5min break 67 is better than 75 because of the innacuracy
unsigned long timeDelayStarted = 0;
bool isInDelay = false; //flag
void setup () {
pinMode (motorPin, OUTPUT);
ADCSRA &= (~(1 << ADEN)); // Turn off the ADC
startMotorSequence(); // Run the motor once on startup
sleepNow();
pinMode(5,INPUT_PULLUP);//unused pin
pinMode(6,INPUT_PULLUP);//unused pin
pinMode(R,OUTPUT);
pinMode(G,OUTPUT);
pinMode(2,INPUT_PULLUP);//unused pin
pinMode(buttonPin, INPUT_PULLUP);
GIMSK = 0b00100000; // General Interrupt Mask Register
PCMSK = 0b00000001; //only enable it on pin0
}
void loop () {
if ( wdCounter == wdCounterTarget ) { // Check if counter has reached target.
wdCounter = 0;
timeDelayStarted = micros();
isInDelay = true; // Now in delay mode
}
// Continue to loop until enough time has passed to reach waitDuration
if ( isInDelay
&& micros() - timeDelayStarted >= waitDuration) {
startMotorSequence(); // Run the motor sequence
wdCounter = 0;
isInDelay = false; // End delay mode
}
if ( !isInDelay ) {
sleepNow();
}
if ( wdCounter == wdCounterTarget_breaktime) { // this is for break time
wdCounter = 0;
timeDelayStarted = micros();
isInDelay = true; // Now in delay mode
}
// Continue to loop until enough time has passed to reach waitDuration
if ( isInDelay
&& micros() - timeDelayStarted >= waitDuration) {
startMotorSequence_break(); // Run the motor sequence for break
wdCounter = 0;
isInDelay = false; // End delay mode
}
if ( !isInDelay ) {
sleepNow();
}
}
void startMotorSequence() {
digitalWrite( motorPin, HIGH );
_delay_us(motorDuration); // Blocking function delay
digitalWrite ( motorPin, LOW );
}
void startMotorSequence_break() {
digitalWrite( motorPin, HIGH );
_delay_us(motorDuration_startend); // Blocking function delay
digitalWrite ( motorPin, LOW );
}
void sleepNow () {
set_sleep_mode ( SLEEP_MODE_PWR_DOWN ); // set sleep mode to Power Down. The most energy efficient setting.
power_all_disable (); // Turn power off to TIMER 1, TIMER 2, and Serial Interface
noInterrupts (); // Turn off interrupts as a precaution. Timed sequence follows
resetWatchDog (); // Reset watchdog, making sure every flag is properly set
sleep_enable (); // Allows the system to be commanded to sleep
interrupts (); // Turn on interrupts. Guarantees next instruction is executed
sleep_cpu (); // Goodnight, ATTiny85
sleep_disable (); // Returns here after Watchdog ISR fires.
power_all_enable (); // Turn on power to TIMER1, TIMER 2, and Serial Interface
}
void resetWatchDog () {
MCUSR = 0; // Clear various "reset" flags
WDTCR = bit ( WDCE ) | bit ( WDE ) | bit ( WDIF ); // Allow changes, disable reset, clear existing interrupt
WDTCR = bit ( WDIE ) | 1 << WDP3 | 0 << WDP2 | 0 << WDP1 | 0 << WDP0; // 4s timeout first bit 1
wdt_reset (); // Reset the watchdog using the parameters
}
ISR ( WDT_vect ) {
wdt_disable(); // Disable the watchdog timer
wdCounter++; // Increase the watchdog firing counter.
}
ISR(PCINT0_vect) {
pb0Pressed = digitalRead(PIN_PB0) == LOW;
// Mask to set LED pins based on conditions //0.25 = 1sec for every 5min 25sec loss
uint8_t ledMask = (pb0Pressed && (wdCounter <= 137)) * (1 << G) | // <= 10min = 137
(pb0Pressed && (wdCounter >137 & wdCounter< 275 )) * ((1 << R) | (1 << G)) | // >10 and <20min = 137 and 275
(pb0Pressed && (wdCounter >= 275 & wdCounter <=345)) * (1 << R); // 275&345 20min and 25
// Set LED pins using bitwise OR and bitwise AND to preserve other pin states
PORTB = (PORTB & ~((1 << R) | (1 << G))) | ledMask;
}
DIY Pomodoro PCB Watch - Boost Your Productivity!
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by DEVA PRAKASH
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
159 1 1 -
-