Analog As Well As Digital Watch

by maker_ATOM in Circuits > Arduino

4559 Views, 36 Favorites, 0 Comments

Analog As Well As Digital Watch

IMG20210201104604.jpg
IMG20210201104513.jpg
IMG20210201105047.jpg
IMG20210201130811.jpg

Recently I had thought of making a DIY wrist watch but didn’t worked upon it until now. What interesting about this wrist watch is that it is digital but actually analog, what I mean to say is time will be shown by LEDs but the way LEDs are arranged makes it look like more analog.

The Plan

IMG20210106134434.jpg
IMG20210126161257.jpg

The plan is to arranged LEDs in circular format so that every number can be indicated by LEDs, to keep it simple only hours and minutes will be shown and not seconds.

So, 12 for hour and 30 for minutes (I will address this in a while) having 42 LEDs on a circular area of diameter 45mm is not a joke and and even 3mm LEDs cannot fit, many smaller SMD package are available but I decided to go with 1206 package as these can be easily soldered by hand. I opted for hand soldering so that the project can be made by any other who wants with minimal tools and materials. For soldering SMD components you have to buy solder paste, a hot air gun or hot plate iron which simply increases the cost to project

How are we going to drive 42 LEDs ?? Answer is a method called charlieplexing. Using this we can drive many LEDs with fewer pins of a microcontroller. I wont go in deep the basis is that we arrange all LEDs in matrix and then drive them by turning high one pin, low other pin and remaining in high impedance mode meaning no current flow through them. (more detail here)

If we had n number of pins we can drive n*(n-1) LEDs so for 12 LEDs of hours we need 4 pins and for 30 LEDs of minutes we need 6 pins.

The reason we have 30 LEDs for minutes is space, 60 LEDs of package 1206 just don’t fit inside area of diameter 45cm none the less time will be rounded off but still can be perceived.

I have decided to go with red and yellow LEDs as they have lower forward voltage than other colors.

According to ohms laws appropriate resistor value for red and yellow led comes out to be 150 ohm R=(Vcc - vf)/iled where vf is forward voltage of led and iled is current drawn by that that led but current while driving one LEDs goes through two microcontroller pins, in from one and out from other so actually 300ohm resistor is in series with a led when driven.

To drive LEDs we need a microcontroller and the best choice is atmega328p but the package in which it is available is not easy to hand solder so I am going to use Arduino pro mini as brain and DS1302 RTC module and Lipo battery for power and tp4056 charging module which also has overcharge and overdischarge protection.

The advantage of using atmega328 based board is that we can have any pin in high impedance mode by putting it in input mode and which is we want for charlieplexing we could have used hardcore electronics but then we need a complete understanding of it which makes the build complex so will go with microcontroller.

No special reason for choosing ds1302 module just its small size.

First layer of PCB is full with LEDs and current limiting resistors so the remaining three modules will be placed under the led PCB on another PCB and lipo battery under it and the two PCBs will not be solder but attached using headers and to make them not slip out, holes for headers will be slightly off set so that they stay in tact thanks to friction (this is small feature, we can call it plug and play).

To get time we will have a button which when pressed will trigger external interrupt and time will be shown.

Garther Required Materials

IMG20210123141045.jpg
IMG20210203140231.jpg

Tools

i. Soldering iron

ii. Plier

iii. Arduino Uno without the microcontroller (the one having DIP package)

Materials

i. Tin solder

Electronics components

i. 1206 red leds x 12

ii. 1206 yellow leds x 30

iii. Arduino pro mini x 1

iv. Ds1302 module x1

v. Tp4056 charging module x1

vi. Lipo battery x1

vii. Headers male x 12

viii. SMD button x1

ix. Bent headers -1x2

Misc.

i. PCB service

ii. 3d printing service if you don’t have a 3d printer

iii. Candle (any thing to heat)

iv. Paper pins/single strand wire

v. 12v dc fan

vii. Male jumper wires x5

PCB Design

schematic led dial.png
dial pcb top.png
IMG20210123133852.jpg
schematic bottom layer.png
uc pcb top.png
IMG20210123133917.jpg
dial pcb bottom.png
IMG20210123133827.jpg
uc pcb bottom.png
IMG20210123133907.jpg
  • PCB is designed in easyeda software.
  • I didn’t use any such thing to put LEDs together I placed them manually calculating angle for each led and resistor.
  • 30 LEDs for minute so each led has a difference of 12 degree.
  • Headers are placed in center making a circle and two of them are offset so that while installing we don't get confused over orientation.
  • Pro mini, RTC and charger all are placed so that they occupy minimum area keeping in mind that USB micro faces outside the board for charging.
  • For programming pro mini rst, rx and tx are extended to PCB so that jumpers can be inserted and be programmed
  • I even added place for bent header so that power can disconnected from lipo when required specially while programming as we don't use the regulator on board of pro mini cause the voltage of lipo vary from 4.2v to 3v, when need to power we simply add the jumper.

Gerber files are below:

Led dial

Bottom pcb

Programming Arduino Pro Mini

