Variable one-shot timer circuit

Discussion in 'General Electronics Chat' started by doctororange, Dec 14, 2009.

  1. doctororange

    Thread Starter New Member

    Dec 14, 2009
    2
    0
    Hi,

    I am hoping to build a circuit to turn a standard desk light on for a given period of time, and then off.

    I'd like the time to be variable, controlled by a dial, and the shot triggered by a button.

    The time would be between 1 and 30 minutes.

    It would also be handy to have a second button to terminate the light at any point.

    Can you please point me in the right direction? I am clearly new... :0)

    Can I generally replace the R1 resistor (in any of the many examples I can find on the internet) with a variable resistor to achieve this effect?

    Thanks.
     
    Last edited: Dec 15, 2009
  2. Mike33

    AAC Fanatic!

    Feb 4, 2005
    349
    25
    Try this site to learn more about the venerable 555 timer, one of the most common IC's in the world: http://www.kpsec.freeuk.com/555timer.htm

    If you are new: Be careful when you wire this up! At the relay, you'll have mains voltage, well enough to KILL you. Use a good lamp socket, insulate ALL line connections. Before you hook up the lamp (I'd actually use an outlet wired up to the relay, plug the lamp into it, and have a lamp cord from the outlet to the wall outlet), test that the circuit functions properly with a DMM so you're not messing with high voltage. I'll make you a drawing...
     
  3. Mike33

    AAC Fanatic!

    Feb 4, 2005
    349
    25
    Okay, here is the right way to do this. You wire up a SECOND outlet to your 555 circuit, and test everything BEFORE plugging it into the wall (use your meter for continuity tests). Best would be to use a 3-prong cord and attach the ground wire to the second outlet's metal box. If not using 3 prong, use a PLASTIC box. If you have any doubt about how this is set up, consult a knowledgeable person!! Sorry to be pedantic, but if you do this wrong you could have a fire or be injured/killed. We worry about newbies!
    Any questions at all, ask here and myself or someone else will walk you thru it.
    The fuse is mandatory, and it MUST go in the HOT line, not the neutral. There is NO connection of mains power other than to the secondary of the relay, which must be rated for 120V/1A in the U.S. Use a PCB to solder those connections, watching closely for shorts between the relay's coil and switch.

    This way, you can control other devices that DRAW LESS THAN 1A (or you'll blow the fuse). Power/Voltage=current in A. So, a 60W bulb = 60/120 (U.S.)= .5A. There are a lot of 555 timer tutorials on the web, and a good circuit book by Forrest Mimms about how to do this the right way.
    Personally, I'd play with the timer for a while using 9V, then step up to the line stuff ;o) But if you have a background in electricity.....

    [​IMG]
     
  4. VoodooMojo

    Active Member

    Nov 28, 2009
    503
    53
    this should serve your needs.
    Be CAREFUL!
    choose appropriate relay for your power requirements
     
  5. doctororange

    Thread Starter New Member

    Dec 14, 2009
    2
    0
    Thank you both for your excellent replies!

    Firstly, I will say that I will be working with my uncle, who has considerable experience in electronics, so I should be safe. I will also take all your safety warnings seriously.

    One further question I had: is the 555 suitable for timing up to 30 minutes?
    Deviations of up to 30 seconds are acceptable.
    I have read that using a 4017 decade counter is more suitable for longer times.

    What do you think?

    Thanks again for your help, and I will let you know how it goes.
     
  6. VoodooMojo

    Active Member

    Nov 28, 2009
    503
    53
    as wired, the circuit i submitted should give you a max delay of about 15 minutes.
    experiment with higher values for C2. I have succeeded in achieving delays of many hours with this circuit.
     
  7. Mike33

    AAC Fanatic!

    Feb 4, 2005
    349
    25
    The 555 is good for <minutes to even days, if your timing needs aren't critical! You should do well using it for this purpose, and there are basically limitless applications for that chip - so learning about it is highly recommended!! You can run them as oscillators (astable) or one-shots like this (monostable)....you can 'cascade' them, so that you can reliably repeat events, like this light switcher. And there are untold tutorials on the net for all of these circuits.

    I'm glad someone with experience will help you; delving into mains power is tricky at first - not necessarily "dangerous" in itself, but like driving a car, there is Potential for real danger. As long as one follows all precautions religiously and is very organized, it is fine to learn about how to use household power. An experienced teacher is priceless!
     
Loading...