Jump to content
43oh

M-Clock build, M for Minimalist, Multi-mode or Matrix


Recommended Posts

Minimalist Multi-mode Matrix Clock

 

post-23-0-98983600-1386470110_thumb.jpg

 

Description

 

This is a multi-mode clock project based on the msp430g2432. It can be assembled with minimal parts. With limited 8x8 pixels display resolution, this 12 hour clock shows time in 6 different modes. This project is based on a older attiny 2313 project I did a few years ago.

 

HHMM mode, typical hours plus minutes scrolling digits with colon separator.

 

post-23-0-10816000-1386470218_thumb.jpg

 

Seconds mode, shows only seconds.

 

post-23-0-60712800-1386470250_thumb.jpg

 

Tix mode (shown below), led matrix is divided into quadrant, the upper quadrants shows the hour in bcd (binary coded decimal) values. they are represented by the number of dots to indicate the digits. the lower quadrants show the minute in bcd. i.e. for 5:34 it shows no dot + 5 dots on the upper half and 3 dots + 4 dots on the lower half.

 

post-23-0-27179600-1386470285_thumb.jpg

 

Dice mode (shown below), the led matrix is divided into two set of 'dices'. with the upper pair showing hour from 1 - 12, the lower pair of dice shows minutes in 5 minute increments. i.e. for 5:35 it shows dice value upper 5 + lower 7 (5 hour, 7 x 5 min).

 

post-23-0-75974300-1386470306_thumb.jpg

 

