Repeat on/off delay Timer

Thread Starter


Joined Oct 7, 2011

I'am new to this forum and new to electronics.
I searched the forum for a similar project.Before posting here.But? Could not find any thing to what i need.

I build a astable 555 timer for clocking the time period of 10s appox
five secs (On) five secs (Off). Just to learn how the astable circuit works.
And build one for the frist time.It work perfectly .My timer might need to be faster or slower for my project.But i dont know. Here's a circiut that i came across searching for timers.
This timer is about 30% of the ciruit i could use.The 555IC and the Binary 4020 cmos counter IC set-up.I don't want to use a relay. They draw to much current for my project.I was thinking a Mosfet as the on/off switch. My total ciruit needs to draw 2mA or less. My supply voltage will be 3.6Vs my 555 IC input supply voltage is 3V-15V same go's for the the binary counter.
Here's another timer that might be even closer to my needs.But? I have
no clue. this uses diodes as logic coding on the output.

What i need to Build
I want to make a repeat delay time switch.
I will use a 555 IC and 4020 counters as in the links.
I can't use a microcontroller i don't know anything about
programming code.Or microcontroller's.
My timer needs to run a full week and repeat its self
from week to week.
So. I need the timer to be (on) for 9Hours starting 8:30AM ending at 5:30pm and (off) for 15Hours in a 24 hour day.if this makes sence to anyone.
Mon thru Sat then completely (off) on Sunday.Then turns back
on the following Monday morning to start all over again.
I will need a logic decoder or diode logic.But? don't
know how this will work into the circuit.For the Switch
i will use a N-channel MosFet to switch on/off the battery
pack which this timer will be connected to.
novice newbe.


Joined Nov 30, 2010
This is not a beginner level project. Besides that, the accuracy will be very difficult. You would need to start with a crystal oscillator for accuracy and divide a lot more. I say it's much better to buy an Intermatic brand timer with 7 day ability.

Thread Starter


Joined Oct 7, 2011

I was thinking about this item the intermatic timer to use. But it was to big for what i need to use.

Why is it so difficult to implement.The two links i posted used binary counters for there timers and done it.
The 4060 and the 4020 can go up to 16384 bit. It would take 2.528888889 hours for the logic to flip on pin 3 Q14 at a total period pluse rate of 10s. 5sec on 5sec off appox etc.I connected the 4060 to time it.
Pin 7 Q4 16 bit took 80secs for its logic to flip.

If i was to use a crystal oscillator. Which one would i use.And do they come it soic packages. how to breadboard it.

I'm willing to learn and do the work to build it with the right person who is willing to guide me and help a newbe out.
I throught this forum was to get help.
There's poeple on here, that i seen who gotten whole projects done and they know more then i do. And they didn't do squat for them selfs.
The person in the second link only use one 4060
I would think I'd need maybe 2 4060s or 4020s plus (AND logic) or some kind of decoder.They used diode logic I'm assuming.

If this is so hard why dose it state in the second link that i provided.
You could set a 4060 for 24 hours. On or off.:confused:

Can any one else guide and help a newbe out.

By the way I'm thirteen.But? Willing to try and build it my self. Anyone out there who is willing to help me.And has already build a long interval repeated timer.Your time and assistance will be mostly appreciated.


Joined Nov 16, 2007
I like your tenacity, unfortunately I am not the one to help you.

I think the issues with the proposed circuit method is the accuracy of the timer being built. I would suggest that at your age and with your determination to build the timer, the most advantageous path for you energy would be to learn some programming and use a micro controller. You will find that the ability to program such devices will, in the long run, save you much time and component space. It will be indispensable.

That said, I am also not the person to guide you with the programming walk-thru either. Kids these days are flocking to the arduino programmer and chips as they are fairly simple to learn. They may not have the full spectrum of functionality as other micro-chips, but they are a great introduction.

I hope someone does jump in here and provide some guidance with either method.

Good Luck Etronic...
Last edited:


