Announcement

Collapse
No announcement yet.

Long trigger, Short Output... Short Trigger, NO Output

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

  • Long trigger, Short Output... Short Trigger, NO Output

    I need to figure out a way to enable a long trigger (which i need to be around the 2 second mark) to ouput a short pulse, say 0.5 - 1 second... However if the trigger is under the 2 seconds, i need it to ignore it and have no output pulse.

    The trigger will constantly be getting short pulses, which are under 2 seconds, but if they are over 2 seconds, i need it to give a short output pulse..

    Heres a High / Low time diagram i drew up.

    Current Setup - (as per PC specs on the left)
    Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

  • #2
    I also dont care if the output pulse happens after the input goes low again, just as long as it has been over 2 seconds...

    Current Setup - (as per PC specs on the left)
    Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

    Comment


    • #3
      ive been trying many variations of the 555 timer, as it can be set to a small (0.5 second output pulse),
      however since the trigger is longer than the output, its not quite working....
      and i wont be able to filter out the short pulses (under 2 seconds)

      heres an example diagram of what ive been trying:
      where R1 = 5k Ohm, and C1 = 100uF.. this results in just over half a second output
      Current Setup - (as per PC specs on the left)
      Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

      Comment


      • #4
        Looks like you picked a good option going with the 555.
        Hmmm, this was the top one on google search for 555 timer.
        http://www.uoguelph.ca/~antoon/gadgets/555/555.html
        Look at Fig 4-1. The 'Missing Pulse Detector' is inverse from what you want, but a good start.

        Another thing to think about would be 2 timers. The first would be the time threshold filter thing which would then trigger the 2nd to instantly output a timed pulse. See this is where a tiny 8-pin PIC would make things so simple.

        Comment


        • #5
          elaborate on this 8 pin PIC?...
          is it easy enough for me to understand..

          im under the impression this requires programming knowledge.. but is far more accurate than a 555..

          is it as easy as feeding it an input.. and program it to give an ouput under certain conditions?
          could you give me a item number (so i could research, and possibly buy/build a programmer), as i have found hundreds of 8 pin PICs..

          this is a local supplier, and have found plenty, especially under Micochip microcontrollers:
          http://www.futurlec.com.au/ICMicrocontrollers.jsp
          which one would be a good place to start?
          Current Setup - (as per PC specs on the left)
          Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

          Comment


          • #6
            I use the pic16f84. There are tons of build it yourself programmers for it. And you can download the hi-tech C programming software for free. Unless of course you know how to program in ASM.

            for C programing it would almost be as simple as saying:
            Code:
            void main()
            {
            while(1==1)
              {
              count = 0
              while(PORTA[0]==1)
                {
                count = count +1
                }
              if count > (whatever your crystal is plus how long it takes to run these instructions will give you your time ) then
                {
                for(i=1;i<(your half second time count whatever it is);i++) PORTB[0] = 1
                PORTB[0] = 0       
                }
              }
            }
            There is probably a better way to get the time count. I know the Hi-Tech C language has a pulse function that may be better to use. You would need to search for examples. Hope this helps. The PIC16F84 only needs 5 volts a crystal two 22pf or 30pf caps and a 1k to 10k resistor pulled up to 5 volts. Do a search on PIC16F84 and im sure you will find tons of schematics for it.

            edit: i even took the time to space the program out and vbulletin took them out. damn that makes it hard to read. a ha, i wrapped code around it that should look better.
            Um, I guess this is where you put something witty.WITTY

            My Web site, in the design stage. http://home.comcast.net/~cstrachn

            Modified RRSkinEditor http://www.mp3car.com/vbulletin/showthread.php?t=65723

            Comment


            • #7
              Damn pRoFiT, you're fast! And that count is probably fast too. It may need to be in a timer interrupt.

              fire, I wouldn't advise getting started in PICs unless you plan on doing more with them in the future because the programmer may not be very cost effective for just one project. If you enjoy electronics and programming though, it's well worth it. I'm crazy about these things now. I do have an MPLAB compatible programmer though, so it's much less of a hassle for me.

              You do need some programming skills. You can do assembler and C with the free MPLAB IDE or that hi-tech one, and I think basic with some expensive software. MPLAB won't do C for anything but the PIC18 though I think. All the PIC12s are 8 pin DIP. I've used the 12F683 a bunch because it runs at 8 MHz with no external parts except for a capacitor on the power, has an EEPROM, weak pull-ups, 3 timers and 6 I/O pins for under a buck... And that's usually overkill.

              But as you can see, it's cake to program. Asm may be a little more time consuming.

              Comment


              • #8
                Put a crystal on a ttl decade counter. Then the pulse will be your input for both A and B. Then hook the reset of the counter to NOT input. Then AND all the outputs you want so that when the counter gets to x amount it then is high, and will send a pulse. that will get over filtering the input pulses.
                Fusion Brain Version 6 Released!
                1.9in x 2.9in -- 47mm x 73mm
                30 Digital Outputs -- Directly drive a relay
                15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                Buy now in the MP3Car.com Store

                Comment


                • #9
                  So for $3 ish:

                  Fusion Brain Version 6 Released!
                  1.9in x 2.9in -- 47mm x 73mm
                  30 Digital Outputs -- Directly drive a relay
                  15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                  Buy now in the MP3Car.com Store

                  Comment


                  • #10
                    holy [email protected].
                    thanks for the repsonses...

                    every circuit ive made in the past, people have told me to get into PICs.. and now this is one of many circuits im wanting to build, so ill definantly be getting into it...
                    as for the programming, seems very easy, and i think i can do it.

                    i need to do lots more research, as i understand whats going on.. but just unfamiliar with the PIC chip and also the crystal..
                    as for the programmer.. should i make one, or buy one?.. there is so many different schematics..
                    Current Setup - (as per PC specs on the left)
                    Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

                    Comment


                    • #11
                      well for such an easy circuit, I dont think a PIC is needed unless you are going for the long haul. If you will be doing more PIC stuff in the future, then good stepping stone. But if this is a once in a blue moon sort of thing, then the cost of the PIC and programmer, and coding time, far outweighs the cost of a few parts from the 1980's.
                      Fusion Brain Version 6 Released!
                      1.9in x 2.9in -- 47mm x 73mm
                      30 Digital Outputs -- Directly drive a relay
                      15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                      Buy now in the MP3Car.com Store

                      Comment


                      • #12
                        ahh well. i might try the decade counter idea first, and if that fails, ill try get into PICs..

                        So as for the parts..

                        1 x AND gate... like the 7408 Quad 2-input AND Gate
                        1 x NOT Gate... like the 7404 - Hex Inverter
                        1 x 555 timer
                        1 x 5hz crystal.. (i can only find 5MHz for now, but will keep looking)
                        1 x Decade Counter.... is this like the 7490?? chip.. or the 74160?
                        5v Regulator... various capapcitors / resistors...

                        i dont think i understand why the 555 timer is needed... and when you say reset pulse.. im assuming thats just the output of the 555 timer (pin 3).. whats triggers the 555?
                        Current Setup - (as per PC specs on the left)
                        Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

                        Comment


                        • #13
                          Originally posted by fire View Post
                          ahh well. i might try the decade counter idea first, and if that fails, ill try get into PICs..

                          So as for the parts..

                          1 x AND gate... like the 7408 Quad 2-input AND Gate
                          1 x NOT Gate... like the 7404 - Hex Inverter
                          1 x 555 timer
                          1 x 5hz crystal.. (i can only find 5MHz for now, but will keep looking)
                          1 x Decade Counter.... is this like the 7490?? chip.. or the 74160?
                          5v Regulator... various capapcitors / resistors...

                          i dont think i understand why the 555 timer is needed... and when you say reset pulse.. im assuming thats just the output of the 555 timer (pin 3).. whats triggers the 555?
                          Here is a good list, and it is always better to get 74LS than just 74. LS is low power essentially: http://www.ee.washington.edu/stores/...74ls/74ls.html

                          That link is complete with datasheets as well.

                          Decade counter 74190.

                          And the reason you cant find a 5hz crystal is well... They dont exist. But lets say you get a 5Mhz crystal. (Please note the following is not the preferred method, but it is the easiest and it works) Then make the crytstal input to 1 decade counter, and the input is a steady high (5v). Now if you take pin 9 and feed that into the clock of another decade counter, whose inputs are always high, you have gone from 5000000Hz to 500000Hz. Then another cascaded the same way to 50khz, then 5khz, then 500Hz, then 50Hz, then 5Hz. So that is how you do it.

                          And the output pulse from the counter in the picture, will send a brief pulse (1 clock cycle long) which the flip flop will store. Think of the flip flop as 1 bit of RAM. So now that flip flop will continuously output high after it gets that signal. You only want it to output for 1/2 second right? So get another minicircuit that will count for 1/2 second (easily accomplished with a cap and resister on a 555) and have that output pulse go into the reset or clear input on the flip-flop. So after the 555 counts, the flipflop is 0 again.

                          Make sense?
                          Fusion Brain Version 6 Released!
                          1.9in x 2.9in -- 47mm x 73mm
                          30 Digital Outputs -- Directly drive a relay
                          15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                          Buy now in the MP3Car.com Store

                          Comment


                          • #14
                            ive just ordered some parts do do with the decade counter method..


                            however, im now the owner of a PICstart Plus programmer (MPLAB) by MicroChip... i got it very very cheap (new for $50 AUD on ebay.... considering past auctions have gone for $180 for a used one!!!)..

                            i will also try to do this circuit using the PICs, (PIC16F84 or something smaller prehaps), as well as the decade counter..


                            as for the PIC for this... which one should i try first?.. i wouldnt need anything over 8 pins im guessing.......
                            theres cheap PIC12F509 which im looking at getting..(which are: Microchip 8-pin 4MHz Microcontroller)... what else is needed to get the circuit to work using the PIC??... could someone post a parts list?, and prehaps a simple schematic of how it would be wired up once programmed?
                            Current Setup - (as per PC specs on the left)
                            Future Setup - Commell LV-677, Dual Core2Duo 1.86ghz, 1gb ram, M2-ATX, Morex Mini-ITX case, Transflective screen

                            Comment


                            • #15
                              For the PIC, just a .1 F cap and 8-pin socket, and a 5V linear regulator + caps for that if you need to power it off the car battery. What voltages do you need for input and output? Here's a pic of a PIC That's an entire functioning prototype.
                              Attached Files

                              Comment

                              Working...
                              X