Announcement

Collapse
No announcement yet.

555 countdown timer design question

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

    #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


      #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


        #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


          #64
          Re: 555 countdown timer design question

          Originally posted by budm View Post
          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


            #65
            Re: 555 countdown timer design question

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


              #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


                #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


                  #68
                  Re: 555 countdown timer design question

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

                  Comment


                    #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


                      #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


                        #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


                          #72
                          Re: 555 countdown timer design question

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


                            #73
                            Re: 555 countdown timer design question

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


                              #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


                                #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


                                  #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


                                    #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


                                      #78
                                      Re: 555 countdown timer design question

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


                                        #79
                                        Re: 555 countdown timer design question

                                        Originally posted by stj View Post
                                        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


                                          #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

                                          Working...
                                          X