555 countdown timer design question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • budm
    Badcaps Legend
    • Feb 2010
    • 40746
    • USA

    #61
    Re: 555 countdown timer design question

    So now you have THREE switches (Latch or Momentary?), I thought you want just ONE switch to do more than one function, looks like the requirement is changed.
    Last edited by budm; 11-11-2017, 05:10 PM.
    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

    • eccerr0r
      Solder Sloth
      • Nov 2012
      • 8689
      • USA

      #62
      Re: 555 countdown timer design question

      Wow that simulator is fscked. I got the timing capacitor to get a negative voltage across it somehow, not exactly how that's possible...

      Yes this can be done with one button easily with a microcontroller:
      Press on for 60 sec, press off any time, long press on = light stays on. Software is starting to be a bit complicated.

      Now to do this with a discrete circuit...

      Doh, nah forget it, my first pass does not work. Writing the software is easier
      Last edited by eccerr0r; 11-11-2017, 09:34 PM.

      Comment

      • eccerr0r
        Solder Sloth
        • Nov 2012
        • 8689
        • USA

        #63
        Re: 555 countdown timer design question

        Hmm... will this work...
        Turned out to be a bit more tricky than I thought it would be, trying to minimize ICs...
        Attached Files

        Comment

        • Dannyx
          CertifiedAxhole
          • Aug 2016
          • 3912
          • Romania

          #64
          Re: 555 countdown timer design question

          Originally posted by budm
          So now you have THREE switches (Latch or Momentary?), I thought you want just ONE switch to do more than one function, looks like the requirement is changed.
          Well the remote actually has 4 switches, A B C and D. I changed my mind slightly and THIS is how the end product will work, so A does the countdown thing, B does the latch and C and D are essentially in parallel to stop it.
          Wattevah...

          Comment

          • Dannyx
            CertifiedAxhole
            • Aug 2016
            • 3912
            • Romania

            #65
            Re: 555 countdown timer design question

            Originally posted by eccerr0r
            Wow that simulator is fscked. I got the timing capacitor to get a negative voltage across it somehow, not exactly how that's possible...

            Yes this can be done with one button easily with a microcontroller:
            Press on for 60 sec, press off any time, long press on = light stays on. Software is starting to be a bit complicated.

            Now to do this with a discrete circuit...

            Doh, nah forget it, my first pass does not work. Writing the software is easier
            YES, I know, I kept getting "capacitor exceeded max reverse voltage" error myself if I tried firing the 555 too quickly one cycle after another, so it made me wonder whether something is indeed wrong with the circuit or the simulator is messed up...not really possible to get a reverse voltage on it, so I believe it's the latter.
            Of course, a micro would make this a breeze ON PAPER at least, because I'm not really all that savvy with writing code beyond maybe turning a light on and off with the same button, that's why I somewhat prefer overly complicated discrete designs like that Crazy ? You bet. Doable ? Not really sure....might actually go for it considering I have transistors in my junk box, so the cost is essentially zero at this point My main concern is that the simulator will not perfectly reflect the actual working of the circuit and doesn't account for all the losses and stuff which could throw the whole "ballet" I put together there out of sync....might turn into a mess of a breadboard.
            Wattevah...

            Comment

            • eccerr0r
              Solder Sloth
              • Nov 2012
              • 8689
              • USA

              #66
              Re: 555 countdown timer design question

              Well, now you can see the horrid mess of a circuit I have for the 1-button analog solution.

              For me I'm a digital guy, so software isn't too bad for me; maybe I should go and try write code to do this too...

              Comment

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

                #67
                Re: 555 countdown timer design question

                spoilt for choice on something so simple,
                pic assembly, or use c / arduino for AVR / ARM.

                i think for beginners they should use one of these:
                https://www.ebay.co.uk/itm/291693366485
                3.3v i/o, but FAST - and the usb is real.

                or these:
                https://www.ebay.co.uk/itm/191773759569
                if you REALLY need 5v i/o, but the usb is just for programming.

                combined with arduino dev software.
                https://www.arduino.cc/
                (for the ARM board you need to install a plugin)
                https://www.youtube.com/watch?v=K-jYSysmw9w

                these little boards are so easy to drop onto a breadboard, i wish they had been around when i started!
                i had to make my own on stripboard - AND build a serial programmer.
                Last edited by stj; 11-12-2017, 12:05 PM.

                Comment

                • eccerr0r
                  Solder Sloth
                  • Nov 2012
                  • 8689
                  • USA

                  #68
                  Re: 555 countdown timer design question

                  let's see some code (for any microcontroller, ideally a cheap one!)

                  Comment

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

                    #69
                    Re: 555 countdown timer design question

                    well wait a day, i have another system at the back of the room with loads of pic code on it i did for a company once.
                    it lets you put a pic in circuit with a car led interior light so it fades in and out instead of just switching on and off.
                    it's nicely documented and very clear to read.
                    (was requested that way)

                    device was a 12f629 btw - worth about 50c

                    Comment

                    • eccerr0r
                      Solder Sloth
                      • Nov 2012
                      • 8689
                      • USA

                      #70
                      Re: 555 countdown timer design question

                      Well, it shouldn't be that complicated, just that it's an exercise that needs to be done... I'd imagine the code debugging is something else, though I think there are simulators around.

                      Hmm.. US 80¢ for 12f629 at mouser at 100s quantity, price went up?
                      Last edited by eccerr0r; 11-12-2017, 02:18 PM.

                      Comment

                      • Dannyx
                        CertifiedAxhole
                        • Aug 2016
                        • 3912
                        • Romania

                        #71
                        Re: 555 countdown timer design question

                        I do have an arduino mega lying around, but there's no way I'm "sacrificing" it for the purpose of such a simple project, HOWEVER, you guys make me want to get into micros more and more, so please bare with me as I'm a total noob by your standards

                        First things first: choosing a controller. I'm fairly sure my remote outputs 5v signals to the relay driver, so the chip must be able to handle that - I'd make life much easier than having to use zeners and junk... I can even bypass the relay driver entirely and tap straight into the output pins of the remote riser board. Hell, I could even pull out that board and plug its jumpers straight into the controller or breadboard or whatever. I believe I found one here. It's our biggest auction website, similar to Ebay or Bangood, so don't worry if you don't understand anything, I'm sure you can work out the essentials. This saves me the trouble of waiting a month or more for a cheapy chip to arrive from China, not to mention the shipping costs which would outweigh the friggin' chip It's an ATmega32U4.

                        Then the code: I've got some very limited knowledge of Arduino code and I did play around with some sketches to like flash an LED or run a motor backwards and forwards, so I guess the best course of action to ensure I also learn something and not just plop some pre-made code and have no idea how it works, is to start WAY low and just make remote switch the bloody thing on/off, then maybe add the timer, then the latch, the cancel and so on.....cheers guys.
                        Wattevah...

                        Comment

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

                          #72
                          Re: 555 countdown timer design question

                          Originally posted by eccerr0r
                          Well, it shouldn't be that complicated, just that it's an exercise that needs to be done... I'd imagine the code debugging is something else, though I think there are simulators around.

                          Hmm.. US 80¢ for 12f629 at mouser at 100s quantity, price went up?
                          i was thinking in euro-c, but the price varies a lot between suppliers.
                          or probably get 5 for a $ from china!
                          (if you can wait 3 weeks)

                          Comment

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

                            #73
                            Re: 555 countdown timer design question

                            Originally posted by Dannyx
                            First things first: choosing a controller.
                            i recommend one of the ARM boards,
                            they can take 5v inputs, but can only output 3.3v
                            that's still more than enough to drive a fet/transistor or optocoupler.


                            the arm chips give you loads of nice stuff like multiple serial ports, canbus etc,
                            and the usb can be used to emulate a keyboard or mouse for example.

                            i would have avoided the atmega32u2/4 - they are very costly even from china.
                            i have a couple on arduino leonardo boards/
                            (it was cheaper than buying the chips!!!)

                            so,
                            once you choose the chip series.
                            the next question is the board - small, or big.

                            i cant tell you the answer because it depends on what your upto,
                            i'll just say that the best boards are the one i listed at the lower end,
                            and the Nucleo64 with F446RE cpu for mid end.
                            and the Nucleo144 with the new H743ZI for the very top end complete with ethernet and usb-otg.
                            the Nucleo boards having arduino-shield sockets and built-in programmers btw.

                            before it gets asked, i have about 7 assorted dev-boards and probably 100 spare microcontrollers - so it's coming from experience.
                            Attached Files
                            Last edited by stj; 11-12-2017, 03:59 PM.

                            Comment

                            • Dannyx
                              CertifiedAxhole
                              • Aug 2016
                              • 3912
                              • Romania

                              #74
                              Re: 555 countdown timer design question

                              I typically go with what I can source locally, even if it comes at a slightly higher cost, though I'm sure I could source the other chips you suggested as well. Now with regards to how "fancy and smart" the board has to be, let's not forget its only job is going to be switching a light on and off with a couple of push-buttons (since that's what the remote emulates at the end of the day), so no need to go too crazy with ethernet and stuff just yet. Do they all take the same code, or are some intended for pros (which take more complicated programming) and other intended for average-joes just getting started ?
                              Wattevah...

                              Comment

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

                                #75
                                Re: 555 countdown timer design question

                                get one of those small boards then.

                                if you try to use a pic you then need to build a programmer.
                                those boards can be programmed over serial(arm) or usb(avr)

                                as far as code compatability, if your using arduino software then they are "close enough"
                                pic is a completely different story.

                                tbh this is a job the little 8pin pic is perfect for - but you would have to splash out another 8-10euro on a chinese pickit3 clone programmer with the universal chipsocket adapter you cant even get with the original pickit's!!
                                Last edited by stj; 11-12-2017, 04:05 PM.

                                Comment

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

                                  #76
                                  Re: 555 countdown timer design question

                                  https://www.ebay.co.uk/itm/351488697372

                                  btw, dont get talked into buying a pickit2 - there is no support for them in the newer software.

                                  Comment

                                  • eccerr0r
                                    Solder Sloth
                                    • Nov 2012
                                    • 8689
                                    • USA

                                    #77
                                    Re: 555 countdown timer design question

                                    Does that remote switch have a on-off toggle, you might well use that mode of operation.

                                    Note that all of the microcontrollers have their own dialect and may not be directly translatable from one to another. I was staring at an AVR-based DDS and thought that it would be near impossible to translate to another microcontroller and maintain the same speed because it was using a specific feature of the AVR...

                                    But for the light switch, things are so slow that it's not an issue at all.

                                    ---

                                    I think I hacked up a functional pseudocode for a microcontroller, probably targeted to AVR because I've used more AVRs than PIC (despite PIC was the first "modern" microcontroller I've ever used.) Will first translate to real gcc-avr code before posting unless someone posts another targeted solution first

                                    ---

                                    Thought question of the day:

                                    How many transistors does it take to change (the state of) a light bulb?
                                    Last edited by eccerr0r; 11-12-2017, 06:11 PM.

                                    Comment

                                    • Dannyx
                                      CertifiedAxhole
                                      • Aug 2016
                                      • 3912
                                      • Romania

                                      #78
                                      Re: 555 countdown timer design question

                                      Originally posted by eccerr0r
                                      Does that remote switch have a on-off toggle, you might well use that mode of operation.
                                      It does have the option to set it to work either as a momentary push switch or as a latching switch, trouble is it affects ALL 4 channels at once, so you can't have 1 momentary channel and have the others latching, or a combination of the 2 modes. Of course, the remote module is designed to work straight out of the box for this particular application: switch stuff on/off, but the latching action is not ideal because it's very easy to turn the light on, lock the door whatever, then leave the house and forget it on, so that's why I started this hack in the first place - a countdown is required, so while we're at it, might as well play around and add other features like a brilliant one someone suggested: short press ANY of the 4 buttons to initiate a 60-s on period, press AND hold to latch on, short press again to turn it off. I rather like that ! Has to be easy for tech bums to use as well, instead of being like "you press this to turn it on, then if you want to leave it on, you press this, then you press this to turn it off"....

                                      A friend of mine who's way more into micros than I am, also suggested an ATTINY....I know what it is generally speaking, but I'm not sure how you program it and whether it's "enough" for the job.
                                      Wattevah...

                                      Comment

                                      • Dannyx
                                        CertifiedAxhole
                                        • Aug 2016
                                        • 3912
                                        • Romania

                                        #79
                                        Re: 555 countdown timer design question

                                        Originally posted by stj
                                        i would have avoided the atmega32u2/4 - they are very costly even from china.
                                        Actually it's not expensive at all: the one I linked to is very cheap here.
                                        My other thought is that's still a bit too overkill for our application.
                                        Wattevah...

                                        Comment

                                        • eccerr0r
                                          Solder Sloth
                                          • Nov 2012
                                          • 8689
                                          • USA

                                          #80
                                          Re: 555 countdown timer design question

                                          Darn, if it were configurable for per-channel latching or momentary, that would simplify things.

                                          Well, that solution in post 63 is still open, despite it not tested; or is that starting to become too complicated? Note that it's using the same IC, just fully utilizing the whole 4013 now

                                          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...