Joined Nov 25, 2009
I don't know how you can use a crystal to pulse discrete ICs to life. But I can tell you this:

The specifications of your circuit demand accurate measurement of periods of time through a whole week, and the ability to repeat those measurements in every consecutive week.

As you have noticed, all you can produce with a 555 timer or counter is a square pulse or pulse train of set duty cycle (On/Off ratio).

However, you ask to implement several cycles: One that counts the weeks, one that counts 6 days (those could be merged) and one that counts the hours.

That results to three different circuits. Building them and powering them would require probably more space (and maybe money) than buying a ready-made timer, like the one you have been suggested.

It is good to want to know more about your hobby, but it is also wise to know your limitations.

Thread Starter


Joined Oct 7, 2011


The 4060 can do it.Not with one but maybe 2 plus a decoder. If you look in the second link on the 4060.
It states it has the ability to hole the delay for 24 hours in the on and off cycle.

This is why i need a engineer who knows how this 4060 functions for what i want it too do.

I'm only thirteen i know for a fact this could work as stated in the second
link i provided.but don't know how to get it to function for me
Here's a link i found that shows you how too use a crystal for very accurate timing.With the 4060.

I don't know how to get the FQ for the timing and get the rest of the circuit to function for what i want it to do.
Were Not talking atomic timing here.
It will be off some maybe 10ppm or 20ppm even with the crystal ossillator
will be off 5ppm to 10ppm do to temperature stability.

Dose anyone on this forum know about or Have used the 4060 or 4020 logic chips.In there projects.

There must be someone who's an engineer and has used the 4060 or 4020 logic chips before in there timing projects.

Or is everyone as clueless as me on here.
Not being sarcastic in anyway.Just clueless. :confused:


Joined Nov 12, 2008

Your requirements prohibit us from offering a workable solution.

If you want to do with entirely with discrete logic ICs and no microcontrollers, you're going to need several circuits as Georacer mentioned and thus several ICs . Even if you go to the trouble of making a custom PCB and use SMT parts, the board required to hold all the parts will itself likely be bigger (width and length) than the Intermatic timer #12 mentioned. If that timer is too big for your project, then building it with discrete parts is not an option.

You also mention drawing less than 2mA. We can't promise that with a circuit this large either.

If you need small size, low power consumption, and relatively accurate timing (yes, on 9 hrs, off 15 hours, Sundays off, and repeat every week will require fairly accurate timing), then you're left with two options.

1. Follow iONic's advice and look into a microcontroller. It will allow you to do all of this with one IC and a handful of parts which will allow you to make it really small and consume very little current. In addition, many microcontrollers can be put in a sleep state while only timing, so they will consume a lot less current than a discrete logic circuit. For something that will allow you to learn to program quickly and not cost a lot of money, check out the PICAXE:

2. If you're still against learning microcontrollers, hack an Intermatic digital timer - I'm pretty sure they're already using a microcontroller, so power consumption should be low. They're probably using a relay or triac to control the output, so replace it with a MOSFET. You can take the electronics out of the housing and put them into a smaller one for your needs. If the buttons are too big, you can replace those with ones of your choosing. The display consumes very little power being an LCD, but you can add a switch or jumper terminals to remove power to the display after you've set the time. You'll need to figure out what DC voltage it requires to run on, but that shouldn't be a problem.

Still bent on making a circuit? You can move forward, but it will be physically big, take a lot of time to design, take a lot of time to build, will cost a lot more than either option 1 or 2, and probably consume more than 2mA. This is why we are unable to help you with your request - your requirements cannot be met.


Joined Nov 16, 2007
Still waiting for Help.

There must be someone who work with the 4060 ICs
Who's willing to help ME.
If you are even remotely considering the field of electronics as your livelihood, then the choice is a "no-brainer", you won't get anywhere without the programming experience.
Last edited:

Thread Starter


Joined Oct 7, 2011
Hi elec_mech

