Novelty Mini-clock set.

Works done? Proud of it? Show off here! Let's see what you've built can help inspire others.

Novelty Mini-clock set.

Postby Brian Griffin » Wed Jun 13, 2012 9:28 pm

Project Name: Novelty mini-clock set, loosely based on Adafruit's Monochron clock.

Project Description: Mini GLCD (ST7920) clock set using large fonts as display. 5x7 fonts are included as it is much more space-saving than the built-in 8x8 fonts. With the DS1307, you do not need to worry about losing time when you pull out the power supply! Time and date is shown on the screen.

The buttons are handled by the external interrupts on the PIC32.

The clock is simple, press button0 to enter menu, and same button0 to exit menu without saving.

Button1 is to select menu item. Which one to set, eg. "Hour" and "Minute" to "Date".

Button2 is to set the value in the menu item. Increments by 1.

When menu left alone, all the settings are saved and it is exited to the main "clock face".

Since it is not that computationally intensive, I used the 8MHz for the PIC32 instead.

This project can be ported into a smaller microcontroller, and can fit in a case or something else. Create! :)

Compiler: MPLAB X IDE v1.10, MPLAB XC32 v1.0

Hardware: SKPIC32 (running at 8MHz), ds1307, CR2032 battery holder, three buttons, 2x 10K resistors, 3x 1K resistors, breadboard, jumper wires, one or two potentiometer.

Schematic:
schematic.gif
Schematic.


(Power lines and contrast are not shown here - for the GLCD and the ds1307 is the +5V, while the rest of others are +3.3V)

Pictures:
skpic32mod1.jpg
Prototype of the clock:

skpic32mod2.jpg
Clock display:

skpic32mod3.jpg
Clock menu display:

(Pardon the last "ghosting" image - the camera caught that picture when it is transitioning to the main clock face from menu!)

Much of the code inside can be freely improvized. Why not try adding an alarm clock function inside? Or a reminder? World clock? Sky's the limit! :)

References:
1.) http://www.hobbytronics.co.uk/hi-tech-c-i2c-master (the webpage has closed down - use the Google Cache to view it) - Example I2C driver.

2.) http://picnote.blogspot.com/2009/01/sim ... f877a.html - Example for microcontrollers interfacing with DS1307.
Attachments
skpic32-mod.X.zip
Source code.
(217.18 KiB) Downloaded 473 times
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: Novelty Mini-clock set.

Postby robosang » Thu Jun 14, 2012 7:33 am

Nicely presented! Yup, sky is the limit 8-)
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Novelty Mini-clock set.

Postby Brian Griffin » Thu Jun 14, 2012 2:25 pm

robosang WROTE:Nicely presented! Yup, sky is the limit 8-)


Thanks! I forgot to draw the battery holder in the schematic - just refer to the datasheet of the DS1307. Uses CR2032 or 2025 coin battery. :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am


Return to Project Showcase

Who is online

Users browsing this forum: No registered users and 4 guests

cron