You are on page 1of 5

LED WATCH

This is a LED pocket watch. It has 12 LEDs to show the hour, 60 LEDs to show the minute, and 60 LEDs to show the second. The LEDs are arranged in three rings. There is a button on the top to activate the pocket watch, and a button on the back to change modes and settings. The battery is a rechargable lithium ion coin cell battery and it is charged from a micro USB connector. The battery life depends on how heavily the pocket watch is used, but if you leave it alone, it is estimated to last several months. There is a low battery indication feature. This pocket watch also feature a buzzer and a vibration motor, which are used for the alarm feature, and the motor causes a short "tick" as each second passes by. The pocket watch is constructed of a PCB, two pieces of laser cut clear acrylic plastic, and a 3D printed casing.

This isn't the first LED pocket watch to exist (I saw this one), I want one of my own, and when I want something, what I really mean is I want to build something. There are some flaws in other designs that I didn't like, so I have my chance to improve upon those flaws.
The top three goals are to look good, user friendly, long lasting. It is very common to see LED pocket watches that do not have all 60 LEDs for the minute "hand", some have only 12. I really want a clear indication of the current minute with no guessing or estimation involved. So I decided to use 60 LEDs. I want 60 LEDs for the second "hand", and some of the other designs do not feature a second "hand" at all. As the seconds change, it creates motion, which gives the viewer a feeling of confidence and pace. You will feel confident that the watch is working, because you can visually see each second tick away. Plus, it will look prettier. There are 12 LEDs for the hour "hand", not 60. Although following the behaviour of an analog clock might sound good, it makes it a bit slower to visually interpolate the current hour. I explicitly chose not to use bicolor or tricolor LEDs. I want three rings because the different radiuses helps me distinguish between the different "hands" faster. Right now I check the time using my phone, I'm sure a lot of you do too. So I decided I wanted it to have the size that fits comfortably in my hand, just like my phone, and I wanted a single button to activate it, just like my phone. I wanted this to be something I use daily, it must be durable. Most of the time it will be in my pocket. A casing is required to protect the circuitry from junk inside my pocket. The casing also has a hole, so I can attach it to a chain. Nobody likes replacing batteries, especially when it is stuck inside a case. So I decided to use a rechargable battery. The easiest battery charging method today is probably by using USB, all you need is a cord and a USB port. The buzzer and motor feature are basically just fancy additions because I can do it. I'm not limited on cost, and they will physically fit in the design, so why not? I made one that is black and green because green is the cheapest PCB color and I have a preference for black. The purple edition is because OSH Park makes purple PCBs, I wanted a case to match the color, why not make two and see if I like it. As I am coming up with my goals, I also have to consider the materials and equipment I have access to. PCB, laser cutting, and 3D printing services can be found online and I am already very familiar with all three of these techniques.

Well... this is a LED pocket watch, not a mechanical pocket watch... so start off with designing the circuit. The problem we are trying to solve is "how to light up 132 LEDs in a way that indicates time?" I am using CadSoft EAGLE 6.2 to draw the circuit schematic and lay out the PCB design. Starting off, the simplest way to do this is with a microcontroller of some sort, we'll worry about which one soon. The challenge lies within the number 132. One option is to select a microcontroller with 132 pins, simple, right? But the microcontroller will be gigantic, and the design will look bad. The solution is to group the LEDs so I can multiplex them. My design arranges the LED in a 30 anodes by 5 cathodes (I may refer to these as "rings") "matrix". This means I need 35 pins to drive 132 LEDs. (click on the LED matrix image above, it is an animation that shows you how my LED matrix works) I also need 5 resistors (R1, R2, R3, R4, R5) to limit the current to the LEDs, so they operate within their ratings and not burn out. It's important to notice that different color LEDs have different voltage drops and have different maximum safe current specifications, and also the battery voltage will vary over time (exceeding its nominal voltage during and immediately after recharging). I've selected a common 330 ohm resistor for this job. Taking the worst case scenario, which is 0 voltage drop across the LED, and a battery at 4.2V, Ohm's law says the current will be 12.7mA. This is safe for almost all small LEDs and safe for the GPIO of the microcontroller. I need at least 2 buttons, which means two more pins are required on the microcontroller. It will be ideal if these pins supported some form of interrupt to detect the button presses even during sleep mode. It will also be ideal if these pins featured internal pull-up resistors, so external pull-up resistors are not required.

