Announcement

Collapse
No announcement yet.

555 countdown timer design question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Re: 555 countdown timer design question

    Technically you don't even need a 555 to do a hold-for-60 sec delayed turnoff, just need a high gain amplifier as a comparator (op amp, or darlington even) driving a switching element, works just like the vacuum switch.

    Push button -> charges capacitor. Charged capacitor is over threshold of darlington and thus turns on. Release button -> capacitor slowly discharges through a resistor. When it drops below the darlington's threshold of around 1.4 volts, it shuts off, turning the output off. Simple enough?

    Oh just wanted to point out some shortcomings of this: no hysteresis. That "off" trigger point could be very messy if the impedance of the input is high, so you need to carefully pick values... might not be good for minute durations.

    For long duration delays I personally would have to go with a real counting system much like what... a microcontroller... would do. Mostly to make sure timing errors are minimized due to stray leakage, tolerances, etc. 1 minute delays are just starting to get to the ugly point. 1 hour is definitely not something I would ever do via analog - must be done digitally.
    Last edited by eccerr0r; 10-30-2017, 12:57 AM.

    Comment


      #22
      Re: 555 countdown timer design question

      Originally posted by eccerr0r View Post
      Technically you don't even need a 555 to do a hold-for-60 sec delayed turnoff, just need a high gain amplifier as a comparator (op amp, or darlington even) driving a switching element, works just like the vacuum switch.

      Push button -> charges capacitor. Charged capacitor is over threshold of darlington and thus turns on. Release button -> capacitor slowly discharges through a resistor. When it drops below the darlington's threshold of around 1.4 volts, it shuts off, turning the output off. Simple enough?

      Oh just wanted to point out some shortcomings of this: no hysteresis. That "off" trigger point could be very messy if the impedance of the input is high, so you need to carefully pick values... might not be good for minute durations.

      For long duration delays I personally would have to go with a real counting system much like what... a microcontroller... would do. Mostly to make sure timing errors are minimized due to stray leakage, tolerances, etc. 1 minute delays are just starting to get to the ugly point. 1 hour is definitely not something I would ever do via analog - must be done digitally.
      I too thought of a simple op amp at first, but I just happened to have a 555 in my junk box and used the op-amps inside of it really. Cheap and cheerful is enough for this project, so millisecond precision is not a requirement, though large errors are not great either.

      Hysteresis: I too am a bit concerned that when the cap charges back up to that critical point, right in between the threshold value the output will flicker rapidly from ON to ON-OFF-ON-OFF before finally going off fully. I did watch one of Dave's videos where he explains hysteresis, so perhaps it can be implemented here as well to make sure the thing is either ON or OFF and doesn't oscillate, that's the term for it
      Wattevah...

      Comment


        #23
        Re: 555 countdown timer design question

        What about something like THIS ? It's a chart I put together with various op-amp formulae to quickly calculate stuff.....I geeked out big time, but the one we care about is the very first example. Let's ditch the 555 for now and use a standard op-amp with hysteresis. The numbers in the chart are how I last left them, but we can play around with those values to get what we want. We'll probably have to reverse the logic though, because VIN in the schematic is connected to the non inverting input, which would be the input from the capacitor, so the output of the op-amp goes HIGH when the cap charges up (Vref at the INV pin is lower than N.INV input), so now we need to slowly DISCHARGE it rather than charge it as we did in the 555 setup....how does this sound ? STILL not ideal, obviously, but could be an improvement.
        Attached Files
        Wattevah...

        Comment


          #24
          Re: 555 countdown timer design question

          BTW, Dave's video that inspired me is here. The setup he shows there might actually be closer to what I need. This is how I see it, though of course it could be complete rubbish Just like in my original 555 circuit, we'll keep the R-C circuit, but hook it up to inverting input. I'll then use the positive feedback resistor divider Dave describes on the NON-inverting input. A push-button goes between the capacitor and GND. When you press it, the cap instanly discharges (well not literally, there'd be a small resistor there since it's not good to "shock" it like that), the inverting input is now low, therefore below the non-inverting one and the op-amp swings high. As the cap slowly charges back up, the inverting input will eventually become greater than the non-inverting input and the op-amp swings back low....that's the theory in my head at least
          Wattevah...

          Comment


            #25
            Re: 555 countdown timer design question

            The nice thing about the 555 is that it will prevent the noise (I wouldn't call it "oscillation") from retriggering the lamp due to the RSFF. So that is actually sort of like a digital hysteresis loop. But choose whichever you can get your hands on...

            Comment


              #26
              Re: 555 countdown timer design question

              The 555 has all the stuff you need to accomplish what you want to do with OP Amp with very minimum parts requirement.
              Look at the internal circuit of 555: It has comparators, it has flip-flop, it has Output (Source or Sink) for driving the load, etc.
              Last edited by budm; 10-30-2017, 09:37 AM.
              Never stop learning
              Basic LCD TV and Monitor troubleshooting guides.
              http://www.badcaps.net/forum/showthr...956#post305956

              Voltage Regulator (LDO) testing:
              http://www.badcaps.net/forum/showthr...999#post300999

              Inverter testing using old CFL:
              http://www.badcaps.net/forum/showthr...er+testing+cfl

              Tear down pictures : Hit the ">" Show Albums and stories" on the left side
              http://s807.photobucket.com/user/budm/library/

              TV Factory reset codes listing:
              http://www.badcaps.net/forum/showthread.php?t=24809

              Comment


                #27
                Re: 555 countdown timer design question

                Here is the way I have approached this design in the (distant) past with good results. You can, of course, play with 555 analog timing, capacitor and resistor values and all the rest. With the same amount of design and construction time, you will get a much better and repeatable result using discreet logic chips. The parts are cheap, and you can easily re-adjust the circuit for different timings, repeat/no repeat, etc.

                Do this with a couple of 4-bit synchronous up/down counters. Assuming the unit is for turning a table lamp on and off, use the mains signal to derive a perfect 1 second clock pulse by dividing the line frequency by 60/50. (use your power transformer) The transformer can also supply the power for the chips. The counters must take a preset - 60 or 50 - and then count down to 0 synchronously. The Zero state is decoded simply using a couple of diodes. When the Zero state is detected, it will operate an opto-triac, which will isolate your circuit from the mains. The delay can be made to repeat indefinitely by using the Zero detection to reset the chips. Or, the counter can easily be made to delay manually, or act on an external signal.

                I really don't think you need a SPICE model for this design. Good Luck.
                Is it plugged in?

                Comment


                  #28
                  Re: 555 countdown timer design question

                  what's the end product?
                  is this related to the remote controlled corridor illumination thing?

                  Comment


                    #29
                    Re: 555 countdown timer design question

                    Originally posted by stj View Post
                    what's the end product?
                    is this related to the remote controlled corridor illumination thing?
                    Yes it is. For this reason, it doesn't have to be uber-precise (just in the ballpark as they say). We're not building a time server here - just switching on/off a lamp. It certainly helps if it IS precise while still keeping a minimum of parts and complexity....though it's probably not possible
                    Wattevah...

                    Comment


                      #30
                      Re: 555 countdown timer design question

                      Hmmm...here's a good opportunity to learn about something new: Sync counters...haven't worked with those TBH. I believe they were used in clock radios ? Would THIS count as one of those ? The supply voltage is way to small for my application - would need to keep it in the 12v range to keep the part count at a minimum. It would certainly overcomplicate the project, but I like a good project, plus if it's worth doing, it's worth overdoing
                      Wattevah...

                      Comment


                        #31
                        Re: 555 countdown timer design question

                        the reason i asked, you can get a microcontroller module with built-in wifi for a few $ and just add a 5v psu and a solid-state relay.

                        then control the light from a fone.

                        Comment


                          #32
                          Re: 555 countdown timer design question

                          I noticed another thing: shouldn't there also be a pulldown resistor on the base of that BC transistor to keep it off when the output of the 555 is low ? Or is the 555 already doing that internally ?
                          Wattevah...

                          Comment


                            #33
                            Re: 555 countdown timer design question

                            Originally posted by Dannyx View Post
                            I noticed another thing: shouldn't there also be a pulldown resistor on the base of that BC transistor to keep it off when the output of the 555 is low ? Or is the 555 already doing that internally ?
                            If the output pin of the timer is already low, then an external pull-down resistor is not needed.

                            The output pin is either high or low, it doesn't float, so the transistor is switched on or off.

                            Although the output pin (when in a high state) never actually goes as high as the supply, & (when in a low state) never goes as low as 0V, the low state voltage is still below 0.6V, so will not switch the transistor on.
                            ________________________________________________

                            Invisible airwaves crackle with life
                            Bright antennae bristle with the energy
                            ________________________________________________

                            Comment


                              #34
                              Re: 555 countdown timer design question

                              Originally posted by Radio Fox View Post
                              The output pin is either high or low, it doesn't float
                              NAILED IT - that's exactly the word I was thinking about: "floating" Cheers.
                              Wattevah...

                              Comment


                                #35
                                Re: 555 countdown timer design question

                                Another question (breaking this thing down bit by bit): what happens if you ground the trigger pin TWICE or ground it before a countdown cycle is up ? Nothing should happen, as far as I can tell, though my simulator doesn't seem to like it for some reason - could be a bug or it could really signal something....
                                Wattevah...

                                Comment


                                  #36
                                  Re: 555 countdown timer design question

                                  You could consider using CD4060 which has built-in oscillator (for R-C or crystals) and 14-stage flip-flop divider taps. Easy to go from seconds to hours with it, lots of circuits on the web.

                                  For long time delays, I find even a CMOS 555 is not so great. The timing capacitor for 1 minute, I think around 100uF and 560k.
                                  Leakage current on 100uF electro makes the timer "moody", it is never consistent because the leakage current is around 1/10 what the charging resistor is providing and ends up part of the timing - but never shown in datasheets and formulas.

                                  555 simulator

                                  I use Attiny85 with Arduino IDE for small time delay projects becuase it is more flexible, but very hard to program the MCU.

                                  Comment


                                    #37
                                    Re: 555 countdown timer design question

                                    is there an app for it ?

                                    Comment


                                      #38
                                      Re: 555 countdown timer design question

                                      Originally posted by Dannyx View Post
                                      Another question (breaking this thing down bit by bit): what happens if you ground the trigger pin TWICE or ground it before a countdown cycle is up ? Nothing should happen, as far as I can tell, though my simulator doesn't seem to like it for some reason - could be a bug or it could really signal something....
                                      That's right. If you ground the trigger pin again, before the timing cycle has finished, it will have no effect. e.g. if you press the button momentarily 30 seconds into your 1 minute timer, it will still end 1 minute after the first press of the button & not 90 seconds.

                                      However, if you press & hold the switch for longer than 60 seconds (or hold the switch down once the timer has started for a period that will take it over 60 seconds since the first press) then the output will remain high until the switch is released.
                                      Last edited by Radio Fox; 11-04-2017, 08:24 PM.
                                      ________________________________________________

                                      Invisible airwaves crackle with life
                                      Bright antennae bristle with the energy
                                      ________________________________________________

                                      Comment


                                        #39
                                        Re: 555 countdown timer design question

                                        Originally posted by redwire View Post
                                        You could consider using CD4060 which has built-in oscillator (for R-C or crystals) and 14-stage flip-flop divider taps. Easy to go from seconds to hours with it, lots of circuits on the web.

                                        For long time delays, I find even a CMOS 555 is not so great. The timing capacitor for 1 minute, I think around 100uF and 560k.
                                        Leakage current on 100uF electro makes the timer "moody", it is never consistent because the leakage current is around 1/10 what the charging resistor is providing and ends up part of the timing - but never shown in datasheets and formulas.

                                        555 simulator

                                        I use Attiny85 with Arduino IDE for small time delay projects becuase it is more flexible, but very hard to program the MCU.
                                        I suppose it depends on the application as to how accurate you want the timer to be. I assume in Dannyx's case where it's needed to keep a light on for around a minute, precision timing isn't required.

                                        A tantalum capacitor could be used for the timing capacitor. This would have a lot less leakage than an aluminium electrolytic capacitor.
                                        ________________________________________________

                                        Invisible airwaves crackle with life
                                        Bright antennae bristle with the energy
                                        ________________________________________________

                                        Comment


                                          #40
                                          Re: 555 countdown timer design question

                                          Originally posted by Radio Fox View Post
                                          However, if you press & hold the switch for longer than 60 seconds (or hold the switch down once the timer has started for a period that will take it over 60 seconds since the first press) then the output will remain high until the switch is released.
                                          But this won't have any negative, possibly destructive effect either, right ?

                                          Yes, you're right, precision is not critical up to the millisecond (though it would be nice to have, yet impossible with such imprecise components). A tantalum cap would require a much larger resistor, possibly in the order of mega ohms, since its value is by default lower....really, what WOULD be the maximum available tantalum cap ? On second though, you could perhaps parallel them.

                                          I'm now struggling to implement a feature to set AND reset the timer with the same button. You press the button once, the countdown starts, then if you want to cancel it before the time is up, you press the same button again and it resets it. The thing I'm actually using is in the picture (I removed the relays for hacking purposes). The relays have a common + and are switched on/off by that driver IC which is essentially a series of transistors that pull the other pin of the relays to GND. In our case, it'd pull the trigger pin to GND which is perfect (the action is momentary, so it doesn't latch the pin to GND), but I now need to figure out a way to switch that "pull to GND" from the TRIGGER to the RESET pin once the circuit is on. I've been looking at Dave's vid here which is close to what I want, except I don't have physical switch, but rather a transistor which can only pull to GND (can't switch a positive signal), so I'm trying to wrap my head around this

                                          Yes, I know a micro would make this a breeze, but I like it analog and overly-complicated...."I like it ANALog"...HMMMM
                                          Attached Files
                                          Wattevah...

                                          Comment

                                          Working...
                                          X