555 countdown timer design question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dannyx
    CertifiedAxhole
    • Aug 2016
    • 3912
    • Romania

    #1

    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...
  • Radio Fox
    Badcaps Veteran
    • Jan 2010
    • 281
    • UK

    #2
    Re: 555 countdown timer design question

    Originally posted by Dannyx
    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

    • Dannyx
      CertifiedAxhole
      • Aug 2016
      • 3912
      • Romania

      #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

      • eccerr0r
        Solder Sloth
        • Nov 2012
        • 8680
        • USA

        #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

        • Dannyx
          CertifiedAxhole
          • Aug 2016
          • 3912
          • Romania

          #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

          • stj
            Great Sage 齊天大聖
            • Dec 2009
            • 30951
            • Albion

            #6
            Re: 555 countdown timer design question

            use a microcontroller

            Comment

            • Dannyx
              CertifiedAxhole
              • Aug 2016
              • 3912
              • Romania

              #7
              Re: 555 countdown timer design question

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

              Comment

              • eccerr0r
                Solder Sloth
                • Nov 2012
                • 8680
                • USA

                #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

                • Dannyx
                  CertifiedAxhole
                  • Aug 2016
                  • 3912
                  • Romania

                  #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

                  • eccerr0r
                    Solder Sloth
                    • Nov 2012
                    • 8680
                    • USA

                    #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

                    • Dannyx
                      CertifiedAxhole
                      • Aug 2016
                      • 3912
                      • Romania

                      #11
                      Re: 555 countdown timer design question

                      Originally posted by eccerr0r
                      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

                      • Radio Fox
                        Badcaps Veteran
                        • Jan 2010
                        • 281
                        • UK

                        #12
                        Re: 555 countdown timer design question

                        Originally posted by Dannyx
                        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

                        • Dannyx
                          CertifiedAxhole
                          • Aug 2016
                          • 3912
                          • Romania

                          #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

                          • Radio Fox
                            Badcaps Veteran
                            • Jan 2010
                            • 281
                            • UK

                            #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

                            • eccerr0r
                              Solder Sloth
                              • Nov 2012
                              • 8680
                              • USA

                              #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

                              • Dannyx
                                CertifiedAxhole
                                • Aug 2016
                                • 3912
                                • Romania

                                #16
                                Re: 555 countdown timer design question

                                Originally posted by Radio Fox
                                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

                                • eccerr0r
                                  Solder Sloth
                                  • Nov 2012
                                  • 8680
                                  • USA

                                  #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

                                  • petehall347
                                    Badcaps Legend
                                    • Jan 2015
                                    • 4425
                                    • United Kingdom

                                    #18
                                    Re: 555 countdown timer design question

                                    have you thought of one of these ?

                                    Comment

                                    • stj
                                      Great Sage 齊天大聖
                                      • Dec 2009
                                      • 30951
                                      • Albion

                                      #19
                                      Re: 555 countdown timer design question

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

                                      Comment

                                      • Dannyx
                                        CertifiedAxhole
                                        • Aug 2016
                                        • 3912
                                        • Romania

                                        #20
                                        Re: 555 countdown timer design question

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

                                        Comment

                                        Related Topics

                                        Collapse

                                        • DeanWy
                                          WD Sentinel DS5100 (NAS) boot issues
                                          by DeanWy
                                          Hi all,

                                          I have a Western Digital Sentinel DS5100 NAS system which has stopped working. It has dual BIOS. I bought the system second hand with an already broken primary BIOS (it rebooted multiple times until second BIOS was used).

                                          It worked until recently. The system was idle in Windows Server 2012 and a BSOD occurred, I think it was 'critical process died'. Thereafter it didn't boot, it just sat there with no video output and fan speed at 100% (there's a proprietary Windows driver by WD which controls the fan, outside of that it always runs at 100%).

                                          There...
                                          07-30-2024, 04:13 AM
                                        • beogeek
                                          820-2915-A Wont power on with battery connected
                                          by beogeek
                                          Ok so this doing my head in and hopefully someone more knowledgeable will be able to assist.

                                          I've got a MacBook Pro 820-2915-A it will power on without the battery connected, but when the battery is connected it will do a 2,3-second fan spin when pressing the power button and then nothing.

                                          After measuring and probing around I found that R7051 was bad, reading high instead of 2.2Ω so I replaced it. Still the same issue, I have the green light on the charger but it won't power on or charge the battery.

                                          So to cut the long story short I've replaced U7000,...
                                          02-26-2022, 01:29 AM
                                        • survivalbloke
                                          Acer Predator Helios 300 - will not power up if battery is CONNECTED
                                          by survivalbloke
                                          This was a no power initially. Thanks to your help, I discovered it was the first mosfet, so I replaced. Now, the device will power up only if the battery is NOT connected. As soon as I connect the battery, it shuts off. If I connected the battery while the device is off, it simply will not respond to the power button. I replaced the battery, and while I suppose the new battery could be faulty, I'm assuming it is not. I'm having the same behavior with the new battery. I measure .2v at the charging coil. Manually applying power to the + and - at the battery header, there is no charging happening....
                                          06-25-2025, 12:20 PM
                                        • muhuruu
                                          PS5 too many USB devices connected
                                          by muhuruu
                                          Hello. I have a problem with a PS5 console that I bought to learn electronics repair. The auction description indicated that the console had been dropped. The HDMI port and USB ports were damaged. The HDMI port was replaced by the previous owner, and after his repair, the console worked for 2 days and then became dead. After receiving the console, I replaced all the USB ports. After replacing them, the console started to turn on. On the logo screen, it displays "too many USB devices connected". My further attempts to fix the error involved replacing the Southbridge, 4 TPS2001D chips,...
                                          05-19-2025, 07:14 AM
                                        • versionlab
                                          Weird problem, laptop stays on when connected to another pc
                                          by versionlab
                                          Hi, I want to ask for advice about an interesting issue I've been having with a sony vaio laptop.

                                          Client came and said that "a desklamp touched the back of the lid while laptop was operating normally and it caused the office's circuit breaker to trip. Laptop had never turned on since".

                                          After taking the laptop apart (checked dc adapter everythin ok), I found a faulty MOSFET on the motherboard which I replaced. Laptop managed to turn on. However, while booting it shut down. Nothing else seemed faulty and thermals were ok. Shutting down was coming at random...
                                          10-26-2022, 03:43 AM
                                        • Loading...
                                        • No more items.
                                        Working...