Square type Clock using PIC series microcontroller

A. PREFACE



        Square clock inspired from combining between my static clock and my digital clock version. Using big seven segmen leds display for digit numbers and leds indicator for another visual number. This design could be found also on the net like some on Godier electronics site. In fact that, the original inspired idea come from elektor books some years ago. But to build the clock, it takes so many components, because the circuits itself build in pure electronics components. So now the idea become real. I plan to use PIC microcontroller also like the other of my clock design. May be the overload not to much, because it takes from a part that already done creations. While I have a few days spare time on these National day Idul Fitri 2009, a week vacation days. May be the project could be done!!!


B. SCHEMATIC

        The circuit using PIC16F84/A or PIC16F628/A types. Some part is from Static Clock design, and some part from PIC Digital Clock design. Hours part display indicator, using led display, and minutes and seconds part are shown by 7-segmen display indicator. Seconds part always change continuously. Option for AM/PM display sign now is available also. First the design only to display time as a clock, but as the idea roll on then I add the calendar function too. Because the field is a little beat the same. For this calendar function, I add the sign indicator too. Both AM/PM indicators and calendar indicator, taken from the 4-16 line decoder. 12 already used for hours or months indicators. The rest take it function as purpose. The rests are no need explanation, just looking for the display view.
Square Oak Billiard Clock With Standard Green Mali FeltWaterford Crystal Lismore Small Clock

Square Clock schematic are like this (Square_ClockS.sch, Square_Clock_Schematic.pdf).

C. LAYOUT

        I already design the PCB for this square clock. Not very much work, since it can be re-work from PIC Digital Clock project design with a little modification. All the chip loads in one PCB, minus the leds display indicator. All leds display indicator put on the clock body itself. The board already tested and could run well. Connection are made directly from flying wire connections. Some changes where made since my first design, so not all the components were mounted on the PCB. Some components just soldered at the position. As I added the option later and after, the layout maybe a little different from the photos.







Here is the PCB layout (Square_ClockP.pcb, Square_Clock_Layout.pdf, Square_Clock_Artwork.pdf).

D. PART LIST

        Here are the part list for this clock circuit :

   1. Resistors :
      R1 ~ R7, R14 ~ R25, R26 = 220 Ohm, 1/4W, 5% ............... 20 pcs
      R8 ~ R11 = 2k2, 1/4W, 5% ................................... 4 pcs
      R12, R13 = 10k, 1/4W, 5% ................................... 2 pcs
      R27 = 1k, 1/4W, 5% ......................................... 1 pcs
   2. Capasitors :
      C1, C2 = 22 pF (for oscillator) ............................ 2 pcs
      C3, C4 = 100 nF (for IC decoupling, used as necessary)...... 2 pcs
      C4 = 100 uF/16 V ........................................... 1 pcs
      C5 = 1000 uF/ 16 V ......................................... 1 pcs
   3. Semiconductors :
      IC1  = PIC16F628/A (PIC microcontroller) ................... 1 pcs
      IC1  = PIC16F84/A (optional PIC microcontroller) ........... 1 pcs
      IC2  = 74LS247 (BCD to 7-segmen decoder driver) ............ 1 pcs
      IC3  = 7805 (Voltage regulator) ............................ 1 pcs
      IC4  = 74HCT154 (4 to 16 decoder driver) ................... 1 pcs
      Q1 ~ Q6 = BC558B (universal PNP transistor) ................ 6 pcs
      D1, D2 = 1N914 (Silicon diode) ............................. 2 pcs
      BD = 1N4007 (Silicon diode) ................................ 4 pcs
      LED1 ~ LED12 = 5mm, Blue (Clear type) (for hours ind) ..... 12 pcs
      LED13 = 12mm, Red/Grn (Clear type) (for AM/PM ind) ......... 1 pcs
      7-segmen display common anode red (big type = 1.8 inchi) ... 4 pcs
   4. Others :
      X1 = 4 MHz (Clock Crystal oscillator) ...................... 1 pcs
      Optional IC socket for 18-pins (use 20-pins) ............... 1 pcs
      Optional IC socket for 16-pins ............................. 1 pcs
      Optional IC socket for 24-pins ............................. 1 pcs
      Optional terminal connector CON1, CON2 = 2 pin (power) ..... 2 pcs
      Optional terminal connector CON3 = 12 pin (sip) ............ 1 pcs
      Optional terminal connector CON4 = 4 pin (sip) ............. 1 pcs
      Optional terminal connector CON5 = 7 pin (sip) ............. 1 pcs
      S1 = Miniature push button (Push on) ....................... 1 pcs
      PCB = 5 x 10 cm, 5 x 16 (single layer) ..................... 2 pcs
      T1 = Miniature transformer P=220V/S=9V, 100mA, 1W .......... 1 pcs

