Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multi LED Clock project - is PIC accurate enough?

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

I was thinking of building a clock based on this circuit.

**broken link removed**

Now I could just go ahead and build it but I wondered if I could do it easier and better with a PIC, well it would certainly need less chips, then I began to wonder about the timebase, the circuit on the link relies on mains frequency to do the timing at either 50 or 60 Hz.

Would a PIC using an Xtal be in the same league for accuracy as the good old mains frequency, or would it be better some other way?

Al
 
A crystal controlled pic would not be as accurate as a mains time based clock. However, a pic that detected mains zero crossing would be extremely accurate. You could also have an accurate standby oscillator for when the mains failed.

Mike.
 
Last edited:
The UK mains frequency varies during the day according to load and a mains synchronised clock may be out by several seconds at some point during the day because of this.
However, averaged over several days, it should compensate and remain fairly accurate.
You can see an example of the real-time accuracy here:
https://www.dynamicdemand.co.uk/grid.htm

A crystal based clock may only be as accurate as the quality of crystal that you use. Crystal accuracy is measured in ppm (parts per million)
A cheap one may only be rated a 50ppm or worse.
20ppm is about average and 10ppm is quite good.

A 32768khz watch crystal as used with a ds1307 rtc chip usually is 20ppm which gives an accuracy of about +/- 1.7 seconds per day.
Accuracy also varies with temperature and crystal ageing.

Better (more expensive) rtc chips incorporate some means of accuracy adjustment or automatic compensation.(the ds1307 has no adjustment).

Alternative, you could provide some adjustment within your clock.
This may be just a small adjustable capacitor in some designs or a software algorithm in more complex designs.
 
hi, i have a question. im trying to do the exact same project, and i dont have too much idea as to what the parts are for this schematic. could someone tell me as to what parts are needed to build this 72 led clock?
 
hi, i have a question. im trying to do the exact same project, and i dont have too much idea as to what the parts are for this schematic. could someone tell me as to what parts are needed to build this 72 led clock?

All the parts are marked on the circuit diagram in the first post.:)

Look at Al's link.
 
Last edited:
All the parts are marked on the circuit diagram in the first post.:)

Look at Al's link.

you see, i dont quite as understand all the parts entirely (i dont have too much experience building projects) and some parts on here i dont know what they are.
 
you see, i dont quite as understand all the parts entirely (i dont have too much experience building projects) and some parts on here i dont know what they are.

hi,
I'm sure BigAl has a parts list, why dont you send him a PM.?
 
nvm, i figured out the parts, im just confused as to how the 50 hertz LED clock time base is connected to the main circuit?:confused:
 
nvm, i figured out the parts, im just confused as to how the 50 hertz LED clock time base is connected to the main circuit?:confused:

hi,
The ac side of the rectifier connected to the transformer, is 50Hz ac.

This 50Hz sinewave is fed into an invertor via a 220K and 0.1uF filter.
On the positive half cycle of this ac signal the invertor switches so the output of the invertor is a 50Hz square wave which is used by the PIC.

Does this explain it OK.?:)
 
Last edited:
Or you need a 32.168 KHz clock crystal. When used with the specified capacitance, they ARE accurate, the application they are primarily designed for it watches and clocks. However, the PIC may or may not be able to drive this as its primary osc. Some PICs have a secondary OSC specifically designed to work off a 32.168KHz clock xtal.
 
Most PICs can run from 32.768 kHz watch crystals, recently I started using 40kHz watch style crystals on my Dragonfly kit (TIMER1 has a oscillator designed for watch crystals) as 40kHz is easy to get a 10ms timebase for a stopwatch.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top