breadboard_collections

5P4W Clock

[October 2015] Originally created.

UNDER CONSTRUCTION and source code not yet available

5 Parts 4 Wires Clock. Digital clock built with minimal components and wirings.


IMG

All components on a mini breadboard

Description

This is a redo of an older project 3p4w clock. The 3p4w clock is one of my attempts to create the most simple MCU based clock project. It was based on a 14 pin MSP430G2231 device from the then $4.30 TI launchpad development system.

Since then the TI launchpad G2 had changed and instead includes 20 pin devices like MSP430G2553 and MSP430G2452. I had also find ways to incorporate use of clock crystals and thus improve the accuracy of the project.

The 5p4w clock design inherits the LED multiplexing design of the 3p4w clock. The additional parts making it a 5p over 3p is the 32Khz clock crystal being added and I also count the battery holder as another part. This clock also carries the optional alarm (auto detect) and houses the original easter-egg application.

buzzer is optional for alarm and timer
IMG

Features

Parts list


IMG

Application Notes


IMG

Breadboard Layout

   +=====================================================+
   |  .  o-----(W3)-----o  .  .  .  .  .  .  .  .  .  .  | XT 32Khz clock crystal
   |  . (-) .  .  .  .  .  oXTo  .  o---(W1)-----------+ | W1 joins IO pin to a2
   |                \   .  .  .  o---(w2)----------o  .| | W2 joins CK pin to b3
   |                 :  .  .  .  .  .  .  .  .  .  .  .| | W3, W4 battery power to MCU
   |                 :  ---+--+-(0)-A--F-(1)(2)-B--+- .| |
   | Battery Holder  : |- b6 b7 CK IO a7 a6 b5 b4 b3|  | |
   |                 : |+ a0 a1 a2 a3 a4 a5 b0 b1 b2|  | |
   |                 :  ---+--+--+--+--+--+--+--+--+  .| |
   |                 :  .  .  .  E  D (.) C  G (3) .  .| |
   |                /.  .  .  .  .  .  .  .  .  .  .  .| |
   |  . (+) .  .  .  .  .  .  .  x  .  x  .  +=BZR=o  .| | BzR buzzer, observe + sign
   |  .  o------(W4)----o=BTN=o------------------------+ | BTN button
   +=====================================================+
                                 +=BZR=o (easter egg buzzer placement)

Schematic

                            MSP430G2xxx
                         -----------------
                        |            RESET|----------+
          +-------------|TEST             |          |
          |             |                 |          |        /|\
          |    SEG G <--|P2.0         P1.0|-->       |    _|_  |
          |  DIGIT 3 <--|P2.1         P1.1|--> SEG A +---o   o-- button
          |          <--|P2.2         P1.2|--> SEG E
          +- DIGIT 0 <--|P2.3         P1.3|--> SEG D
               SEG B <--|P2.4         P1.4|--> SEG H
             DIGIT 2 <--|P2.5         P1.5|--> SEG C
      32Khz /-----------|P2.6(XIN)    P1.6|--> DIGIT 1
    Crystal \-----------|P2.7(XOUT)   P1.7|--> SEG F
                        |                 |


Assembling

Source code

Source code usually resides in my github repositories.

For this particular project, the single C source file 5p4wclock.c is bundled in my breadboard collections repository. You just need 5p4wclock.c