E. FIRMWARE

     
   The firmware not too much different from my PIC Digital Clock design. Only the hours part and buttons function need to re-work. Hours displayed  using leds indicator, while minutes and seconds displayed using 7-segmen display. All 7-segmen display are multiplexed. As already mention before, for this PIC type, I programmed it with my_rcd_programmer, I got it from RCD programmer site. Using a free software from DL4YHF's WinPic - A PIC Programmer for Windows, the chip could be programmed well. The firmware write in ASM type, compiled with the free MPLAB assembler compiler also.

        Expandable the function of this clock, I plan to add a calendar too. I think that it could be done. For the months, it related to hours indicators; for the days, it related to minutes display; and for the years, it related to seconds display. Clock and calendar will be displayed at interval time each other (say it about 10 seconds for example). For a moment time it displayed a clock time, and for another moment it displayed a calendar. I still working on it!

        At last, the firmware for both option; clock and calendar could be done. Setting the time and calendar still using the existing button, just one. The firmware become a little complex, because it must handle both function for the same variables. I always have the principle that everything I make later must have some added value from the original design. If it doesn't then it's no worth. So better to describe the algorithm a little :

  • As usual the interrupt occur every 1024 msec. 
     
  • Refresh rate rotate between every variables here, 6- positions : 2-digit minutes indicator, 2-digit seconds indicator, hours indicator and AM/PM indicator. For calendar option, it match the purpose : 2-digit days indicator, 2-digit years indicator, months indicator and calendar sign indicator (dot). 

  • Every 1 sec. count then update the RTC. Check the button pressed. 

  • If button pressed, save the state, time mode or calendar mode, increment the setting. For time setting; minutes first and then follow by hours. For calendar setting; days first and the months. Every one round then increment the years. So it may be a little difficult to set the calendar if the correct setting already elapsed. Better to power down first and remove the back up battery, so the default calendar setting back to 20 Oct 2009 - 12:00 AM (time stamp when this clock were created). 

  • When the function in run mode, time and calendar will change one after another as the time interval. I set it about 13 seconds, so the numbers display will be more variety. 

  • How to read the time or calendar? You will learn it!!!
Here is the firmware : Square_Clock (Square_Clock.asm, Square_Clock.hex, Square_Clock2.asm, Square_Clock2.hex).

F. PROTOTYPE

        Here is my prototype clock looks like. The size about 25 x 15 x 4 cm. I made the box from multiplex. As a tips, maybe a photo frame is another good choice. But its a little difficult to find a perfect size for the displays. I can't find a perfect one, so I made it by myself. Not quiet good, but its ok for me!










G. IMPLEMENTATION

        Here are a few pictures of my prototype implementation. I plan to put it besides the other weird clocks. So I can enjoy the visual performance of each clock







Here is a video clip, I catch it using my handphone camera, not quit good, but can describe the visualization of this square clock!

  • Development phase view (video_1.3gp), see the changer from 12:00-AM to PM time. New time changer set to 13 seconds.
  • Running phase view (video_2.3gp), the time changer still in 12 seconds, see the changer between time and calendar display.

H. HOW TO READ

        Someone always ask, how to read the clock?

