|
|
#21 |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Hi Explicit,
Found some time to develop a little schematic... ![]() I used a PIC16F876 (8KB Flash, 32 IO's) because I have a few laying around. Other current PIC models (16F648, 16F676, even 18Fxxx) could be used with minor software modifications. Can't tell at the moment how much flash memory is required but I guess it will be around 4KB. The decoded DCF77 signal on connector K2 (from the DCF module) is fed into input RA4 (Schmitt triggered input). LED D4 on output RA3 blinks every second when a DCF77 bit is received (could also be used to feed two semicolons with blue LEDs between Hours and Minutes, and between Minutes and Seconds). LED D5 on output RA5 lits when there is a DCF reception error (parity error, no start bit, number of DCF bits different from 59). The buzzer is optional and can be used to signal the hours. The six displays are multiplexed through outputs RC4 to RC6 and fed into a 74238 (3-to-8 line decoder/demultiplexer) that drives the six display driver transistors (T4 to T9). The code to display on each digit is output on RC0 to RC3 in BCD format and fed into a 4543 (BCD-to-7segment driver/decoder). After the 4543 I used a UDN2981 (or TD62783A) 8 channel High-Side Driver to drive the segments through 150 Ohm resistors (as told before the 4543 can only output 10mA peak per segment). Connector K1, Relay Rel1, switch S1, LEDs D2 & D3 are optional too and used for ICSP (In-Circuit-Serial-Programming), meaning that you can program new flashcode through an external PIC-programmer into the PIC without opening the clock and removing the PIC out of his support. ![]() The hardest thing is yet to come: Develop the code for the PIC, although I already have the ASM-routines for DCF77-decoding, 24H clock, display addressing and multiplexing available. "All" I have to do is put them together... CD ![]() Edit: I forgot to explain the use of the +9V voltage Since the blue displays need a forward voltage of about 3.7V, the driver transistors have a saturation voltage (Vce) of about 0.7V and the high side driver a Vce of about 1.5V (totalling 5.9V) the +5V isn't sufficient to feed the displays, hence the +9V...
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. Last edited by Turbokeu; 10th Oct 2004 at 10:10. |
|
|
|
|
|
#22 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
Wow Turbokeu, that is pretty damn sweet. Seems like you've created something perfect...
Few questions, DCF77 and that radio system only works within 1500km, of the transmitter, could it be set through some switches? How does multiplexing work? The buzzer could easily be put on a switch correct? What is IC3 and IC4 for? I'm very excited about this, someone actually designed something based on my idea! Programming the pic, means I'd need a pic programmer, how much are they?
__________________
Insert Sig Here ... |
|
|
|
|
|
#23 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
I have three DCF77 LCD alarm clocks and one red LED alarm clock at home (and a DCF77 watch ), none of them have pushbuttons for time settings (only for alarm and time zone settings).I took one of them with me during a holiday in Corsica (+-1500km from Mainflingen), had no problems with neither the clock or my watch. A DCF77 clock only needs the DCF signal to set the time initially after power on (synchronisation usually happens in a few minutes) and afterwards to synchronize the clock every couple of hours. In absence of proper reception of the DCF77 signal the clocks work independently on their own timebase. My LED alarm clock only synchronizes once a day (at 00:18am precisely), the other I don't know exactly. Of course some pushbuttons can be added for initial time setting (hours, minutes). Makes me realize that the schematic needs a pushbutton for the time zone setting...(GMT + or - x hours). Since the DCF77 signal also contains day, month and year information an additionnal pushbutton on the clock could display the date in DD/MM/YY format. What do you mean by "The buzzer could easily be put on a switch"? If you mean alarm clock functionality, then yes it's possible (I already developed a double alarm clock routine for another PIC project). Display multiplexing exists since a long time (my first LED clock from 1973 was multiplexed too). Practically it means that only one digit is lit at the same time, and that each digit is lit in turn (ex. 123456-123456-...) at a frequency of about 1000Hz. For human eyes it seems like if all digits are lit simultaneously. Advantage of multiplexing is less drivers/decoders needed, normally one per digit, now only one. Other advantage is the need of less IO-lines to address the display (common segment lines), and last but not least since only one digit is lit at a time the power consumption is less (theorethically 1/6 for a 6-digit display). IC3 (4543) is a BCD (Binary Coded Decimal) to 7-segment decoder. If you put ex. 0010 (=2 decimal) on its BCD inputs it will activate segment a,b,d,e and g, representing a "2" on the 7-segment digit. The advantage is that you need only four IO-lines (as opposed to seven) to output a decimal number. IC4 (74238) is a 3-to-8 line decoder/demultiplexer. I used it to gain a few IO-lines to drive the digit driver transistors (without it you need six IO-lines from the PIC to drive the transistors - one IO for each transistor). There are lots of simple and cheap DIY PIC-programmers on the net, will have a look for a few links. OMG!!! Just realized you're living in Canada... Now I understand your hesitation to use DCF77... Are there any transmitters like DCF77 in Canada? Could do without DCF but it is quite complex to develop precise time-routines (over a long period). The clock would probably derive a couple of minutes per week or month, I think. I use Proteus VSM simulator software for PIC from Labcenter Electronics to simulate my PIC developments. Although it works great it can't be used to test time critical routines... CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
|
#24 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
I searched for a time sync radio in Canada, and came up with this:
http://en.wikipedia.org/wiki/CHU Not sure if you can buy modules to tune into this, or if I'm within range of it...
__________________
Insert Sig Here ... |
|
|
|
|
|
#25 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
DCF77 is just so common in Belgium (was even more before), I just have to replace two more (wall) clocks at home, and then all my clocks will be working on DCF... CHU seems to have morely the same function as DCF77, except it is coded differently, and broadcasted on a different frequency. Not sure myself if there are commercial or "end user" CHU decoders available... Not that it is that difficult without DCF, only the time-critical routines in the PIC firmware will have to be tuned carefully (also depending on crystal precision and stability) to obtain a usable long time precision (a couple of minutes/months is a viable "un"precision....) CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
|
#26 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
My alarm clock is set by using buttons, I suppose it "loses time" then aswell? I bet it's based off a crystal.
EDIT: This looks good: http://www.quasarelectronics.com/3182.htm
__________________
Insert Sig Here ... Last edited by Explicit; 12th Oct 2004 at 01:37. |
|
|
|
|
|
#27 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
Lots of low cost alarm clocks derive their timebase signal from the mains frequency (50 or 60Hz) and use a couple of counters to obtain a 1Hz clock. Although this mains frequency is considered to be very stable, in practice the power companies compensate this frequency over a period of 24hours to increase precision. Also do spikes and other interferences in a typical household power circuit interfere with the precision of these clocks. My LED clock from 1973 at my parents house derives a couple of minutes every few weeks. Other clocks use low cost 32KHz crystals (a common frequency in clocks and watches) and again a couple of dividers to obtain a 1Hz timebase, but due to the low frequency of these crystals (compared to most crystals with frequencies of a couple of MHz) time precision is decreased. A PIC driven by a 4MHz crystal has a machine cycle of exactly 1µsec (most PIC instructions are executed in one cycle, jumps and other branch instructions in two cycles). By using one of the PIC's internal timers and using interrupts when the timer overflows you can obtain very precise timings, but the fact that you have to branch to other routines for adding delays (remember 1sec=1000000cycles) adds a few machine cycles in the loop which you have to take into account when calculating the eventual timings, but it's feasable. I don't know if I made myself clear on this explanation... CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
|
#28 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
I knew about the mains idea. That's cheap and easy.
Probably the most precise are ones that connect to some atomic clock... I don't need a perfect clock, just a blue one
__________________
Insert Sig Here ... |
|
|
|
|
|
#29 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
I do not forget you... Lots of work actually (working 12 to 18 hours a day...). Was thinking about a possibility of a battery backed up real time clock as a time source for the 7-segment PIC-based clock. The old clocks I made in 1973-74 need a complete setup everytime there is a (even short) power cut. Chips like the Philips PCF8583 or the PCF8563 (real time clock/calendar/alarm) communicate through I²C bus (available on lots of PIC's), continue to work after a power cut on a small Lithium Battery (like the CMOS battery on mobo's) and work on an external 32KHz crystal. They have counters and registers that increment and remember time, date, day, year, century and even memorize daily alarm time. Now reading and analyzing the datasheets to interface it to a PIC (instead of a DCF receiver/decoder)... CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
|
#30 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
Cool dude, sounds great!
__________________
Insert Sig Here ... |
|
|
|
|
|
#31 |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
While looking for bigger blue 7-segment LED displays I found this website (lots of blue LED clocks!): http://www.ledclocks.com/index.html
CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
#32 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
__________________
Insert Sig Here ... |
|
|
|
|
|
#33 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
http://www.lc-led.com/ecommerce2.html I'm planning to order 10 dual blue 1" displays, 10 dual blue 0.56" displays and 15 single blue 0.56" displays. CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
|
#34 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
White is really nice, you could put it behind some nice colored plexi.
__________________
Insert Sig Here ... |
|
|
|
|
|
#35 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
Putting a colored filter before the display would cut the luminosity at least by a factor 3. The color saturation would be nicer with native color LEDs as they put out a near monochrome light (ex. native blue displays give a more pure blue light than white displays would give with a blue filter). CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. Last edited by Turbokeu; 3rd Nov 2004 at 19:25. |
|
|
|
|
|
|
#36 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
Turbokeu = knows his stuff
__________________
Insert Sig Here ... |
|
|
|
|
|
#37 | |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Quote:
) 12x 2" dual blue displays and 15x 0.56" single blue displays from LC Led. Prices were us$3.64/piece for the 2" dual displays, and us$1.42/piece for the 0.56" single displays (shipping to Belgium was us$4.95). Minimum quantities were 10 pieces for the 2", and 15 pieces for the 0.56" displays.No taxes were due as LC Led sent them to me as "commercial samples" ![]() Added my (DCF77 radio-controlled) watch and some other 7-segment displays to the pic for comparison: Now ready to order 6x 2.3" single blue displays at 3.64us$/piece (minimum order quantity is 5), and I will ask prices and minimum quantity for the single 4" blue displays... ![]() CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. Last edited by Turbokeu; 3rd Nov 2004 at 19:28. |
|
|
|
|
|
|
#38 |
|
Multimodder
Join Date: Dec 2002
Location: Canada
Posts: 172
![]() |
Stockpiling them now are we?
__________________
Insert Sig Here ... |
|
|
|
|
|
#39 |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
OK...
2.3" blue displays are out of stock but the 4" are available.... Ordered six blue of them at 7.89us$/piece +4.95us$ shipping. They were shipped on the 5th of november, I hope they will be here at the end of the week.... CD
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. |
|
|
|
|
|
#40 |
|
Supermodder
Join Date: Jul 2002
Location: Brussels - Belgium
Posts: 339
![]() |
Had some time to finalize the schematic for the DCF77 version, and made a version of a non-DCF77 LED Clock with a PCF8583 Real Time Clock/Calendar as backup. The PCF8563 could be used too with minor modifications in the schematic.
See the datasheets here: PCF8583 and PCF8563 The PCF8583 has buildin 24H clock (HH:MM:SS), date (DD/MM/YY), day of week, century and daily or weekly alarm registers. Communication with the PIC is through I²C (SCL and SDA) and the PCF8583 acts as a slave device on the I²C bus. It can be backed up during power shortages with a simple Lithium battery (typical backup current of a PCF8583 is 50µA and only 0.25µA for a PCF8563), or a 0.5 Farad backup capacitor. ![]() Now busy gathering all the needed subroutines so that I can start developing the PIC software... CD ![]() PS: added clickable PDF on the schematic.
__________________
www.turbokeu.com - www.kdcs.be - Time is money. Especially if you make Nixie clocks. Last edited by Turbokeu; 27th Nov 2004 at 09:40. |
|
|
|
![]() |
| Thread Tools | |
| View Mode | |
|
|