Skip to main content
Topic: GLCD Clock Project (Read 26305 times) previous topic - next topic

GLCD Clock Project

Hi All,

I just got the prototype boards back for my latest project, a GLCD Clock! This clock will utilized a 128X64 pixel LED backlit GLCD with the KS0108B controller, and time-keeping will be controlled by a battery-backed Dallas DS-3231 RTC. A PIC 16F876A micro will manage the whole show. Two pushbuttons will be used to set the various display modes (digital clock, or watch face clock), and set alarms, etc. An input is also provided to 'sync' the time using a GPS receiver with RS-232 output.

I've got most of the firmware written for this project using a hand-wired prototype as a test-bed, so now it's time to build the real thing, and see how it works! I'll post some assembly pictures, and pictures of the clock in operation once I have it complete. 

[attachment=0]

John

Re: GLCD Clock Project

Reply #1
1 week passed since you buzzed. Still waiting for your final pictures here.
Still learning
-Arup

Re: GLCD Clock Project

Reply #2
Hi All,

Most of the parts for my GLCD clock project have come in, and I've now got an assembled and working board. The only thing I don't currently have on the board is the piezo buzzer used for the alarm function.

[attachment=0]

So far, the board has been mostly trouble-free. I did have a problem initially with the GLCD only working on 1/2 the available screen area. The GLCD uses two chip select inputs (the 128 X 64 display area is driven by two driver chips), and I quickly determined that one of them was not working. It turns out that 'RA4' on the 16F876A is 'open-drain', and that was the pin connected to 'CS2' on the GLCD. The diagonal resistor on the PCB is the pull-up I conveniently located between a via, and the +5V buss.

I hope to have some operational photos in the next few days after I've fully debugged the time-keeping routines, and the GPS syncing routines!

I need to find a supplier that can make an acrylic stand for this project similar to the one that Seeed sells (sold?) for the #Twatch board. Any ideas for a source?

Thanks,

John

Re: GLCD Clock Project

Reply #3
Edit: Never mind, I see you ordered from dorkbot. :P

I must say that your board looks fantastic! Where did you get the PCB made, yourself or from a manufacturer? I am guessing you did not do it yourself, because I see the silk screen and what looks like solder mask.  Did you use eagle to design it? The design looks very awesome, will you be releasing the source code behind this? Are you having problems getting all your code to fit on the pic?

For cases, I haven't got the faintest clue as to where to get them.

Re: GLCD Clock Project

Reply #4
Looking good! Good fix with the pullup resistor.
Got a question? Please ask in the forum for the fastest answers.

Re: GLCD Clock Project

Reply #5
Nice looks. Hope it will be fully functional without any much difficulties.
Still learning
-Arup

Re: GLCD Clock Project

Reply #6
Hi All,

I've made quite a bit of progress on my GLCD clock project in the last week or so. I've now got the time keeping routines, and the GPS 'sync' routines working flawlessly. When connected to a GPS receiver, the clock will sync to GPS time once every 24 hours, or immediately if 24 hours has passed without an update. Frankly, the DS3231 RTC seems to be accurate enough to set initially, and then correct with GPS every few months, so I'll probably only connect the GPS on occasion. This RTC has very low drift!

The RTC chip (DS3231SN) has a TCXO (temperature compensated crystal oscillator) which is why it's both accurate, and (relatively) expensive ($8 in single quantities). One nice thing about the TCXO is that the measured temperature can be read from the chip! I've now added temperature to my display routines.

[attachment=0]

The only things left to do on this project are finishing the display routines (you'll notice that the colon, ":", is not being displayed correctly in the time display, and the configuration menu system. At this point I've still got approximately 50% of the chip resources (ROM and RAM) left on this device, so I think I'm in good shape!

So far, this has been a fun project! I undertook it primarily to learn about, and play with, GLCD displays. Creating my own fonts has been both fun and frustrating, but I've sure learned a lot!!

I hope to wrap this project up in the next couple of weeks. I did find a source for a acrylic stand for desk mounting. I'm going to use an inexpensive 'slant' acrylic picture frame. These can be purchased very cheaply from numerous sources on the 'net.

Thanks,

John

Re: GLCD Clock Project

Reply #7
Make the casing from a plastic box indeed.
Still learning
-Arup

Re: GLCD Clock Project

Reply #8
Very nice, thanks for the update. I'll post this up.
Got a question? Please ask in the forum for the fastest answers.

Re: GLCD Clock Project

Reply #9
Hi All,

Well, I've just about finished up my GLCD clock project! I've got all the display routines, the screen layout, and the configuration menus just the way I want them, so I thought I'd post another update. The only real thing to do now is to mount the display on the acrylic stands which are currently en route!

[attachment=0]

I did tweak the LED backlight resistor, so now the GLCD is much more readable. Even at this brightness, the LED current is so low that there isn't any appreciable heating in the resistor!

As far as I can tell, the DS-3231 RTC is within one second of the GPS timebase I use for a reference after about two weeks of operation. Pretty good accuracy, but I'll still connect the GPS for time updates when the mood strikes!

My next project is a Nixie clock (I like clocks!) to be based on some Nixie tubes I bought on eBay. I've already built a HV supply (180V) for the tubes, and played around illuminating individual digits. A lot of the hardware design, and code from the this project (GLCD clock) will be recycled in the Nixie clock! I'm not a woodworker, but I've drawn up plans for a nice Maple base for the Nixie clock, and that is being built now by a local cabinet shop! A nice acrylic cover will protect everything once it's done.

Stay tuned!!

John

Re: GLCD Clock Project

Reply #10
Nice idea. Waiting for your nixie clock.
Still learning
-Arup

Re: GLCD Clock Project

Reply #11
Very nicely done, I really like this clock. simple yet usefull project with enough hacking ability to be fun.
AWSOME job.

Would there be any chance of releasing the board and source files (sorry if i missed them somewhere) as i would really love to make one of these as a project.

thanks in advance

Either way, keep up the good work.

Re: GLCD Clock Project

Reply #12
Hi All,

Thanks for the interest in this project! It was always my intent to release the schematic and board files for my GLCD clock for anyone that wants to build one for themselves! I only waited until I had resolved a couple of minor issues with the PCB design before doing so!

Attached are the schematic and board files:

[attachment=1]
[attachment=0]

The firmware is a little bit trickier. I use the CCS 'C' compiler, and my GLCD routines are based on a heavily modified version of the GLCD driver provided with the CCS compiler (I added a number of large fonts, and the routines to display them). I'm currently looking into what I can, and cannot, share with the group. At the very least, I'll post the .hex file for the firmware and help anyone that wants to develop their own firmware. I think I'll be able to post enough of the code to make it really easy to duplicate without running afoul of the CCS licensing agreement!

Stay tuned!!

John[attachment=1]

 

Re: GLCD Clock Project

Reply #13
This is great news,

Thanks heaps for the boards and hopefully with the source code
 Keep up the great work

edit: using eagle PCB 5.11.0 i get a message "inconsistant Data" in both files. The Board file opens but the schematic file doesnt.
Are you using a different version?
Also have you added the pullup resistor or should it be added.

Re: GLCD Clock Project

Reply #14
Hi,

I am using Eagle v5.11. I just uploaded the .sch and .brd files again to the original post from last week. Can you download them again, and see if you get the same error?

These files are the latest versions, and include all the fixes required from the 1st prototype, including the addition of the pull-up resistor.

Thanks,

John