Time Delay Circuit with Delay-On and then Delay-Off

Discussion in 'The Projects Forum' started by louie55, Dec 27, 2011.

  1. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Hello,

    I am attempting to work on my first ever Electronic Circuit Design. I have a lot of experience working with older 50's and 60's electro-mechanical electronics and with electrical wiring, but this is my first attempt at a modern electronic circuit with IC chips, resistors, capacitors, etc. I did take electronics in college and even have an associate's degree in Electronics, however, most of that study involved theory and equations and not much in the way of practical circuit design. So I do know the basics of the components.

    Now that the back-story is out of the way, here is what I need to build.

    The exact funcionality I need is this:

    I need a circuit that, when power is applied, will keep the output LOW for approx. 2.25 seconds, then switch the output HIGH for approx. 3.75 seconds, then the power will be cut. The circuit must then reset itself for another iteration of the same delay (which might happen automatically when the power is cut? Not sure if the capacitors will discharge or not?) The output will be connected to a low power relay coil (about 270 ohms). Input and Output Voltage is 12VDC.

    Just for reference, my input voltage to this circuit is actually 32VAC, however, I think I have the voltage dropped down to 12VDC using a transformer/bridge rectifier/voltage regulator, and it seems to be working good (in Multisim anyway). So the actual input to my time delay circuit will be 12VDC. So assume that for further discussion.

    Now, for the time delay part, I am wanting to use 555 timer IC chips. My initial thought was that I would need 2 555 chips. One for the first 2.25s delay and one for the second 3.75s delay. Does that sound right? I have read a lot of websites on 555 timers, even this one, but I can not quite get it figured out. I am using Multisim to simulate the circuit since I have no physical 555 timers to test with. I started out with a simple single 555 timer circuit to see if I had the main idea down. And I got it to simulate correctly with an LED light turning on for a brief period then turning off (though the actual time delay duration seemed to be off from what the RC network should have made it, but maybe that's because it was only a simulation?).

    So, anyway, my first problem is how to get the 555 timer chip to trigger with a 12VDC trigger signal instead of a ground signal. I have tried a transistor to switch the trigger pin to ground, but that didn't work in the simulation. I also tried a delay-on configuration that uses an RC time delay to trigger the 555 that I found HERE, but that also doesn't work in simulation. The only way I can successfully get the 555 to trigger and work correctly is by putting a manually-operated switch from the trigger to ground. However, my circuit is triggered by voltage, not by ground.

    Also keep in mind that the 12VDC source is on the ENTIRE time that the circuit needs to operate, it is not just a momentary signal.

    Maybe I better end the post with that for now. No use going on until that first (pivotal) problem is figured out. Could it be that this would work physically but is just not working in Multisim?

    Here is a test timer circuit that works perfect in simulation with a push-button trigger. The LED stays on for a little over 3 seconds (according to Multisim) then turns off until the next trigger. Basically, I just need to figure out how to make the circuit below trigger as soon as the power is turned on instead of with the push-button switch.

    [​IMG]

    I am just using a 12VDC source as my power supply in the above circuit to replace my actual power supply which looks like this:

    [​IMG]

    However, my power supply configuration shouldn't really be important for the design of the time-delay circuit. But I thought I would post it anyway in case there is something wrong with it.

    Also, if there is an easier way to do what I want to do (such as using only 1 555 chip instead of 2), let me know! The simpler the better!

    Any help would be appreciated.

    Thanks!
     
    Last edited: Dec 27, 2011
  2. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    First, with the 30k resistor and 100μF capacitor, the one-shot should stay high for 3.3 seconds. Of course, the tolerance of the components will affect that theoretical time.

    Second, are you saying that your timing circuit will have no operating power until the 2.25 second low time begins?
     
  3. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    On your first point, yes, that is about the time that Multisim simulated it at. I realize that it does not match the time delay I need for my project, I just created that circuit as a quick test to make sure I had all the basics right. For my actual timer circuit, I plan on using a potentiometer to fine tune the time delay as the delay time is fairly important and has to be within about .5 to 1 second of my specs.

    On your second question, yes, that is correct. The circuit will have NO power applied until it needs the delay to start. I realize that these are not ideal circuit conditions, but unfortunately, those are the conditions that I need to work with. However, if it is ABSOLUTELY necessary, I think I could run an always-on 32VAC line to the board to keep the electronics up and running, but that would be a last resort.

    What I am trying to do is replace a 1950's timer motor (10 RPM) with a cam on it that actuates a micro switch after so many seconds then un-actuates it after another delay. This motor has a 32VAC supply to it which can't be changed. These motors are mounted on the control boxes for machines that I work on and so I would like to avoid any rewiring of the control box if necessary. The motors seem to be going out a lot and new ones are now up to $100 so I would like to replace the motor and switch with a PC Board and SPDT Relay.

    Thanks.
     
  4. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Try this circuit.

    [​IMG]

    With the components shown, the output should go high for 2.42 seconds as soon as power is applied; you would have to fine tune the timing with a pot. Be aware that there may be problems if the power is not applied positively, i.e., I don't know what effect on the timing a power "ramp up" might have, nor do I know exactly what sort of "start up" time the 555 has.

    With all those issues resolved, you could use the output from this circuit as the trigger input for another 555 one-shot, with its own set of timing resistor and capacitor. I assume you know that the NE556 is two 555's in one package; that could be just what you need.

    Disclaimer: Bear in mind that I am just a tinkerer. You should do all the required testing before putting any of this in service.
     
  5. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    With regard to your power supply, the datasheet for the LM7812 calls for a .33 μF capacitor on the input side. In addition, I would make the 85 μF filter cap larger, however you may run into a problem with the cap holding the 555 on briefly even after the 32 Vac is off.
     
  6. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Ok, I will add a .33μF capacitor at the input. Will that do anything with the huge filter capacitor right next to it?

    Also, about the filter capacitor, you are correct. I must have made an error in my calculations. It should be about a 300μF cap. Using the formula:

    C=5i / Vf

    (i=load current, V = peak voltage out of the bridge rect, f = AC Frequency)


    I calculated my load current at approximately 50mA. My peak voltage is 14V. f=60HZ

    I'll change the value of the filter capacitor in my circuit. Thanks for pointing that out!

    As for your circuit you posted, I'll try that out and get back to you. Thanks for all the help!
     
  7. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    The datasheet says, "CI is required if regulator is located an appreciable distance from power supply filter." I don't quite know what is "appreciable," so I put it in. It probably doesn't matter.
     
  8. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Ok, I tried your circuit and it seemed to work!

    So, I did some tinkering and don't ask me how but I got a working circuit! Here it is:

    [​IMG]

    When I first switch the power on with S1, there is a about a 2.25 second delay before the LED turns on, then after about 3.75 seconds the LED turns off!! Exactly as planned! I'm not even sure how I figured out how to wire in that second 555 but it somehow finally clicked in my brain and I tried it and it worked!

    There is just one problem! After the LED goes off after both time delays, if I switch off S1 (which switches off the power to the circuit) and wait a couple seconds, then switch it back on, the LED never comes on again. For some reason the circuit is not resetting itself when the power is cut. Is this because the capacitors are staying charged? Please tell me there is a way to have the circuit reset itself! I'm so close!

    Any ideas?

    Thanks.
     
  9. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Rewire U2 similar to the way you first had it, and connect the output from U1 to U2 with a small ceramic cap. (You can leave the LED and its current limiting resistor connected to U1 and thus see U1 go high on power-up, and then go low as it triggers U2.)


    [​IMG]


    One problem you will encounter is that after the power is disconnected, you must wait for the timing capacitors to discharge before power is restored. Otherwise, the output of U2 will go high immediately.

    Disclaimer: Bear in mind that I am just a tinkerer. You should do all the required testing before putting any of this in service.
     
  10. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Thanks for the idea.

    Before you posted, I tried out an idea of my own and it seems to work in simulation. I've always been partial to electro-mechanical devices so I thought about using a relay to discharge the capacitors when the power shuts off through a NC contact. Here is what it looks like:

    [​IMG]

    When the power is applied, the relay turns on and contact K2 closes and contact K3 opens. This assures the the capacitor C3 will only discharge with power off.

    Now, even if I cycle the power switch off and on quickly, the circuit always resets and works every time. I will have to do some more observation and see if the time delay stays constant each cycle.

    Your idea with discharging the capacitor slowly is good if there is ample time for it to discharge as you said, but the time between cycles is variable. Sometimes less than a second. So I think the relay contact is the quickest way to drain the cap.

    As for capacitor C2 draining. I assumed that when the output of U1 went high, that would make both sides of C2 high which would cancel the charge out before U2 is triggered. Is this correct? It seems to be working this way anyway.

    I know relays aren't the ideal component to use, but I should have plenty of current to run the relay. It will just add a little extra cost to the board.

    If you see any critical errors in the circuit, please let me know!

    Thanks.
     
  11. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Congratulations on getting it working.

    My first suggestion would be the addition of by-pass caps across the power leads on both 555's; this is especially important in an electrically noisy environment. Second, be sure that U2 isn't asked to provide too much current. Finally, if you are operating an inductive load with the output from U2, be sure to use diodes to protect the IC.

    BTW, I suppose you know that the entire circuit can be replaced with one cheap microcontroller and a half dozen resistors and caps. :D

    Good luck.
     
  12. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Ok, thanks for the suggestions! I already knew about the diodes for inductive loads. I will have one across the output of U2. Do I also need a diode across relay K1 in my diagram? Probably wouldn't hurt. Also, I'll add the by-pass capacitors across the 555s. I saw you had one in your diagram, but forgot to add it to mine.

    The only load on U2 is going to be a relay coil of about 288 ohms. So only about 42mA. I read that a 555 can output up to 200mA, so I should be fine there. And that other relay coil is the same, so total current draw on my power supply shouldn't go over 100mA which I think it should be able to handle easily.

    Finally, no, I don't know anything about microcontrollers. Please explain!!! If there's an easier/cheaper way to do this, I definitely want to know! Plus, just learning it for the sake of learning wouldn't be bad either. :D

    Thanks!
     
  13. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I have been playing with the PICAXE family of microcontrollers for the last several months and have found them to be capable and a lot of fun. They are PICs which have a basic bootloader preprogrammed and are available from 8 pin to 40 pin models. The programming software is free and one can build a serial proramming cable easily, or buy a USB programming cable for $27. There is a forum that is active.

    You can find out more here. http://www.picaxe.com/

    Attached is a schematic similar to one that would do the job you are working on. As you can see, there's not much to the hardware, and software would be used to control the timing. Essentially, the code would tell the μC to pause x number of milliseconds on power-up, then make pin 2 high for y milliseconds, then make pin 2 low and wait - very simple code.

    The PICAXE-08M2 would be more than capable of doing the job ($2.65) and the whole circuit could be built on a AXE021 proto board ($4.49). Both are available here. http://www.phanderson.com/picaxe/

    I'm not suggesting that you "switch horses in mid stream," but maybe it's something you would want to investigate for the future.

    PICAXE's are looked down upon by some who write code in assembler or C, but I like them. However, just a short time ago, I bought a PICKit2 programmer in order to see if I can learn to add PIC's to my list of tinker toys.
     
    Last edited: Dec 30, 2011
  14. louie55

    Thread Starter New Member

    Dec 27, 2011
    7
    0
    Cool. Is there a way to make the timing variable with the microcontroller? Somehow add a potentiometer than can be turned with a screwdriver? That will be an important feature for my circuit because the timing will need to be tweaked.

    On a different subject, do you have any suggestions on what equipment I should buy for electronic prototyping? I already have a couple small breadboards, but they are nothing fancy. Also, I think they make blank PC boards that you can solder to in order to make prototype boards after you have tested your circuit on a breadboard. And after that, how would I go about making the actual finished board? Is that a do-it-yourself thing or do I have to put the design of the board on a software program and have it made by a company and shipped to me? If it works good in testing, I may need quite a few of them.

    Thanks.
     
  15. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Yes, you set up a voltage divider and connect the output to a pin on the microcontroller. The μC has the abilibity to read the voltage and convert to a digital number (ADC or analog to digital conversion). Then, you use the digitized number as a reference value.

    You might use perfboard or stripboard for one or two, but it's pretty slow for multiple units. (Google perfboard, stripboard, vectoboard, veroboard.) Here is a 555 circuit that I built yesterday on a protoboard for use as a source for clocking CMOS digital IC's. (The actual PCB is my own protoboard design, which I had made by a PCB manufacturer.)

    [​IMG]

    Some people make their own PCB's. Do a search on this site for a post by Bill Marsden on making them. Bill has made a lot and documented how he does it. I have made a few, but it's too messy for me and I just buy them. However, that means that you have to use special software to design them and send the files to a manufacturer, which has a learning curve. There is free software to do it: Google ExpressPCB.
     
    Last edited: Dec 31, 2011
  16. harsha a s

    New Member

    Jan 23, 2012
    11
    0
    sir , actually i need to switch off ic lm2907 after 10sec from it's start... so can u help me out to get this???
    is there any possible with ic lm2907 to get some delay and turn it off???
     
Loading...