-
11User Interface
The push button is attached the first external interrupt pin of the Atmega328P. The microcontroller spends most of its time in deep sleep, consuming next to nothing current. Whenever the push button is pressed the microcontroller wakes up from sleep and passes two variables to the main loop, a boolean flag that it just woke, and a recording of the current millis() value. These variables are used for debouncing the push button making sure it doesn't wake from just random electrical noise. If the micro wakes from noise it just goes back to sleep again.
As soon as the microcontroller is properly woken it polls the RTC for the current time and splits this time into the four separate digits. These separate values then gets passed to the LED matrix, displaying one digit at the time - really fast. The microcontroller also saves the current millis() value always comparing this stored value to the next. After 20 seconds of the watch displaying the time it goes back to sleep again.
You may be afraid that 20 seconds is not enough time to read the time in a binary format. To that I say 20 seconds is more than enough! I've used the watch daily for a week now and it takes maybe two seconds to read the time. If you do want a longer time then just go ahead and increase the variable that stores the amount of time before sleep.
When the watch is woken you can press the button once more, before the 20 seconds are up, to display the current date. This is presented in the format dd/mm.
So because this watch is made to be used continuously for two years without setting the time more than once, how do you adjust for daylight savings time that comes twice a year? That's potentially four times the watch has to be set without needing a new battery. I know DST can be a bother, not only do you throw off your sleep cycle, but you have to go and re-set every watch you own! Regardless of my unusually strong feelings about daylight savings time, this is not the time to discuss the topic. All you need to know is that this is something I've already prepared for. To toggle between DST mode simply press the button 15 times in rapid succession. This either adds or removes one hour to the current time, based on the DST variable in the code. Make sure you adjust this variable before uploading the code.
-
123D Printing
Because this was something I wanted to use on a regular basis, the watch needed to look polished and not super DIY. That's why I had the watch body profesionally 3D printed. If you have access to a 3D printer with great resolution and strong materials that's great! Ordering a proffesional 3D print contributed to about half the budget of the project. While worths it in my opinion, it would be great to have access to a cheaper alternative.
Download the 3D files here. To save some money the watch crown is attached with sprues to the watch ring. I also made five watch crowns instead of just the one you need. It's always great to add a few spare parts whenever you can.
Simply remove the sprues with your flush cutter and give the watch crown a quick sanding with some sand paper or a file and you're good to go
-
13It All Comes Together
By now we have gathered all the parts now it's time to put everything together. Due to a lot of planning this step is really easy and straight forward. Take a look at the pictures to see the order of how everything is mounted. The screws used to mount the case had their heads painted black to match the rest of the watch body.
- Insert the watch crown into the watch body
- Pull a short piece of wire through the mounting hole in the watch crown
- Glue down this piece of wire making sure the crown has 1mm of movement
- Insert the hex nuts into their designated hex slots and keep them in place with a small piece of tape
- Attach some double sided tape to the underside of the PCB/the plateau of the watch body
- Now insert the PCB making sure the crown peg is mated into the button hole
- Press the PCB properly down and that the crown activates the button
- Glue the crystal glass to the watch ring with a line of super glue on the inside perimeter of the watch ring
- Press down the crystal glass with some baking paper and wait for it do dry
- Insert the watch ring making sure to align the screw and crown holes
- Insert the M2 6mm long screws into the screw holes and fasten them with a screw driver
- Insert the watch band springs into the ends of the watch band
- Mate one end of the watch band spring into the designated hole
- Press down the other end of the bar spring and slide it into the hole opposite of the first
The final mounting step is the most enjoyable. Wrap the band around your wrist, buckle up, press the watch crown and amaze at your creation. You're finished!
-
14Final Thoughts
After an intensive process of development and endless hours spent debugging I have created my very own interesting time piece. The end result is a great looking, geeky, and durable watch I can wear to most any occasions to show off my interests and making prowess.
I have done my best to document the steps necessary to create the watch. If you do attempt this project or to make the watch with some custom modifications, leave a comment and keep me appraised of your progress!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.