Announcement

Collapse
No announcement yet.

555 countdown timer design question

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

    555 countdown timer design question

    Good day folks. I need to build a countdown timer for a light fixture, that is, when you activate it, it turns the light on for 60 seconds and then turns it back off. Browsing the interwebs revealed the best solution might be to use a 555 timer in the configuration shown in the schematic. I kinda understand how it works and even simulated it and works perfectly, but I have a few questions regarding some aspects about it that I can't quite comprehend, since although the 555 timer is probably the most standard and ubiquitous component out there, I can't grasp its principle in this situation.

    C1 and R2 set the time before the thing shuts down, in this case it's set at 60s. I imagine you can make it adjustable by using a pot - will look into that later.

    Now: how exactly does C1 charge up ? The simulator shows it doesn't charge until I pull the TRIG pin to GND...C1 is connected straight to the rail via R2, so shouldn't it be charged all the time, albeit slowly ? Even after the fact, how does pulling TRIG to GND cause it to suddenly charge ? TRIG is connected internally to an op-amp inside the 555 so it doesn't charge THROUGH it, that's for sure.

    Next, that discharge pin: when the 555's output goes high, the discharge pin pulls anything it's connected to to GND and in the schematic we see the positive of the cap is connected directly to the discharge pin, so shouldn't that drain the cap instantly since the transistor inside the 555 pulls it to GND ? How does it drain so slowly to count down the 60s ?

    That's about it, other than that, I understand how it works and I'll start building it, but I also want to understand how it works instead of just rolling with it
    Attached Files
    Wattevah...

    #2
    Re: 555 countdown timer design question

    Originally posted by Dannyx View Post
    1)...C1 and R2 set the time before the thing shuts down, in this case it's set at 60s. I imagine you can make it adjustable by using a pot - will look into that later...

    2)...Now: how exactly does C1 charge up ? The simulator shows it doesn't charge until I pull the TRIG pin to GND...C1 is connected straight to the rail via R2, so shouldn't it be charged all the time, albeit slowly ? Even after the fact, how does pulling TRIG to GND cause it to suddenly charge ? TRIG is connected internally to an op-amp inside the 555 so it doesn't charge THROUGH it, that's for sure...

    3)...Next, that discharge pin: when the 555's output goes high, the discharge pin pulls anything it's connected to to GND...
    1) If you intend connecting a pot to the timing circuit, it's best to use a fixed resistor in series with the pot. This will prevent pins 6 & 7 from being accidentally connected straight to the supply voltage. (e.g. a 100k fixed resistor in series with a 500k pre-set pot would give an approx range of 11s to 66s)

    2) Athough R2 & C1 are connected in series across the supply, the junction of R2/C1 also connects to the Discharge pin (7). Under stable condition (i.e. not triggered), this pin is held low, preventing the capacitor from charging.

    3) You've got that the wrong way round. When the output goes high, the internal transistor connected to the discharge pin is switched off, allowing C1 to charge up until it reaches approx 8V (with a 12V supply), at which point the output goes low & the discharge transistor is swithed on again, discharging C1.

    It's easier to see how a monostable works by looking at the internal block diagram of the 555 whilst designing your circuit around it as this site shows (note...the text incorrectly refers to the internal transistor as Q2 instead of Q1):-

    https://circuitdigest.com/electronic...ircuit-diagram
    ________________________________________________

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

    Comment


      #3
      Re: 555 countdown timer design question

      I did have a look at the internal diagram of a 555 - see it here. I modified it slightly, adding signs to the inputs of the op-amps to make it idiot-proof and also removed the CTRL and RST pins since I'm not interested in those just yet, although I believe that reset pin would be useful for cancelling a countdown that's already in progress (aka turning off the lamp BEFORE 60 seconds or whatever are up), which is something I'll require as well.

      The symbol in cyan is for an NPN transistor, so shouldn't that turn ON when the output of the SR flip-flop (and therefore its BASE) goes high ? THAT'S actually what caused this whole confusion, because otherwise I had it all figured out from the start. It makes a whole lot of sense when you understand that it turns OFF - I actually thought of that myself, but now it's clear
      Attached Files
      Wattevah...

      Comment


        #4
        Re: 555 countdown timer design question

        The internal RSFF is active low (bubble on output), that's why the discharge transistor turns on once threshold reaches 2/3 VCC. Upon threshold, it forces the RSFF to reset, but the active low will invert the signal for the cyan transistor to start discharging the timing capacitor.

        I like op amps that have + and - without bubbles. It's more confusing this way - either don't mark the + and - and leave one input bubbled, or omit bubble and keep + and -...
        having both implies both inputs are noninverting.

        Comment


          #5
          Re: 555 countdown timer design question

          NEVER would've noticed those little circles on some of the pins, let alone think they actually denote something.....the more you learn So basically the output of the blue section to the pink and cyan is ON (high) when points R and S are low ? I also noticed the Reset pin also has a little circle next to R1...would that mean that pulling reset LOW resets the timer, given a circle means active low, aka grounded=on, VCC=off ? That would be in layman terms, how my brain processes electronic lingo
          Last edited by Dannyx; 10-28-2017, 10:02 AM.
          Wattevah...

          Comment


            #6
            Re: 555 countdown timer design question

            use a microcontroller

            Comment


              #7
              Re: 555 countdown timer design question

              Originally posted by stj View Post
              use a microcontroller
              WAY overkill for what this thing needs to do
              Wattevah...

              Comment


                #8
                Re: 555 countdown timer design question

                Sadly, it's what people want you to do for the most part, no need to think about analog, just write a program that even lets you press three times or something to immediately shut off the light if in an emergency situation.

                just that if you're in a situation where you don't have a microcontroller handy...

                Comment


                  #9
                  Re: 555 countdown timer design question

                  To me personally, and this is simply my opinion, it's pretty lame to see everything migrating towards micros. Just a simple little boring chip handling everything...Thought discrete components are obsolete ? How about relays then ? I've always had a fascination with relays for some reason....Heck, half of the elevators in my country still use relay logic. That's not to say we should live in the stone age forever just because something goes "click-click" and occasionally makes an arc that makes you go "UUUH...AAAH" What can I say, progress I guess......
                  Wattevah...

                  Comment


                    #10
                    Re: 555 countdown timer design question

                    Use a TRIAC and driver and you can even PWM the TRIAC with a microcontroller to slowly turn the bulb on and off (if it's incandescent; all bets are off with CFLs, etc.)

                    Pretty disgusting what you can do with a microcontroller beyond just turning it on and off in a delay with just a software change.

                    Comment


                      #11
                      Re: 555 countdown timer design question

                      Originally posted by eccerr0r View Post
                      Use a TRIAC and driver and you can even PWM the TRIAC with a microcontroller to slowly turn the bulb on and off (if it's incandescent; all bets are off with CFLs, etc.)

                      Pretty disgusting what you can do with a microcontroller beyond just turning it on and off in a delay with just a software change.
                      It's an LED floodlight so it's got a driver in it - not dimmable sadly, thought the idea is pretty cool nonetheless.

                      Might look into home automation one day. The problem is that unless you're planning on installing a "smart home" system from scratch when you buy/build a house/apartment, it's VERY difficult to reconfigure the existing electrical installation to work with micros and stuff, esp. here in east Europe where apartment building are mostly made of concrete and smashing through is like tough sh!t
                      Wattevah...

                      Comment


                        #12
                        Re: 555 countdown timer design question

                        Originally posted by Dannyx View Post
                        NEVER would've noticed those little circles on some of the pins, let alone think they actually denote something...
                        Ahh right. So your initial confusion was caused by the fact that you thought when the base of the transistor was high (causing the capacitor to discharge), then the output was also high, not realising that the output driver circuit was actually inverting.

                        Unfortunately there are some images on the internet that don't even show that the output driver is inverting, which can be confusing.

                        As you say, if you want to reset the timer before it's finished it's timing period, simply switch the RST pin from Vcc to GND.
                        ________________________________________________

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

                        Comment


                          #13
                          Re: 555 countdown timer design question

                          I have another question: HOW exactly is the timing period calculated ? WHY does R2 affect the countdown time ? THIS article says the formula is 1.1*R2*C1 (it's R2 in my case - the original is R1), which I know is based around the RC time constant "TAU equals R*C", but what's 1.1 exactly ? Is it like a constant ? I'm working on making the thing adjustable, so that's what I'm asking Cheers.
                          Wattevah...

                          Comment


                            #14
                            Re: 555 countdown timer design question

                            R2 affects the countdown time because it's the resistor used to charge C1. The higher the value of R2, the longer it will take C1 to charge to 2/3 of the supply voltage.

                            The 1.1 factor can be calculated from the expression for the voltage on the capacitor at a certain instant in time. The maths is shown here:-

                            http://www.play-hookey.com/digital/555/timer_555.html

                            It's not going to be exact anyway if you use an electrolytic as the timing component, as electrolytics have a wide tolerance & leakage to consider. If you want the time to be exact, you would need to trim R2 or use a trimmer pot in series with R2 as mentioned earlier.
                            ________________________________________________

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

                            Comment


                              #15
                              Re: 555 countdown timer design question

                              And another reason why microcontrollers are preferred, if you're using a crystal oscillator, it can be accurate down to parts per million, and even using the onboard oscillators in some even newer microcontrollers they have errors of only 1% or so. Using 5% resistors and +80-20% electrolytics, know knows what your real time constant will be

                              Comment


                                #16
                                Re: 555 countdown timer design question

                                Originally posted by Radio Fox View Post
                                R2 affects the countdown time because it's the resistor used to charge C1. The higher the value of R2, the longer it will take C1 to charge to 2/3 of the supply voltage.

                                The 1.1 factor can be calculated from the expression for the voltage on the capacitor at a certain instant in time. The maths is shown here:-

                                http://www.play-hookey.com/digital/555/timer_555.html

                                It's not going to be exact anyway if you use an electrolytic as the timing component, as electrolytics have a wide tolerance & leakage to consider. If you want the time to be exact, you would need to trim R2 or use a trimmer pot in series with R2 as mentioned earlier.
                                ....and perhaps use something better than an electrolytic ? Something that's not an electrolytic but is not a micro either Poly film caps maybe ? No expert.
                                Wattevah...

                                Comment


                                  #17
                                  Re: 555 countdown timer design question

                                  Chances are you will need to use electrolytics for RC in the 1 minute range because if using a poly cap of even 1uF, your resistances will end up being 51M+ ohms, of which IC pin leakage may become an issue.

                                  For 1 minute RC constants I'd probably need to look into 100uF timing capacitors to pull the charge resistor down to something more reasonable. However I'd be a bit worried about going too big and the energy stored in the capacitor destroys the discharge pin...

                                  Comment


                                    #18
                                    Re: 555 countdown timer design question

                                    have you thought of one of these ?

                                    Comment


                                      #19
                                      Re: 555 countdown timer design question

                                      vac-switch.
                                      not seen one of those for a while!

                                      Comment


                                        #20
                                        Re: 555 countdown timer design question

                                        Originally posted by petehall347 View Post
                                        have you thought of one of these ?
                                        Not remote controlled I reckon...
                                        Wattevah...

                                        Comment

                                        Working...
                                        X