In the meanwhile I bought some (Velleman) LDR-resistors... One of those should be connected through a voltage divider to an A/D input of the PIC to regulate the "on"-time of the multiplexed displays depending on the measured (8-bits) value (automatic brightness regulation). I've measured the LDR's at different light conditions (complete darkness, at ambient light, and at 0cm of a 11 Watt PL-lamp to be able to compare the results. I've yet to find suitable resistor values for the voltage divider (output voltage has to be between 0V and 5V, and the maximal resistor value over the A/D input should not exceed 2k5), so LDR from +5V to A/D ingang, parallel resistor over LDR to limit max. resistance, and ex. 2k2 resistor from A/D input to GND. CD
Okay, my DCF77 modules from Conrad arrived thursday, couldn't make it to look at them before today (And no, this project didn't stop , I'm just very busy at the moment with my company). Price was 9.95 Euro/module + taxes, shipping and handling (totalling 51.75 Euro). I bought four of them to start (remember, I have to make several of those LED-clocks...): Close-up of the two sides of a module: The connections are +1.2 to 15V, GND, inverted and non inverted DCF signal. The Conrad DCF-modules are less fragile than the ones Velleman used to sell (I broke one of the antenna wires on it just by taking it in my hand...) and have terminal blocks for the connections. Also started to re-analyze the PIC ASM-routines I have for this project and tried to get used to my new versions of MPLAB (6.60) and Proteus VSM (6.3 SP1)... CD
Update Have some holidays so I was able to start developing the LED-clock code... Made some different working projects (successfully tested with Proteus VSM and MPLAB 7.0): - LED Clock with binary routines (and BIN to BCD conversion for displaying) and non-multiplexed displays (was easier than MPX displays). - LED Clock with BCD routines (no BIN to BCD conversion for displaying needed) and non-multiplexed displays. - LED Clock with BCD routines and DCF decoding of hours and minutes (+ parity checking) and non-multiplexed displays. - Idem with multiplexed displays. - Multiplexed DCF-clock with clock routine based on Timer1 (16 bit) overflow interrupt (instead of Timer0 8 bit overflow interrupt). I tried this because with multiplexed displays I'm always afraid to burn out a display in case of a program crash (no more multiplexing), therefore I used Timer0 for the Watchdog timer so that when the program hangs the PIC is reset within a few msec. Unfortunately I've still to calculate the right startup values for Timer1 for a correct 1 sec-clock based on a 6.5536MHz oscillator frequency. I'm also busy building the LCD DCF77-clock from www.picbasic.nl to be able to test my DCF-routines in a simple way on a 16F628 with a real DCF module (Proteus doesn't know about a DCF77 receiver....) Things to do: Now busy implementing DD-MM-YY decoding and parity check on the DCF-signal, alarm clock routines, keyboard input scanning routines, Time Zone routines, Buzzer routines. Still wondering how to implement the LDR-routines for the automatic brightness regulation (LDR-value A/D-conversion with proportional PWM on output CCP1)... Also found ASM-I²C routines to communicate with I²C peripherals (I will use a PCF8583 RTC chip for the non-DCF clock but Proteus only recognizes a DS1302 RTC making it quite difficult to test my own I²C routines...) CD
Changed the location of the pics on my webserver Had some time to mount the DCF-clock from www.picbasic.nl and test my DCF77-modules. I used a PIC 16F648A instead of the 16F628 because that was the closiest I had laying around. I tested it first with a 1x16 LCD (that I bought for 2.50 Euro) but the LCD itself was borked (glass was broken and only showed the left 8 characters). The store has still a lot of those 1x16 LCD's at the same price, time to buy 5-10 of them... Had another (2x16) LCD laying around that was working OK and connected everything on a breadboard: Now that I have a working DCF PIC schematic I can test my own DCF-routines... CD
Why not just use the built in watchdog timer? The PWM thing is very easy. For the blue and green clocks I built in December (if you saw the thread), the brightness thing only added about 20 lines of code. It's very easy to alter the duty cycle of the LED's if you are multiplexing them rather than using the CCP1 pin.
That's what I did, but I forgot the WDT has its own RC-oscillator. Therefore I assigned the TMR0 prescaler to the Watchdog Timer to increase its T/O period (that I assumed based on the Xtal frequency...). I just remembered (in 3 years I forgot a lot about PICs) that the default WDT-period (without prescaler) is something between 7 and 33 msec, therefore a CLRWDT in the interrupt routine every 5 msec should be okay... My bad... Great, I can again use TMR0 and the prescaler for the clock routine. Yes I read your thread, but probably I'm just missing the obvious... I'm using a digit counter and a lookup table to drive the 4028 1-of-10-decoder and multiplex the display anodes. Therefore, to PWM the displays I could: - Alter the ON-time by altering the duration of the BCD-codes to the 4028 (BCD code 0000=no digit lit). - Alter the ON-time by blanking the displays through the 4543-decoder's BI input. - Alter the ON-time by outputting a variable PWM-signal on CCP1 and drive the GND pin of the ULN2803 low side segment driver, or the Vcc pin of the TD62783 high side digit driver. I've no clue how you are multiplexing your displays, but probably your way is different than mine... CD
Holidays are finished since almost two weeks, but still I'm working on the clock-code... Code is progressing: - Finished decoding days, months, years and parity of DCF77 signal (hours and mins were already OK). - Added leading zero suppression when hour 10's are <10. - Found a way to avoid the lookup table for the digit select routine, and therefore simplified the resulting code. Found some bugs in the existing code: - Software clock was updated even when received DCF frame was corrupted... - corrected. - DCF second beat LEDs were never reset (always lit).- corrected (now looking for an easy way to blink the semicolons every 0.5secs instead of 1sec (like the digital clocks I have in my house). Since my PIC-code is really well progressing in the morning, I need to sleep earlier, and wake up earlier (now 5-6:00 am, aiming for 4-5:00am) . Now busy thinking and developing code for the PWM driving of the displays (displays are multiplexed at 250Hz, need PWM duty cycle between 10-100%). CD PS: ordered 12x 2.3" blue displays from LC LED Inc. (they are out of stock since several months). Joseph from LC LED Inc. answered me they will "make" my samples and sent them to me at the end of the month...
Still working on the code... DCF77 routines are up and running (the 24h-clock is updated every minute on receipt of a valid DCF frame): It's based on a PIC16F628A and a big 20x2 EL backlighted LCD display that I bought second hand (view area is 149x23mm with 6x9.66mm characters!) to test the DCF decoding routines. Semicolons are blinking in a 0.5sec (1Hz) rythm, an asterisk indicates the DCF pulses, the "E" indicates a DCF parity error (a few/hour). Now busy developing the I²C routines for use with a DS1307 and PCF8583 RTC chip. LDR A/D and PWM routines for automatic brightness are finished too. Just to let you know guys... CD
As I'm still busy with clocks I thought I could build a 'nostalgic' Nixie clock too, I like this finishing with IN-18 tubes particularly. So I decided to buy some Nixie tubes. The (NOS) IN-18 tubes from 'Ask Jan First' arrived. Ordered just a little too late as the price increased about 2 Euro/piece (17.40€ ). Digits are 40mm-1.6" tall, tube is 75mm-3" high: Together with a couple of neons for the semicolons and about 75 mouser pins for fixing the tubes onto the tube board. The transparent tubes are 'testtubes' for building the neon semicolons between HH:MM, and between MM:SS (easy to obtain if one of your sisters works in a hospital ). I had severe doubts about Russian components but the IN-18 is perfectly finished : Now transform the clock schematic for use with nixies... CD PS: Does anybody know where I can find 6 of these Rodan CD47 'little babies' (display height 135mm-5.3", tube is 22cm-8.7 high)? (and I do not offer more than 750€)
Now your talking, making a nixie clock with the IN-18 tubes! I bought a case of 25 with sockets last year for a steal before the prices jumped up. I built a clock with the IN-18's using 4017 decade counters but never finished the case, I am always starting on new projects. Here the url to my clock http://www.tuberadios.com/nixie/in18.html BTW, The CD47's are so rare and super expensive if you could ever find them. I wouldn't run the IN-18s with 1 x 6 multiplexing, maybe 2 x3 or 3 x 2. Regards, Sal
I know that, busy with at least 10-11 projects at the same time actually... Yeah, I will multiplex the IN-18's in 2x3 mode (2x 74141). I know for the CD47, I was just kidding... I heard they go for at least 150-200€/piece (if you can find them). CD
Found a cheap EL-inverter (outputs about 79V @ 1090Hz from the +5Vdc) at Conrad NL to backlight my huge 20x2 LCD (remember, viewable area is about 15cm or 6"). DCF-code is now at version V1.7 (had some headaches decoding the DCF day of week...) and working great. The semicolons between HH:MM and MM:SS are not visible as I took the pic just when they were off (1Hz beat). Also on the left of the 'V' (good DCF frame) there is a user defined character (little heart) that blinks (0.1 or 0.2sec) following the received DCF pulses. The 'S' (or 'W') on the right indicates Winter/Summer time. CD
I bought seven side viewed IN-8-2 Nixie tubes (0.7" digits), and also seven end viewed IN-17 tubes (0.35" digits) at cheap prices. IN-8-2: IN-17: I bought also an interesting Nixie 'bargraph', the IN-9, that produces an orange display that is proportional to the applied current: All together for size reference -The big one on the right is one of my IN-18's (1.6" digits): The clocks for the IN-8-2 and IN-18 tubes are finished (see next posts). For the IN-17's I need to develop a new tube board. CD
The IN-8-2 Clock: The PCB's (in kit) are from Claus Urbach in Germany, the housing is the beautiful "K8" from Mike Mayberry in the US. The IN-8-2 tubes are bought from Jonas Jasulaitis in Denmark. The bottom is normally covered by a bottom plate but I removed it for the photograph. As you can see, I replaced the original (russian) KM155 Nixie drivers ICs delivered by Claus with genuine NOS Texas Instrument 74141 drivers that I bought from eBay. CD
The IN-18 Clock: Again PCB kits from Claus Urbach in Germany, but here the housing is the beautiful "K7" from Mike Mayberry in the US. The IN-18 tubes were bought from Jan Wustens in Germany. Both clocks: The clocks work on 50-60Hz mains frequency (if used with a 9-12VAC adapter), or with a separate DCF77 receiver (either 9-12VAC or DC adapter). Four software dimming levels are available through the DIMM button on the back, or automatic dimming through an optional LDR (now busy installing them). The highest dim level has a great effect: the numbers fade in and out when changing... Both my clocks work on DCF77 but I have troubles with DCF synchronization due to the EMI from the 180V multiplexing of the tubes. Now waiting for some new 9VDC adapters from Pollin that are grounded and that, according to Claus, solve the DCF reception problem... CD
very nice, that bargraph would do well for seconds, have it flash from left to right for one second then right to left for the next!
that looks so cool... how much was the smaller one to build? i want one, lol the bargraph could make a very cool brightness control if you used it in conjuction with a qprox slider.
The small one cost me about 125GBP in total (depends on the price of the used tubes, as the tube board accepts a lot of different tubes). The big one cost me about 240-250GBP in total as the IN-18 tubes are very expensive (about 90GBP for 6). The "Klok" K8 and K7 housings from Mike Mayberry alone cost about 41 and 50GBP without shipping... CD