Wrist watches are amazing and fancy fashion accessories for men and women. Makers always like to use something different. My diy arduino dot matrix wrist watch is the final output after one month working. The watch shows time, date and temperature in two different form, BCD binary format and digital format. BCD binary is dedicated to maker and tech people as it is not understandable to common folks. Two button is used to adjust time and changing display mode.
For making the project you need some experience of soldering of surface mount (SMD) components.
Step 1: Stuff You Need- Arduino UNO for programming (Sparkfun)
- ATMEGA328P SMD (Digi-Key)
- DS3231 RTC (Maxim)
- 1.2 inch Dot-Matrix Display (display-leds.com)
- Crazyflie Nano Quadcopter - Spare battery (Seeed Studio)
- 100R SMD Resistor (8pcs) (R1-R8 in schematic)
- 10K SMD Resistor (3pcs) (RST, RSDA, RSCL in schematic)
- 16 MHz Crystal
- Tactile Button (2pcs)
- 1.5 inch X 1.3 inch PCB board
- Plastic Wrist Band
Tools needed
- Soldering Iron
- Soldering Paste
- Tweezer
- Wire Cutter
- Hand Drill
- Safety Glasses
I used Atmel’s high performance, low power 8-bit AVR ATMega328 TQFP package as the main controller of my clock. A high precision DS3231-based real-time clock module is used for time keeping. The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature- compensated crystal oscillator (TCXO) and crystal. So, no need to used external crystal oscillator and its operate from 2.3 to 5.5 V.
As a display a single color 1.25 inch 8x8 dot-matrix display is used. Both common anode or common cathode display can be used. You have to adjust the program accordingly.
Two right angle tactile button is used for time adjustment and clock mode changing. If you carefully check the circuit diagram you will notice that one button is connected to Atmega328 INT0 pin and another to PB1 pin. You can connect the second button to any other pin but should not change the first button. Because I used the button one to wake up the controller from sleep mode. For wake up the IC you must use external interrupt and for this reasons I used INT0 (external interrupt) pin for first button. 2-pin header is connected for charger and battery connection.
Eight 100 ohm current limiter resistors are connected to the row pins of the dot-matrix.
I designed the schematic in Eagle CAD. Eagle schematic file, image file and pdf file of the schematic are attached here.
Step 3: Designing the PCB LayoutI have tried to keep the PCB size as same as the matrix display. Two buttons position is kept to the right side of the board. I tried to keep the bottom route minimum because I used single side PCB and connect the bottom route by jumper wire.
Eagle board file and a pdf version is attached here. From the schematic you see two capacitor is connected to the crystal but not present in pcb. Without these the circuit works well without any problem.
Step 4: Making The PCBI used Toner transfer DIY method to make the PCB. Some image are attached. If you want to make your own PCB you may follow this instructables: DIY Customized Circuit Board (PCB Making).
For double sided PCB you may follow: Two sided PCB using toner method
DIY PCBs double sided toner transfer,
Step 5: Drilling The PCB BoardAfter etching and cleaning the PCB board you have to drill the pad of matrix display and button. I used mini hand drill to drill the PCB and image is attached.
Step 6: Soldering The ComponentsAfter drilling the PCB we are now ready to solder the components. Carefully solder ATMega328 first to the pcb. It has smaller pad compare to other parts of our project. Then solder the matrix-display, then RTC and then Resistor. Three 10K resistor is used in the project. Two are used for pull up of RTC SDK and SCL pin and another another is for pullup the reset pin of ATMega328. All other eight resistors are 100 ohm.
If you used one side PCB board like me, now connect the bottom routes by thick insulated jumper wire.
If you are new in SMD soldering I recommend you to watch the video before you start soldering.
Video: EEVblog #186 - Soldering Tutorial Part 3 - Surface Mount
Sparkfun: SMD How To - 2
Step 7: Arduino Program for Binary ClockAll program is written in arduino environment and uploaded to ATMega328 by using arduino uno. ISP programming protocol is used for programming. I have divided the program into two part and each can be used independently. One for binary clock and another for digital mode of the clock.
Following program is only for binary mode of the watch and used Button library:
Step 8: Arduino Sketch for Digital ClockDigital Mode use Frequency Timer 2 library.You can download library from here.
Step 9: Arduino Sketch for Sleep ModePower management is one of the most important thing for wearable and portable electronics. If power consumption is very high the the device may be useless and very difficult to maintain. So, I tried to maintain the power consumption as low as possible. For that I used arduino sleep mode which required very low current (only 100nA) for Atmeg328P. For AVR sleep mode to work, you have to include avr interrupt and sleep library in your sketch. Interrupt is used because only interrupt can wake up ATmega chip from sleep mode. If you remember a button is connected to the INT0 pin of ATmega328. I used this button to controlling the sleep mode. Following code snippet is used for enabling the sleep mode:
Step 10: Uploading the ProgramOur program is ready. It is the time to upload the program. I used ISP programming mode to program ATmega328 chip. After soldering the IC to the PCB board temporarily solder six jumper wires to MISO, MOSI, SCK, RESET, VCC and GROUND pin (Fig. 1). All pins are marked in the PCB layout. Connect Reset, MOSI, MISO and SCK pin of the board to Arduino pin 10, 11, 12 and 13 respectively through jumper wire. Connect VCC and Ground pin to Arduino 5V and GND pin respectively.
Now, upload Arduino ISP program from example to your arduino uno board (Fig. 2). Now arduino uno will act as ISP programmer.
Open the watch sketch and select Upload Using Programmer from the File menu (Fig. 3). Wait for a while, your program will be uploaded to the ATmega328 chip.
The complete sketch is attached here.
Zip file includes complete-sketch and required library.
Step 11: Adjusting With the Wrist BandOur works is almost completed. We built the hardware and uploaded the program. Now we should fix it with wrist band. Images show the steps of the work. Battery is separated from the circuit by insulator. I used hot glue to fix the bottom frame to the band.
Step 12: Power ConsumptionIn sleep mode the overall current draw by the watch is around 5uA. In active mode the current draw may vary from 100mA to over 250mA, though 150mA is the typical current draw.
After wake up watch remain active for 1 minute. If someone press the wake up button 15 times in a day then watch remain in active mode for an average of 15 minutes. If average current drawn is 50mA then by a 170mAh battery watch will live for 170/150 = 1.13 hours. Taking 15 minutes active time watch will serve 1.13 / .25 = 4.5 days for single charge of the battery.
ATMega328P draws 100nA in sleep mode.
DS3231 RTC draws 2.5uA for normal operating condition.
There small amount of leakage current can flow. Considering all the watch may be draw approximately 5uA current in sleep mode. In sleep mode the watch can serve more than 2 years by single charge of the battery.
Current draw breakdown table:
Part Minimum(sleep mode) Typical (active mode) ATmega328P 100nA 150mA DS3231 2.5uA 2.5uA Leakage (app.) 2uA 2uA Total 5uA 150mA
Step 13: The Final ProjectCongratulation! You have completed every step and your cool DIY watch is ready to wear. Enjoy it!!!
English is my second language. I apologize for any kind of mistakes.
Comments