24 Hours Timer using PIC-16F84A microcontroller (PART-2)

G. IMPLEMENTATION

        Here is the implementation of my prototype, before and after using the new one.











H. DUAL TIMER SCHEMATIC

        Some people ask me to build the dual timer version, while I don't see the benefit of this dual timer for. They want 2 output relays, which could be set as what the single do. But for the curiosity and enthusiasm I made what they ask! The difficulty is I already run out of the I/O spare. So by making some changes with pin MCLR and utilize it, then it become one more input. But this could be done only with PIC16F628/A types and not for PIC16F84/A types. What a pity, there is no help for it! With this new configuration, not to much changes, the I/O map are like these :



  • I/O port A-0 = Function Select button (Input)
  • I/O port A-1 = Driving Relay 2 (Output)
  • I/O port A-2 = Led indicator 1 (Output)
  • I/O port A-3 = Led indicator 2 (Output)
  • I/O port A-4 = Driving Relay 1 (Output)
  • I/O port A-5 = Increment button (Input)
  • I/O port B-0 ~ B-7 = Number indicator (Output)
The schematics are like these : (Dual_TimerS.sch, Dual_Timer-24_Schematic.pdf)

Now there are 4  leds to distinguish the operation option for setting the time!

I. LAYOUT

        The PCB design changed from the original with some modification to accommodate the 2 option relay outputs. Almost all of the other components not different. here is the new design :






J. PART LIST

        Here are the part list for this dual timers controller :

   1. Resistors :
      R1 ~ R8, R11 ~ R14 = 1k, 1/4W, 5% ......................... 12 pcs
      R9, R10 = 4k7, 1/4W, 5% .................................... 2 pcs
      R15, R16 = 10k, 1/4W, 5% ................................... 2 pcs
   2. Capasitors :
      C1 ~ C2 = 33 pF (for oscillator) ........................... 2 pcs
      C3 = 100 nF (for IC decoupling, used as necessary).......... 1 pcs
      C4 = 220 uF/ 25 V .......................................... 1 pcs
      C5 = 100 uF/ 25 V .......................................... 1 pcs
   3. Semiconductors :
      IC1  = PIC16F628/A (PIC microcontroller) ................... 1 pcs
      IC2 = 7805 (Voltage regulator) ............................. 1 pcs
      Q1, Q2 = C1061 or H1061 (Power NPN transistor) ............. 2 pcs
      Q1, Q2 (alt) = BC548B (NPN transistor) output up to 25 mA .. 2 pcs
      D1, D2 = 1N914 (Silicon diode) ............................. 2 pcs
      D3, D4, BD = 1N4007 (Silicon diode) ........................ 6 pcs
      LED1 ~ LED12 = 3mm, Red, Yel, Grn (For indicator) ......... 12 pcs
   4. Others :
      X1 = 32.768 kHz (Clock Crystal oscillator) ................. 1 pcs
      X1 = 4 MHz (Optional Clock Crystal oscillator) ............. 1 pcs
      Optional IC socket for 18-pins (use 20-pins) ............... 1 pcs
      Optional terminal connector CON1 ~ CON4 = 2 pin (power) .... 4 pcs
      S1 ~S2 = Miniature push button (Push on) ................... 2 pcs
      TR1 = Miniature transformer, P-220V/S-12V, 100 mA .......... 1 pcs
      PCB material or vero board, (6x6cm, 6x8cm) ................. 2 pcs
      RL1 = 12V/20mA Power Relay (output 220V-AC/3A) ............. 2 pcs

K. FIRMWARE

        Dual timer Firmware design not to much different from the single one. The new algorithm has the sequence like this :
  • Real time clock run using TMR0 interrupt timer 1 sec.
  • There are 13 states made by Function Select button consecutively roll over, ie;
    • State 1 - Normal Clock operation, just display the hours and minutes in interval 2 sec.
    • State 2 - Setting Clock hour, display only clock hour number part
    • State 3 - Setting Clock minute, display clock minute number part
    • State 4 - Setting Time1-On set, display hour number part
    • State 5 - Setting Time1-On set, display minute number part
    • State 6 - Setting Time1-Off set, display hour number part
    • State 7 - Setting Time1-Off set, display minute number part
    • State 8 - Setting Time2-On set, display hour number part
    • State 9 - Setting Time2-On set, display minute number part
    • State 10 - Setting Time2-Off set, display hour number part
    • State 11 - Setting Time2-Off set, display minute number part
  • Each state pair indicates by 2 output leds
  • Minute or hour number count up by pressing increment button
  • Clock setting to set the real time clock
  • Time1-On setting to set the time when relay1 output on
  • Time1-Off setting to set the time when relay1 output off
  • Time2-On setting to set the time when relay2 output on
  • Time2-Off setting to set the time when relay2 output off
  • Number are show in BCD format in 2-digits

        I made 2 version of these firmware, one using the low crystal clock 32.768 kHz, and another using 4 MHz crystal clock. Low crystal clock gave the result some flicker of output relays when on. While the high one none seem the symptom. I doubt that the latency time to long for low crystal use (?). Both still had some bugs, when setting the time for relay1 output, led  L11 was never on. I still don't know why? Where the wrong routine point is? Could some one find it? Please inform me. The functionality of the firmware still run well. The time can be adjusted normally, but a little difficult to different which one still set.




I use PIC16F628A type controller both, and dual_timer for low crystal use 32.768 kHz, and dual_timers for 4MHz crystal use.

L. PROTOTYPE

        Here are a few shot of my prototype looks like :







1 comment:

  1. Bro do not download bro plz help me bro

    ReplyDelete

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