So my minimum pin requirement right now is 37. I did some searching for a microcontroller that meet this requirement, and decided on an ATmega645P (or something similar with less memory, memory requirements for this project is actually very small). It features 54 free pins. Comes in a TQFP package so I can solder it without needing hot air (I can do QFN but I'd rather avoid it, especially for an Instructables project where people's skills vary). It operates down to 1.8V so it's easiy to use with a coin cell battery. It has a hardware RTC which I can use to keep track of time, even in sleep mode. The picoPower version states that it has some insanely low power usage, which helps with battery life. So knowing the operating voltage of the microcontroller is between 1.8V and 5.5V, I know that I can safely power the circuit using a rechargable lithium ion coin cell battery (nominal voltage is 3.7V, maximum is 4.2V) without using a voltage regulator at all. The charging circuitry is extremely simple to design, the charger chip is a MCP73831 and the datasheet has example application circuitry, which I've adapted. Unless otherwise stated by the manufacture, it is safe to assume that the battery can be recharged at a rate of 1C, which means 1 multiplied by it's capacity (in AH or mAH). Since my battery has a capcity of 150mAH, I can safely recharge the battery at 150mA. Using the calculations from the datasheet, this means I have to use a 15 kilo ohm resistor to set the charging current. The hardware RTC (timer 2 in asychronous mode) within the microcontroller requires a 32.768 KHz crystal to keep track of time. The crystal needs loading capcitors on each pin, or else the crystal will show large frequency instability and the time won't be accurate. The microcontroller shall operate using its 8 MHz internal RC oscillator (saves space and money by avoiding another crystal), and that frequency will be divided internally by 8 to conserve power. The microcontroller needs one decoupling capacitor for every VCC pin, this is a general rule-of-thumb I've adapted, the purposes is to filter out fine noise from the power bus. The ATmega645P features internal pull-up resistors (I have previously mentioned that it'll be nice to have these), so the buttons do not require external pull-up resistors. The AVR microcontroller needs a ISP (in-circuit serial programming) connection so I can program its firmware, this means connecting the reset and SPI bus pins, plus providing a ground and power connection. The low battery detection is a simple voltage detector (the TC54, configured for 2.7V) that will drive a pin low when the battery is below 2.7V. In the end, there was space and free pins left over so I added a buzzer and a vibration motor. The motor is driven by a MOSFET. The MOSFET has a pull-down resistor (R8) on the gate so it doesn't go crazy when the microcontroller isn't controlling it. There is a resistor (R9) to the MOSFET's gate to protect the microcontroller pin from a brief current spike during switching. The diode is there to protect the circuit from back emf from the motor (this diode is known as a flyback diode).

So the part I need for my project are given in the table below

Qty

Name

Value

Package

Notes

Sch Name

Mfg Part #

time and charging Red, indicator, 133 LED Green, Yellow choice 0603 your own colour LY Q976-P1S2-36 all LEDs LG Q971-KN-1, LS Q976-NR-1,

R1, R2, R3, R4, 6 Resistor 330 ohm 0603 LED current limiting R5, R7, R9 Panasonic ERJ-3GEYJ331V

pull-down for 1 Resistor 100 kilo ohm 0603 MOSFET R8 ERJ-3GEYJ104V

sets charging current 1 Resistor 15 K ohm 0603 for U2 R6 ERJ-3GEYJ153V

Ceramic 2 Capacitor 0.1 uF 0603 MCU decoupling C1, C2 0603YC104KAT2A

Ceramic 2 Capacitor 25 pF 0603

for XTAL load C3, C4 capacitance

Tantalum 2 Capacitor 4.7 uF 1206

USB decoupling, C5, C6 battery decoupling TAJA475K006RNJ

2-SMD, 4.90 x 1 Crystal 32.768 KHz 1.80 mm clock source Q1 ABS10-32.768KHZ-1-T

ATMEGA165PA-AUR, 1 Microcontroller ATmega165PA 64-TQFP main microcontroller U1 ATMEGA165PA-AN

Battery Charger 1 IC MCP73831T SOT-23-5 charger for battery U2 MCP73831T-2ACI/OT

Low Voltage 1 Detector TC54VC2702ECB713 SOT-23-3 low battery detection U3 TC54VC2702ECB713

5.25 x 5.25 1 Tactile Button SMD Vertical mm

changes setting S2 mode

PTS525SM10SMTR LFS

Tactile Button

TH Right Angle

6 x 3.5 mm

main button

S1

MJTP1117

11 L x 9 W x 1 Piezo Buzzer 1.7 H, mm alarm buzzer Q2 CMT-1102

alarm vibration 1 Vibration Motor motor MOT1 KHN4NX1RC

MOSFET

N Channel

SOT-23-3

drives motor

Q3

NTR4003NT1G

Diode

SOD-323

flyback diode

D1

BAT54HT1G

Micro B, 1 USB Connector TH Shell charging connector X1 ZX62D-B-5P8

Battery Holder

SMD, 2430

holds battery

BAT1

3006

2430, 3mm 1 Battery thick rechargable battery PD2430

I am thankful to u to give me chance so that I can make my project successful.

You might also like