IMG20210123155200.jpg
IMG20210123232209.jpg
IMG20210125192135.jpg
  • Programming pro mini is super easy connect dtr of pro mini to reset of arduino uno (dtr->reset), similarly rx->rx and tx->tx make sure to remove the atemega328 chip on uno board.
  • Open arduino ide, go to tools, select board as arduino pro mini, processor as atmega328 3v 8mhz appropriate port and programmer as AVRISP mkll.
  • Power the pro mini with 3.3v through regulator on uno board
  • And upload the sketch
  • We have programmed pro mini before soldering it onto the PCB but if in case you want to upload a tinkered sketch after soldering do the same as above only instead of connecting pins to pro mini connect to space provided on PCB also don't forget to remove the jumper to disconnect the lipo and use 3.3 voltage of uno to power it as logic level should match to VCC.
  • Don't forget to connect RTC module to pro mini as follows rst of RTC to A0 of pro mini (rst -> A0), I/O -> A1, SCLK -> A2

Library for DS1302 RTC by rinky dink.

Downloads

Solder LEDs and Modules

IMG20210123180814.jpg
IMG20210123180829.jpg
IMG20210124114010.jpg
IMG20210124114039.jpg
IMG20210124131229.jpg
IMG20210124190031.jpg
IMG20210124190046.jpg
IMG20210124190109.jpg
IMG20210124190122.jpg
  • While soldering LEDs, start from center and go outwards as we going to hand solder it makes the process easy.
  • To solder pro mini onto PCB make sure to remove the black spacer of headers as it reduces height of the build sometimes it is hard to remove spacer so instead you can use single strand wire and cut to required height.
  • And same can be done for RTC but the crystal blocks the way so you can desolder place on bottom side (where button cell is present) and again solder (this thing came in my mind after the build so I was not able to implement it but you can definitely give a try).
  • Solder bent header facing outside.
  • For the dial and even bottom PCB don’t solder every thing at one go, solder some, then test and solder again
  • Like what I did is soldered inner LEDs first, test them then go for outer ones.
  • It even helped to find if there is bad solder, connection problem or design error.
  • Do remove (desolder) the led attached to pin 13 of arduino pro mini to reduce power consumption.

Printing the Case

Screenshot 2021-01-29 123945.png
Screenshot 2021-01-29 124102.png
Screenshot 2021-01-29 124912.png
Screenshot 2021-01-29 125022.png
IMG_20210201_17503164.jpg
IMG_20210130_210649_267.jpg
IMG20210131094144.jpg
  • While designing a case for the watch I decided to have two pieces and they will have male and female wedges so that when put together they will lock into each.
  • But when I 3d printed it I noticed that the measurement of the height of the watch was pretty wrong and it just don’t fit so there was a flaw in design but I used this flaw to solve another problem (more in assembly step, and even what I did to hold them together) till then you print the case.
  • I have printed the case in creality ender3 using black PLA with these settings, if you don’t have printer no problem you can approach a 3d printing service (I used one of my friends)
  • Settings (sliced into creality slicer ) :

Layer height (mm) : 0.1

Shell thickness (mm) : 0.4

Enabled retraction

Bottom/top thickness (mm) : 0.4

Fill density (%) : 20

Print speed (mm/s) : 50

Printing temperature (C) : 210

Bed temperature (C) : 70

Support : none

Filament diameter (mm) : 1.75

Flow (%) : 100

Nozzle size (mm) : 0.4

Assembly

IMG20210201183051.jpg
IMG20210201183114.jpg
IMG20210202071949.jpg
IMG20210202072342.jpg
IMG20210202072556.jpg
IMG20210202072609.jpg
IMG20210202105626.jpg
  • Before we start for assembly lets look at the problem and how the design flaw helped it (cause I noticed the problem while assembling).
  • We are using a lipo battery hence a charging module TP4056 is used which uses 1A of current to charge the battery which results in heating of the module due to TP4056 ic reaching temperature of about 150C which has the potential to deform the the 3d printed case (I even tried other settings like 500mA to charge but still temp rises to 150) so we need to somehow cool and that's where the flaw (error in measurement) comes in handy as I printed the case with the error, there was a gap of 5 mm in between the two pieces so having a decent air flow can cool down the TP4056 ic using a 12v dc fan just by keeping it aside so that air flow is maintained but now the pieces don’t fit together so we need an external agency to hold them together which you will get it as you follow the assembly.
  • First insert the bottom layer PCB into top piece where the arduino side should be facing non circular part make sure lipo battery is not connected.
  • Then insert lipo battery into bottom piece carefully solder the positive and negative terminals of lipo to TP4056 module in place where it is indicated as bat+ and bat-
  • If you try to place the pieces on to each other they remain still but when tilted top piece falls off so we need something to hold the pieces together.
  • Take a paper pin(unwind it)/ single strand wire(do remove the insulation) and heat it when sufficiently hot make 3 holes on each side of both pieces by simply inserting into the pieces PLA material does melts creating such holes.
  • At the same time clear the material which gets stuck into holes which will be used for attaching wristband so that watch wraps arounds your hand.
  • We need to do this cause while printing creating such holes is hard, it just fills up the holes.
  • Use a plier to cut as well as to bend the wire into C shape, the length should be equal to distance between two vertical holes
  • now carefully insert the C shaped into two holes.
  • This ensures that the two pieces don’t fall off when tilted maintaining the gap for air flow.
  • To attach the wirstband cut wire to length of two segments where band fits.
  • Insert through one hole place band and push the wire through other hole.
  • Do the same for other side also.
  • Now insert the dial into top of watch keep track of orientation.
  • Its done !

Done !

To check time you only have to press the button and it will show the time for 2 seconds.

Lipo battery last for upto 17 days, it can even last more than that if the power led is removed if not it helps to indicate whether battery is discharged or not.

Now you are good to go just wear it and watch the watch being bold in action !