Go Down

Topic: suggestions and improvement for a deskwatch (Read 729 times) previous topic - next topic


Feb 17, 2011, 01:01 pm Last Edit: Feb 17, 2011, 01:05 pm by Dragos Reason: 1
Hello everybody, my name is Dragos and i'm from Romania. I am building a deskwatch for my grandfather as he's birthday is coming in about a week. i'll present here my code, project, and what else and expect from you guys critics and suggestions for improvement. the thing that i am most interested in is the accuracy of the clock
so the watch will look like : more ore less. the hours will be on the left, minutes on the right moved by 2 micro servos.

the code is attached in the text document as the forum wont let me post over 9500 characters. sorry for the romanian name of the variables and stuff, but I needed to be intuitive for me.

some delays need to be ajusted so the menu works a bit faster.
is the schematic ok? is the pcb ok? what should i change? are the circuits around the ds1307 good enough so it will keep its accuracy?
I tested it on a breadboard and it works. in the mean time i made some changes to the code that i havent got the chance to test. like i'm using now pins 3 to 8 for the lcd. will it work with these pins or do i need PWM on any of them?

thanx a lot for your help and suggestions.
attached you have the schematic and the pcb of the circuit.


Feb 17, 2011, 01:17 pm Last Edit: Feb 17, 2011, 01:19 pm by Graynomad Reason: 1
I don't see any display cicuitry in the schematic so I have no idea what is being driven on the hours/minutes etc.

One thing is that there are no base resistors on the transistors.

You have a transistor switching LEDs through a 10k resistors,

a) if they are normal LEDs you don't need a transistor,
b) the resistors should be more like 330R

What is the light sensor, there is no resistor so is this a light to freq chip?

What's with R5, a pot with VC/GND and VCC again on the wiper?

AVCC and AREF should probably go to VCC.

How are you going to program the chip, all I see is a 2-pin header on Rx/Tx.

I didn't look at the PCB or code, I think there's too much to get right with the schematc first.

Rob Gray aka the GRAYnomad www.robgray.com


Feb 17, 2011, 01:40 pm Last Edit: Feb 17, 2011, 03:35 pm by Dragos Reason: 1
ok, my mistakes... I have it well imagined in my head so I forgot the rest of the details.
the 12 pin jumper in the lower part of the schematic is actually the LCD (display circuit). I will use cables to connect it to the board. it was easier for me this way.
the transistor is for a 3W blue led, it's actually 4.7 ohm 5W. i measured the current from the atmega to the base of the transistor and is 0.7 mA so i dont think i need a resistor there. the 2nd transistor is for a led on the 7th pin of the ds1307. i forgot the resistor there. thanx.

i made a few changes in the schematic now. hope it's easier to read.
the light sensor is actually a photoresistor in a voltage divider configuration on a separate board. it needs the wire for the analog pin, VCC and GND.

the pot is correct there, just "VCC" text was over it.

the atmega that i'm gonna use already has a bootloader. i'm gonna use an arduino board without its chip to program the chip on site using the rx-tx pins. i've tried that before and it works.


the thing that i am most interested in is the accuracy of the clock

DS1307, the RTC you are going to use, is as accurate as its crystal is.
For much better accuracy (+/- 2mins/year) use DS3231, codewise compatible with DS1307.

Go Up