I was thinking about buying the intermatic digital timer before coming to this site for help.and hack it. But? I didn't want to buy it.To find out that the ciruit board is to big for my needs.I throught this over,and will try this first.It seems to be the quickest way for me to get what i need.Plus! They
will have a microcontroller on the board for programming the timing for a 7 day week.
Plus options for on/off timming for each day of the will cost me

Have you seen them for less...

Or will it cost less or the same to build it with a microcontroller using the picaxe programmer.One thing with this option.I do not know how to write code for the microcontroller.The hardware is easy to do. but? The code
I do not understand it.
Would you be willing to help me with the code.I'd tried it with the Basic Pic.
I just couldn't grasp the language.


iONic Yes i know it.And thanks for your input.


Joined Nov 16, 2007
I think the self programming route will be more time consuming and a bit more expensive. If you need the device soon then go with the Intermatic timer.

But keep in mind the programming solutions for future projects and experience.


Joined Feb 14, 2010
If you decide to explore microcontrollers at some point, the TI MSP430 Launchpad might be a relatively economical way to get your feet wet, so to speak. For a total investment of $4.30 you get a development board with built-in programmer and debugger, and the development software is free. TI is also quite generous with (microcontroller) IC samples.

Off the top of my head, here's a crude program that produces the timing you mentioned. It's crude because there's no way to set the time and so you would plug it in and turn it on at 0830 Monday morning and simply leave it running.

Rich (BB code):
    *    9 hrs "on" (Mo 0830..1730)
    *   15 hrs "off"
    *    9 hrs "on" (Tu 0830..1730)
    *   15 hrs "off"
    *    9 hrs "on" (We 0830..1730)
    *   15 hrs "off"
    *    9 hrs "on" (Th 0830..1730)
    *   15 hrs "off"
    *    9 hrs "on" (Fr 0830..1730)
    *   15 hrs "off"
    *    9 hrs "on" (Sa 0830..1730)
    *   39 hrs "off"

    #include "msp430g2231.h"

    int seconds = 5;                  // seconds counter
    int daycount = 0;                 // day counter
    int active = 0;                   // active period flag

    void main()                       // main program
   /*                                                                   *
    *  setup WDT in "interval mode" using 'aclk' source (32 kHz xtal)   *
    *  for 1 second (1 Hz) intervals.                                   *
    *                                                                   */
      BCSCTL3 |= XCAP_3;              // enable 12.5 pF xtal capacitors
      WDTCTL = WDT_ADLY_1000;         // WDT "interval mode" ACLK 1-Hz

      P1DIR = BIT0;                   // set P1.0 pin to output
      P1OUT &= ~BIT0;                 // set P1.0 pin to '0'

      while(1)                        // main loop
      { if(IFG1 & WDTIFG)             // if one second (1 Hz) interval
        { IFG1 ^= WDTIFG;             // clear WDT interrupt flag and
          seconds--;                  // decrement "seconds" variable
          if(seconds == 0)            // if "seconds" counter timed-out
          { if(active ^= 1)           // toggle "active" flag, if "on"
            { seconds = 9*3600;       // set timer for 9 hours
            }                         //
            else                      // else, "active" is "off" so
            { seconds = 15*3600;      // set timer for 15 hours and
              daycount++;             // bump daycount
              if(daycount == 6)       // if 1730 Saturday
              { daycount = 0;         // reset to 0 and add 24 hours
                seconds += 24*3600;   // to timer to skip Sunday
              }                       //
            }                         //
          }                           //
          if(active)                  // if 9 hour "active" period and
          { if(seconds % 5 == 0)      // if 5 second interval
              P1OUT ^= BIT0;          // toggle the P1.0 output pin
          }                           //
        }                             //
      }                               //
    }                                 //
Yes, there's a considerable learning curve, but with the right attitude, it can also be a wonderful and exciting new experience and adventure.

My 2 cents.

Cheerful regards, Mike
Last edited:


Joined Nov 12, 2008
If you were going to build several, then the microcontoller option would be cheaper in the long run. If you're only going to make one, hack an existing timer.

