Hello, do you like to build your own Wrist-Watch?
It surely is a challenge to build a small DIY Wrist-Watch like this. The benefit is the pleasure to having made your own idea real and beeing proud of reaching this skills-level...
The reason for me to make my own Watch was that my cheap smart-watch –stated to be water-proof– gave up its poor ghost once dipped into a swimming pool... :(
So I was angry of buying watches (another expensive "solar"-watch also gave up - its propietary small-sized battery had no chance to be replaced...).
On the other side, existing DIY-Watch Projects for my flavor were mostly to heavy or too rustical – so I decided to build my own watch, having so the possibility to include my preferred features!
If you like, you may modify the software, to realize your own ideas: I've commented out every line (depending on chosen Program between 700-800 lines...) – But be warned: This project is really challenging and surely not for beginners! The small and light sized (30 x 30 x 10 mm) form requires precise handling of the 3D-Printed case and careful soldering of the 2-sided board: although option for PCB-ordering of the board exists (Eagle- and Gerber-files included) here I made it with my specialized Toner-Direct method – instruction therefore also included here).
Properties of the Clock:
- The 128x64px OLED-Display shows a Digital and Analog Clock, activated with the Right button, showing Date, Time, Battery-Level and Wrist-Temperature. Alternatively (if you like) it may include an Alarm or a Timer.
- A complete Month-Calendar is displayed pressing the Left button more than 0.6s, highlighting the actual week-day.
- Pressing the Left Button short selects a simple Menu to choose Date, Time (and Alarm or Timer, if chosen to include in the program), values to set with the Right button.
- Pressing the Right button twice activates a small LED-"Torch"-Light, (good for black nights).
- Between 22PM and 7AM the OLED-Display is automatically dimmed, (see there, with included special dim-function!) so it doesn't blind at night.
- The Li-Ion Battery lasts nearly 2 Years, assuming the display+electronic consumes about 25mA lasting 5s alight, displaying the clock about 10 times per day.
Step 1: Parts List
If you like to experiment yourself with the hard- and software, you need:
• Breadboard 8.2 x 5.5 cm AliExpress
• 3,3V regulated Power-Source, like this on the schematic above or one similar, sourced f.ex. from a 5V-USB-Connector (500mA). ⇒ AMS1117-Adj ⇒ ebay
• SMD SOIC-8 to DIP-8 pin Adapter for the RTC-Chip ebay
• Atmel ISP-Programmer like the "USBTiny" - AliExpress
• Arduino Pro Mini AliExpress
• Breadboard Jumper-Wires Banggood
• ⇒ see Html-BOM-file for electronic-parts (Download).
• The 2-sided Board for the Clock itself: ⇒ see Step "How to make a 2-sided Board with the Toner-Direct Method".
• 1x - Battery ø24 x 3mm - Lithium Battery 3,2V (button cell) - CR2430 - AliExpress
• #25mm Kapton/Polymid Tape for isolation between board / battery and OLED-board
• 1x Wrist-Strap 20mm - I recommend a "Milanaise Stainless Steel Wristwatch Strap" - ebay
• 3D-printed Case : ⇒ see Download-file with instructions (Step).
One board out of two?
In case you would like to make one board out of two (uC, RTC, else parts AND the OLED-steering-board in one), you may use my circuit + board-layout for the SSD1306-I2C-Display (see Download: OLED-Display_SSD1306-I2C-Circuit.zip). Using the 2 whole layers and isolate them against display and battery with Kapton Tape, so the clock may be about 1.5mm flatter as yet.
Step 2: Electronic Circuit
First of all we need to know the basics:
This OLED-Clock is made with a DS3231 RTC-chip (Real Time Clock in a smaller SMD SO-8 form), witch is steered by the all-known ATMega328P-(Arduino)-µController, and - in contrast to normally used soft-StandBy (of the µController) - this clock is provided with a complete electric shutdown after 5 seconds, besides the RTC. I made this shutdown with two mosfet-transistors, which acts as a "toggle-switch" in conjunction with the uC and the right Button (D8).
Two small Push-Buttons on both sides of the case (D6 and D8) are acting as Inputs, witch handles the menu and the settings of the clock.
The clock has a Date+Time Display, (Alarm-Display - if included in program), a Flashlight and a Calendar of actual month+day. In the 2nd. version I included an Alarm, it can be replaced also with a Timer.
The Display is dimmed between 11:00PM and 7:00AM (23:00h and 07:00h) at night.
Function of the 2 Buttons (on the left- and and on the right-side):
• CHANGE-Button D8, (right-side), pressing:
1x = activating uC/Display, so displaying time+date, etc. for about 5 seconds before shut-down (=display dark).
2x = light-up the Flashlight/Torch.
3x = return to Normal-mode (=Mode-0).
• SELECT-Button D6 (left-side):
Pressing D6 once selects MODE, rolling the Modes from 1-10, to change Date/Time, etc (dow, day, year, time, seconds, alarm... on/off).
Button-D8 on the right raises the selected MODE-values, set and saved selecting the next MODE (with left Button-D6)...
To change the seconds, set the clock +1 minute, then press the right Button (D8) at 59 seconds to synchronize to an external time.
Syncronizing time/date is also possible downloading the PC-time per batch-file: Serial-Connection to an extern Arduino - from there to the four I2C-Pins of the Clock-OLED. (The uC of the Clock remains deactivated in this time, for this purpose I included the 2 R's of 4.7kΩ, R7 and R8 - bridge them if not used!)...
• Month / Date Calendar:
If the left Button (D6) is pressed more than 0.6 seconds, an actual Month-Calendar is displayed. No self-deactivation! If one of the two Buttons are pressed once again, the Calendar is left.
• ALARM: (if included in software-program + provided with a hardware-tweeter or micro-piezo-beeper)
Can be set to beep on time match every day at the same time (24h, 60m). An asterix on top-right of the Display indicates if the Alarm is "On" or not. An useful alternative to the Alarm-Program perhaps would be a Timer... (to do).
The battery is a CR2430 Lithium-Battery (ø24x3mm) with about 300mA Power. A Battery-Symbol indicates the (analog-)level of the battery (3,25V=full, 2,75V=empty). The Clock is working with Voltages from +5,0V down to +2,0V (default: 3,0V). Only the Flash-LED works from max. +4,0V down to +2,7V. Warning: Don't activate it with 5V! - this is too much for the LED - it expires in few seconds, although provided with a 33Ω-resistance. Absolute Max.-Voltage for the Processor and the RTC is 5,25V (+5V USB to program the uC directly per ISP, without bootloader!).
The RTC has a built-in temperature-sensor (to correct the temp.-deviation of the built-in crystal), so we can use it to display the (wrist-)temperature.
If the CHANGE-Button (D8) is pressed twice, a relatively bright light is "glowing in the dark". Att.: No self-deactivation! Only pressing this right button once again deactivates this LED, showing the normal display for about 5 seconds.
• Soft-Reset Pin:
A Reset-Pin (D7) resets all stored data if grounded (open case: bottom-right side). Used on programming time, in short for a "soft-reset" of all input-values...
If we look at the schematic, at the left there is the naked "Arduino" µController (ATMega328-P), activated with the right Button (D8) on Input D12: Button-D8 pulls the Gate of P-Mosfet down through Resistance R5 and diode D1, so the P-Mosfet goes "on" and connects VBAT with VCC: µController+Display gets current!
To see the "Toggle-Principle of the two Mosfets I have uploaded this "Flip-Flop with two Mosfets" (Eagle-files).
After 5s the µC automatically shuts itself down through Output-D5, which deactivates both Mosfets, pulling the Gate of the N-Mosfet down, so R5 (and Gate of P-Mosfet) is going "high" and the P-Mosfet cuts the current of the µC and the OLED-Display. VCC going down holds the Gate of N-Mosfet down through R3 and R6 (below his Gate-threshold-voltage), so the circuit remains Off.
On the upper-left side we see the "magnified" VBAT-voltage through a simple white-LED with about 2.5V , downsized with 100k from VBAT (about 3,2V) to about 1,1V (max), which is used as internal Analog-Input to measure the actual Battery-Voltage.
µController, RTC and OLED-Display are communicating throgh I²C, a simple and effective 2-Wire-Communication, implemented per library.
To solder the SMD-parts it is useful to use a small tweezer with spiky ends, so grepping the small SMD-parts would be easier to handle (positioning) and solder then with a fine soldering-tip, soldering first one side of the SMD-Part, pre-heating the solder-point to about 330°C before adding low-melting and fine tin-wire (ø 0.5mm) to the soldering point.
Download the Circuit + Board-layout:
Step 3: Hardware: How to Make a 2-sided Board With the Toner-Direct Method
If you like to buy the 2-sided board here are provided Eagle + (needed) Gerber-files (Download).
If you like to make the board yourself, I show you a precise method to make a 2-sided board per "TonerDirect".
1. Print-out the file "OLED-Clock-2-nl_TonerDirect.pdf" on "Toner Transfer Paper",
2. Cut-out the 2 stripes of the Paper, one stripe for each side of the board,
3. with ø 0.5mm needles sting precisely the 4 corners of the board (use a magnifying glass with bright light - it is very important to sting the needles with your best possible precision in the middle of the 4 corner-vias!).
4. Print-out (on a normal blank Paper) the file "OLED-Clock-2-nl_Frame.pdf" and bond the result on a 2-sided copper circuit board (0.5-0.8mm thick). Sawing the board out with about 2-3mm more tolerance (here about 35 x 35 mm), then drill the 4 holes precisely on the corners with a 0.6mm drill. After this step remove the paper with acetone and grind the 2 copper-sides of the board with fine grinding-paper (min. 400). After this step don't touch the board anymore with blank fingers! Allowed is to grip it sideways (with clean fingers).
5. Mark the congruent direction of the Toner-Tranfer-Paper on the 2 non-printed sides!
6. Sting the needles through the paper, then through the board and finally sting them through the oppsite paper.
7. After getting the three "layers" exactly congruent, replace the needles with 4 pieces of 0.5mm copper-wire, bent on one end 90°, so that they dont flush through. After this step bent the wires on the other side 90° and cut the ends short.
8. So prepared, this piece can go 3 times through a (modified) toner-laminator, heated up to 200°!
9. Cut-off the small pieces of 0.5mm-wire and remove the remaining wire-rests. Then remove the two papers and voilá: the toner is sticking firmly on the copper.
10. Control clean lines: If a line is broken, we may repair it with a permanent water-resistant pen. In most cases only greater surfaces need to close few small holes. Otherwise (if the result is insatisfying), remove the toner with kitchen paper and Acetone and repeat Steps 1-9.
11. Clean etching: I etch my DIY-copper-boards with a solution of Sodium persulfate (one-two teaspoons) with a level of about 5mm water in a classic Pyrex-Dish (1-1,5L), this solution heated upto about 80°C (I know, this relative high temperature destroyes the persulfate, but it etches much faster as with lower temeratures and makes sharp and clean edges in few minutes). I let the remaining persulfate damping after drying completely and scratch the crystals out, collecting them in an old jar for recycling!
11. Control the copper-lines and surfaces with a magnifier-glass.
12. Remove the jut-out borders with a vertical band-grinder (like in my first instructable) and control dimensions with a vernier caliper: the 2 button-sides must be parallel, having 27.4mm distance, but be careful not to grind-out the 2 button-contacts!
Step 4: Software and Flashing
Programming the board:
The program is written in C++, so we can modify it with a simple ASCII-Editor, and it needed, read the explanationsat the end of each line...
Important: We can't use the Arduino's Serial-Flashing to program the µC, because the bootloader needs too much time between "Start" (pressing Button D8) and "Display-On". So we have to flash it without a Bootloader (used normally on all Arduino boards). So, we program our board per (Atmel) ISP-Connector + Programmer. The ISP-Connector made here (onboard) is made with 6 mini socket-connectors broken-out of a row and soldered inside on the right side of the board, then connected with a (small!) 6-pin bar (2.54mm-grid), like on the last foto in the previous Step.
You need not only the Arduino-GUI, but a few libraries more (to download) to compile the program:
- The Wire library (contained in the Arduino-Program) - for communication per I²C betw. µC, RTC and OLED-Display
- EEPROM library (also contained in the Arduino-Program) - to store several values on the µController
- "Adafruit_GFX" + "Adafruit_SSD1306" - both libraries to steer the OLED display
- EnableInterrupt - to work with Arduino's Port/Pin-Interrupts (⇒ Button-Inputs)
-DS3231-RTC-chip: not need a library, I have written-out the functions of several libraries found on Internet and beeing simpler to use so. They are included on the end of the main-program ("OLED-Clock-2-nl.ino").
Attention: The Adafruit-library has (upto now) not really an effective handling to dimm the OLED-chip, so I copied a string from Internet and pasted it at the end of the "Adafruit_SSD1306"-library, with witch one can dimm the display, a bit more useful... (⇒ see the Add-on Download "How to set the brightness on OLED display.zip", here at the end).
Working with 3,2V - so using the internal 8Mhz (without 16Mhz-Crystal):
The µC here is fast enough to work without a 16MHz-crystal, so (with 3.2V from Battery) we can use the internal pre-programmed 8MHz (one fewer part to solder :-).
(the compiled .hex-file is found on the PC's temporary-folder, there on a sub-folder like:
"C:\Tmp\arduino_build_646711\xyz.ino" - therein you can find the wanted compiled-hex-file, in this case our "OLED-Clock-2-nl.ino.hex".
The hex-file now can be flashed (here "manually" per avrdude on a command-line) through an ISP-Connector, but you need a Programmer like the USBTiny or an AVRISP2 with a 6pin ISP-Connector (my ISP-Connector is DIY-out of
a small 6-Pin-Row Connector like shown in my last foto, so you can reprogram the board any time if required).
Now connect the 6-Pin Programmer to the board (I suppose known experience with Arduino-boards)...
Connected, on a Command-Window (on Windows change to the avrdude-folder, then typing cmd) - paste this following line:
avrdude.exe -C avrdude.conf -v -V -p m328p -c usbtiny -e -D -U flash:w:OLED-Clock-2-nl.ino.ino.hex:i
After the flashing of the µController has finished, appropiate "fuses" (of the µController) have to be set:
avrdude -p atmega328p -c usbtiny -U lfuse:w:0xFF:m -U hfuse:w:0xD7:m -U efuse:w:0xFF:m -U lock:w:0x3F:m
If you wish to modify one of this settings, you can find more about with this online Fuse-Calculator.
Step 5: The Case
Not only making the electronic-board is challenging, not less is a small and light-weight case for this board!
Here to download my purposed Case, with a pssible CR2032 Battery-Adapter, to insert a more common used battery. The electronic-board and the battery have to be isolatwed completely from each-other with a Kapton-Polimid-Tape or a strong alternative. Dont use simple Adhesive-Tape, it's too weak to isolate strongly and can cause shorts of the battery!
I've experimented with many layouts (for 3D-printed PLA) and concluded with a wall-thickness of about 1.3 mm. In this form the forces coming from the wrist-strap are hold efficiently through both sides of the case in conjuction with the snap-in lid. The other sides may be skinnier, about 1.0 mm...
So, modifying the height of the case (in case of modifying the board...?) shall not be a great problem.
Also, if you would have a an Alarm or a Timer inside, you need another Case, so I made a proposal how to insert a small piezo-tweeter (or f.ex. this micro-speaker: CUI-15062S)... (See Case-2).
After the case printed-out (with a recommended layer-heigth of 0.1mm and about 50% infill with "wall-overlap") you have to burr the overcoming side-strings, filing the edges round enough, but not too much... A bit more challenging is to file the 4 small snap-ins of the lid in a right ~100-120°-angle, so that they snap into the case strong enough, but without dilate or break it - nor resulting the lid as too small to stay fixed...
The square-hole for the OLED has also to be filed-out carefully, matching exactly the outline of the OLED-glass, without breaking it while probing to insert Board+OLED-Display (now in conjunction). So be careful filing and trying repeatedly to see if all parts fits.
Resulting flues are best taken-off with a sharp cutter knife.
Now you may insert wrist-strap with a piece of brass-wire (ø1mm, length: 28.5mm). For this the 2 holes of the case-brackets have to be bored-out in such manner, that the wire goes through, but then sticks firmly into the brackets.
Before you arm the case with electronic and straps - it is possible to enamel it with paint (I recommend automotive thinner-spray – it drys faster, sticking fewer dust on the surfaces!). I recommend also to treat it first with a (thinner) grounding-spray, which then can be sanded-down to a fine-smooth surface without printed-lines and flaws. Myself I prefer a golden or silver finish, or also a wooden finish would be nice – this is on your choice...
Step 6: Conclusions
The CR2432 Li-Ion-Battery has about 300mAh capacity, so it holds with a duration of approximating 2 years, if displaying the clock about 10 times (each á 5 seconds) per day. So you may exchange it with a more common available (but smaller) CR2032 Li-Ion-Battery, which holds about 1,4 years with it's 210mA.
I searched also for a rechargeable Lithium Button-Cell like the (common) CR2430 and found this: "LIR-2430". This battery has only about 50mA capacity, but is rechargeable f.ex. through a wireless power-transfer... For that purpose I made a probe and you can see the result in the schematic + layout included. The power-transfer itself does the job very nicely. To etch a flat coil with about 30 turns over a flat epoxi-board-lid, remains a ToDo... To charge the battery I proposed a simple charge-circuit with a white LED and 2 Schottky-Diodes to limit the End-Charging-Voltage for this rechargebles to a maximum of about 3.6V...
Finally – VERY important:
!!! NEVER CHARGE A NON-RECHARGEABLE LI-ION BATTERY !!! - it may explode and catch fire!
Curiously I experimented with a (non-rechargeable) CR2430 Li-Ion-Button-Cell, -as precaution- in a closed jar...
After about one hour, charging with constant 3.3V, I noticed a small convex deformation of the case... and although the Voltage of this battery increased from 2.8 to 3.2V, the Capacity at the end was massively reduced! – so a recharge doesn't make sense: this Button-Cells are really NON-rechargeable.
Remaing to do:
• a (software-based) Timer function + (hardware + case)-Tweeter or Vibrator-Motor
• a Wireless Recharging Circuit
• Glossy metal- or wood-finish.