See, the blue leds around the square represent hours or month count form 1 to 12, depends on location from usual clock position. 2 digits 7-segmen left side represent minutes count from 1 to 59 or days count from 1 to 28, 29, 30, 31 depends on the month, and 2 digits 7-segmen right side represent seconds count from 1 to 59 or year count from 2000 till 2099 year. Bi-color led below 12 o'clock number represent AM/PM time, depends with the color light, first color represent AM time and second color represent PM time. Clock and calendar will be displayed about 13 seconds in turns. eg: the left picture above show calendar mode, the date is : Oct 18, 2009, and the right picture above show clock mode, the time is : 11:55:28 - AM. Time or date adjustment depends on this range turn. It took a little time to learn the adjustment feeling. Button response time about 1 sec for a slow increasing count.

No comments:

Post a Comment

Labels

PROJECTS 8086 PIN CONFIGURATION 80X86 PROCESSORS TRANSDUCERS 8086 – ARCHITECTURE Hall-Effect Transducers INTEL 8085 OPTICAL MATERIALS BIPOLAR TRANSISTORS INTEL 8255 Optoelectronic Devices Thermistors thevenin's theorem MAXIMUM MODE CONFIGURATION OF 8086 SYSTEM ASSEMBLY LANGUAGE PROGRAMME OF 80X86 PROCESSORS POWER PLANT ENGINEERING PRIME MOVERS 8279 with 8085 MINIMUM MODE CONFIGURATION OF 8086 SYSTEM MISCELLANEOUS DEVICES MODERN ENGINEERING MATERIALS 8085 Processor- Q and A-1 BASIC CONCEPTS OF FLUID MECHANICS OSCILLATORS 8085 Processor- Q and A-2 Features of 8086 PUMPS AND TURBINES 8031/8051 MICROCONTROLLER Chemfet Transducers DIODES FIRST LAW OF THERMODYNAMICS METHOD OF STATEMENTS 8279 with 8086 HIGH VOLTAGE ENGINEERING OVERVOLATGES AND INSULATION COORDINATION Thermocouples 8251A to 8086 ARCHITECTURE OF 8031/8051 Angle-Beam Transducers DATA TRANSFER INSTRUCTIONS IN 8051/8031 INSTRUCTION SET FOR 8051/8031 INTEL 8279 KEYBOARD AND DISPLAY INTERFACES USING 8279 LOGICAL INSTRUCTIONS FOR 8051/8031 Photonic Transducers TECHNOLOGICAL TIPS THREE POINT STARTER 8257 with 8085 ARITHMETIC INSTRUCTIONS IN 8051/8031 LIGHTNING PHENOMENA Photoelectric Detectors Physical Strain Gage Transducers 8259 PROCESSOR APPLICATIONS OF HALL EFFECT BRANCHING INSTRUCTIONS FOR 8051/8031 CPU OF 8031/8051 Capacitive Transducers DECODER Electromagnetic Transducer Hall voltage INTEL 8051 MICROCONTROLLER INTEL 8251A Insulation Resistance Test PINS AND SIGNALS OF 8031/8051 Physical Transducers Resistive Transducer STARTERS Thermocouple Vacuum Gages USART-INTEL 8251A APPLICATIONs OF 8085 MICROPROCESSOR CAPACITANCE Data Transfer Instructions In 8086 Processors EARTH FAULT RELAY ELECTRIC MOTORS ELECTRICAL AND ELECTRONIC INSTRUMENTS ELECTRICAL BREAKDOWN IN GASES FIELD EFFECT TRANSISTOR (FET) INTEL 8257 IONIZATION AND DECAY PROCESSES Inductive Transducers Microprocessor and Microcontroller OVER CURRENT RELAY OVER CURRENT RELAY TESTING METHODS PhotoConductive Detectors PhotoVoltaic Detectors Registers Of 8051/8031 Microcontroller Testing Methods ADC INTERFACE AMPLIFIERS APPLICATIONS OF 8259 EARTH ELECTRODE RESISTANCE MEASUREMENT TESTING METHODS EARTH FAULT RELAY TESTING METHODS Electricity Ferrodynamic Wattmeter Fiber-Optic Transducers IC TESTER IC TESTER part-2 INTERRUPTS Intravascular imaging transducer LIGHTNING ARRESTERS MEASUREMENT SYSTEM Mechanical imaging transducers Mesh Current-2 Millman's Theorem NEGATIVE FEEDBACK Norton's Polarity Test Potentiometric transducers Ratio Test SERIAL DATA COMMUNICATION SFR OF 8051/8031 SOLIDS AND LIQUIDS Speed Control System 8085 Stepper Motor Control System Winding Resistance Test 20 MVA 6-digits 6-digits 7-segment LEDs 7-segment A-to-D A/D ADC ADVANTAGES OF CORONA ALTERNATOR BY POTIER & ASA METHOD ANALOG TO DIGITAL CONVERTER AUXILIARY TRANSFORMER AUXILIARY TRANSFORMER TESTING AUXILIARY TRANSFORMER TESTING METHODS Analog Devices A–D BERNOULLI’S PRINCIPLE BUS BAR BUS BAR TESTING Basic measuring circuits Bernoulli's Equation Bit Manipulation Instruction Buchholz relay test CORONA POWER LOSS CURRENT TRANSFORMER CURRENT TRANSFORMER TESTING Contact resistance test Current to voltage converter DAC INTERFACE DESCRIBE MULTIPLY-EXCITED Digital Storage Oscilloscope Display Driver Circuit E PROMER ELPLUS NT-111 EPROM AND STATIC RAM EXCITED MAGNETIC FIELD Electrical Machines II- Exp NO.1 Energy Meters FACTORS AFFECTING CORONA FLIP FLOPS Fluid Dynamics and Bernoulli's Equation Fluorescence Chemical Transducers Foil Strain Gages HALL EFFECT HIGH VOLTAGE ENGG HV test HYSTERESIS MOTOR Hall co-efficient Hall voltage and Hall Co-efficient High Voltage Insulator Coating Hot-wire anemometer How to Read a Capacitor? IC TESTER part-1 INSTRUMENT TRANSFORMERS Importance of Hall Effect Insulation resistance check Insulator Coating Knee point Test LEDs LEDs Display Driver LEDs Display Driver Circuit LM35 LOGIC CONTROLLER LPT LPT PORT LPT PORT EXPANDER LPT PORT LPT PORT EXTENDER Life Gone? MAGNETIC FIELD MAGNETIC FIELD SYSTEMS METHOD OF STATEMENT FOR TRANSFORMER STABILITY TEST METHODS OF REDUCING CORONA EFFECT MULTIPLY-EXCITED MULTIPLY-EXCITED MAGNETIC FIELD SYSTEMS Mesh Current Mesh Current-1 Moving Iron Instruments Multiplexing Network Theorems Node Voltage Method On-No Load And On Load Condition PLC PORT EXTENDER POTIER & ASA METHOD POWER TRANSFORMER POWER TRANSFORMER TESTING POWER TRANSFORMER TESTING METHODS PROGRAMMABLE LOGIC PROGRAMMABLE LOGIC CONTROLLER Parallel Port EXPANDER Paschen's law Piezoelectric Wave-Propagation Transducers Potential Transformer RADIO INTERFERENCE RECTIFIERS REGULATION OF ALTERNATOR REGULATION OF THREE PHASE ALTERNATOR Read a Capacitor SINGLY-EXCITED SOLIDS AND LIQUIDS Classical gas laws Secondary effects Semiconductor strain gages Speaker Driver Strain Gages Streamer theory Superposition Superposition theorem Swinburne’s Test TMOD TRANSFORMER TESTING METHODS Tape Recorder Three-Phase Wattmeter Transformer Tap Changer Transformer Testing Vector group test Virus Activity Voltage Insulator Coating Voltage To Frequency Converter Voltage to current converter What is analog-to-digital conversion Windows work for Nokia capacitor labels excitation current test magnetic balance voltage to frequency converter wiki electronic frequency converter testing voltage with a multimeter 50 hz voltages voltmeter

Search More Posts

Followers