Announcement

Collapse
No announcement yet.

555 countdown timer design question

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

  • eccerr0r
    replied
    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...

    Leave a comment:


  • Dannyx
    replied
    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

    Leave a comment:


  • Dannyx
    replied
    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

    Leave a comment:


  • Dannyx
    replied
    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

    Leave a comment:


  • eccerr0r
    replied
    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.

    Leave a comment:


  • Dannyx
    replied
    Re: 555 countdown timer design question

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

    Leave a comment:


  • stj
    replied
    Re: 555 countdown timer design question

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

    Leave a comment:


  • petehall347
    replied
    Re: 555 countdown timer design question

    have you thought of one of these ?

    Leave a comment:


  • eccerr0r
    replied
    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...

    Leave a comment:


  • Dannyx
    replied
    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.

    Leave a comment:


  • eccerr0r
    replied
    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

    Leave a comment:


  • Radio Fox
    replied
    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.

    Leave a comment:


  • Dannyx
    replied
    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.

    Leave a comment:


  • Radio Fox
    replied
    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.

    Leave a comment:


  • Dannyx
    replied
    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

    Leave a comment:


  • eccerr0r
    replied
    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.

    Leave a comment:


  • Dannyx
    replied
    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......

    Leave a comment:


  • eccerr0r
    replied
    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...

    Leave a comment:


  • Dannyx
    replied
    Re: 555 countdown timer design question

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

    Leave a comment:


  • stj
    replied
    Re: 555 countdown timer design question

    use a microcontroller

    Leave a comment:

Working...
X