Binary (really it's bcd, or binary coded decimal) mode, (shown below) the hour, minute and second digits are show as binary dot on different columns in the led matrix. the columns 0 and 1 (from left) represents the hour digits, column 2 is blanked, columns 3 and 4 represent the minute digits, colum 5 is blanked, columns 6 and 7 represents the second digits.

 

post-23-0-41347600-1386470329_thumb.jpg

 

The circuit employs row and column multiplexing to drive the leds, one row at a time, this gives a 12.5% duty cycle when "sets" of leds (8 of them in each of the 8 rows) are turn on briefly. current limiting resistors are eliminated to save breadboard estate and as we are not constantly driving individual leds, they are not going to be damaged.

 

The control (user interface) is also arranged so that we only use one tactile button for input. the firmware capture long button presses (press and hold) for menu rotation and normal button presses for menu selection.

 

By migrating this project from an AVR mcu to a msp430 mcu I had made it possible to keep time a lot more accurately. During display (i.e. led on) the project runs at 1Mhz DCO. The msp430 mcu has factory calibrated clock values. When not displaying, this project enters a LPM3 (low-power mode 3) to conserve power. At LPM3 the DCO clock cannot be used and the project switches to use a 32Khz crystal based AClk to keep time.

 

Features

  • Minimal component count, 4 parts.
  • Battery operated from 3V to 3.6V.
  • Use of watchdog timer to keep time, power-down sleep mode (LPM3) takes uA power.
  • 32Khz crystal to keep accurate time when sleep.
  • Runs 1Mhz DCO calibrated clock when active (displaying time).
  • This is a 12H clock, not 24H and has no AM/PM indicator.
  • Easter egg application.
Parts list

  • msp430g2432 (or other G series dip 20pin devices w/ 4k+ flash)
  • 8x8 LED matrix display (red only, this is a 3V project)
  • tactile button
  • 32Khz clock crystal
  • 2x LR44 button cell or 3V-3.6V other battery source
post-23-0-97670800-1386470452_thumb.jpg

 

Application Notes

  • Short key press in display mode cycles through HHMM, seconds, tix, dice, binary and sleep modes.
  • Long press enters setup mode, subsequent long press rotates thru menu.
  • Menu items cycles thru 'Set Clock', 'Dimmer', 'Auto-off'.
  • In 'Set Clock' setup mode, short presses increment digit values (hours, minutes) and long press confirms.
  • In 'Dimmer' setup mode, short presses cycles through available brightness levels, long press confirms setting.
  • In 'Auto-off' setup mode, short presses toggle the auto-off on and off. With auto-off turned on, the clock displays time for 15 seconds and turn itself into LPM3 sleep mode to converse power. With auto-off turned off, display is on continuously.
  • When in sleep mode, MCU goes in power down mode, consuming less than 30uA of power, 32Khz crystal w/ watchdog timer is used to keep time. A pin interrupt is enabled to allow for wake up via tactile button. In this mode the main clock is disabled to conserve power.
  • Led segment multiplexing includes time delays to compensate for brightness differences for individual rows.
 

Breadboard Layout

 

 

the 8x8 led matrix has dot size of 1.9mm and is of common cathode, if you have common anode type, you can change a few lines in the code for adoption. see the following diagram and see if you have the right pin-outs. it appears they are quite common and if you purchase via ebay most suppliers have the same pin-out even if the model number is different.

 

post-23-0-03078800-1386470499_thumb.jpg



   +=====================================================+
   |  .  .  +-------------------(1)------------(1) .  .  |
   |  .  .  |  .  .  .  o||o (2)------------------+.  .  | (crystal)
   |  .  ./ |  .  . \.  +--+--+--+--+--+--+--+  . |.  .  |
   |  . (+) |  .  .  o C7 C6 R1 C0 R3 C5 C3 R0  . |.  .  | (2xLR44 cell)
   |  .  .\ |  .  . /.  |    b2 b3           |  . |.  .  |
   |  . (+) |        +--+--+--+--+--+--+--+--+--+ |.  .  |
   |     |  |       |G b6 b7  T  R a7 a6 b5 b4 b3||      |
   |     |  |       |                            ||      | (msp430 mcu)
   |     |  |       |+ a0 a1 a2 a3 a4 a5 b0 b1 b2||      |
   |  .  | (1) .  . .+--+--+--+--+--+--+--+--+--+ |.  .  |
   |  .  +----------(+) +--+--+--+--+--+--+--+ (2)+.  .  | (8x8 red led matrix)
   |  .  .  .  .  .  .  R4 R6 C1 C2 R7 C4 R5 R2 .  .  .  |
   |  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  |
   |  .  . (1)-[  ]-(+) .  .  .  .  .  .  .  .  .  .  .  | (tactile button)
   |  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  |
   +=====================================================+


   *note: all (1)s, (2)s and (+) points are electrically connected


Schematic

 



                            MSP430G2xxx
                         -----------------
          --------------|RESET            |
          | ------------|TEST             |
          | |           |                 |
          | |   ROW5 <--|P2.0         P1.0|--> ROW4 (of LED Matrix)
 /|\      | |   ROW2 <--|P2.1         P1.1|--> ROW6
  |  _|_  | --- ROW1 <--|P2.2         P1.2|--> COL1
  --o   o------ COL0 <--|P2.3         P1.3|--> COL2
    Button      ROW0 <--|P2.4         P1.4|--> ROW7
                COL3 <--|P2.5         P1.5|--> COL4
      32Khz /-- COL7 <--|P2.6(XIN)    P1.6|--> COL5
    Crystal \-- COL6 <--|P2.7(XOUT)   P1.7|--> ROW3
                        |                 |


Assembling

  • Follow breadboard layout and place two jumper wires on mini breadboard
  • Place msp430g2432 mcu
  • Place 32Khz crystal
  • Place Tactile Button
  • Place power source (I am using 2xLR44 w/ magnets as holders)
  • Finally place 8x8 led matrix on top of msp430g2432
/EDIT match clock mode description w/ photos, current build is on G2432, G2452,G2553, etc will also work.

Link to post
Share on other sites

@@abecedarian you will hate me more when I reveal the "easter egg" application  :smile:

 

Like my original 3p4w clock, this project also has a hidden feature. I will reveal it just before voting starts (to get more upvotes).

 

So the source code will only be release then.

 

You can make a guess on what it is though.

 

Or un-assembly this hex?

 

mclock_hex.txt

 

May be release the assembled listing next week if anyone is interested in reading.

Link to post
Share on other sites
  • 1 month later...
  • 1 year later...
  • 1 year later...

Hi

solved see the end of message
I am very interested in your project matrix clock
I wanted to compile it for a MSP430G2452 but I get compilation errors.
By invoking the GNU compiler msp430g2452
Here is the compilation copy:
**** Build of configuration Release__GNU (2) for project MSPclockG2452 ****
"C: \\ ti \\ ccsv6 \\ utils \\ bin \\ gmake" -k all
'Building file: ../main.c'
'Invoking: GNU Compiler'
"C: /energia-0101E0017/hardware/tools/msp430/bin/msp430-gcc.exe" -c -mmcu = msp430g2452 -I "C: / ti / ccsv6 / ccs_base / msp430 / include_gcc" -I " Energia-0101E0017 / hardware / tools / msp430 / msp430 / include "-O2 -Os -Wall -mhwmult = none -msilicon-errata = CPU4 -MMD -MP -MF" main.d "-MT" main.o "-o "Main.o" "../main.c"
Subdir_rules.mk:7: recipe for target 'main.o' failed
Cc1.exe: error: unrecognized command line option '-mhwmult = none'
Cc1.exe: error: unrecognized command line option '-msilicon-errata = CPU4'
Gmake: *** [main.o] Error 1
Gmake: Target 'all' not remade because of errors.
 
**** Build Finished ****
 
If I invoke the msp430_15.12.3.LTS I have no error but it does not work 
 
I'm newb in MSP can you help me please ?
 
Work no :)
i've used msp430-gcc on ubuntu and flashed an msp430g2452 and all is good .
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...