Now is a great time of the year in the U.S. to look for a cheap digital timer as X-mas is upon us. A quick Google search turns up $14-$30 digital timers.

Found this one for $14: - no guarantee this one is actually in the store, nor sold at the same price.

Check out Wal-mart/Target, Home Depot/Lowes, or similar stores. Check both the electrical (hardware store)/home improvement (Wal-mart/Target) section and the X-mas section. You may luck out and find one for $10, but you shouldn't have a problem finding one priced $20 or less.

If you decide to give microcontrollers another shot, PICAXE won't cost much to get started as far as starting to learn about microcontrollers (probably more than a $20 timer once you factor all the programming hardware, boards, and shipping though). I've used Parallax Basic Stamp II (not real cheap, but the easiest to learn how to program for a beginner in my opinion) and the PIC microcontrollers using PicBasicPro (not cheap).

The TI board Mike suggested is cheap, but unless they offer Basic as a programming language (Mike shows the C programming language), I'd hesitate. This can be argued a lot, but in my experience, Basic is by far the easiest programming language to learn. C has a much steeper learning curve than Basic, and Assembly, while often free, is even harder.

Thread Starter


Joined Oct 7, 2011
I will check out the local store's for a small foot print 7 day digital timer.
Thank for the info. elec_mech.

iONic I will remember that.

MMCLaren I looked at the site you mentioned for $4.30 how can you beat that price for the Hardware plus free software. And free samples.

I will be back? For programming Help for sure.

Thanks everyone.

Thread Starter


Joined Oct 7, 2011

I been searching on the web for timers.And looking around my local hardware stores.Also lowes and Homedepot.
For the smallest timer i could find. But could not fine any thing smaller than the one from Homedepot. As you posted.

So i pick one up,for the same price. And one of the cheapest.

I been testing it in all the settings it has. And they all are working perfectly.

The back-up battery is charged by the AC power.
The back-up battery powers the LCD display and the timer circuit.
There are two seperate boards.

Do you have any suggestions how to go about hacking this to work
on 3.6Volts. And what i need to disect first.Or find
out about the workings of the circuit.



Joined Feb 19, 2009
Your requirements pretty much point only to a microcontroller as a solution. If you can learn BASIC, which is farily, well, basic, but powerful, you can program a uC.

Setup can be anywhere from $10 for the TI to $50 for PIC or AVR. Many here are helpful with PIC programming, as well as a few who can help with AVR.

The uC(anything from PIC to a pre-built timer system) will handle the timing, the peripheral circuits you add to control the external MOSFET would be similar or the same.


Joined Nov 12, 2008
Do you have any suggestions how to go about hacking this to work
on 3.6Volts. And what i need to disect first.Or find out about the workings of the circuit.
It's been a little while, so let's go over what you want to do, just so I'm clear.

How do you want to power the timer:
a) Only with a battery?
b) Only with power from wall outlet?
c) Power with wall outlet and have battery to keep time if house loses power?

If you want to power the timer with a battery, what is the battery voltage?

You want the timer to turn on and off something with a DC battery, correct?

If yes, what is the battery voltage?

Next, can you take some good pictures of both boards, front and back, and post them here? You can attach them as JPEGs or post them in your response as .png. We need to "see" the circuit before we can help.

Could you tell me the make and model number of the timer you bought and where you bought it?

Thread Starter


Joined Oct 7, 2011

From your first.Question?

1. A)

2. You want the timer to turn on and off something with a DC battery, correct? That's Correct
2a. I have a device that i will remove the manual on/off spst switch.And replace it with the electronic timer. to turn on/off at preset times.

The battery iam going to use is 3.6volts 1800mAh

The back-up battery in the timer. I don't know what the voltage is.
But i will find out.

Can't post pictures don't have a camara.At this time.Sorry.:(

The timer i bought is the same one you posted in post #16 at homedepot.
they should all have the same circuitry.