Connect with us

Circuit that sends 1 pulse when input goes high, 2 pulses when input goes low

Discussion in 'General Electronics Discussion' started by Solakian, Mar 5, 2017.

Scroll to continue with content
  1. Solakian

    Solakian

    12
    1
    Mar 5, 2017
    I need a simple circuit that will output a single pulse when the input goes high, then output two pulses when the input goes low. The input will be 12 to 14 vdc, each pulse has to last about 500 ms. Can anyone offer any suggestions where I might find this?
     
  2. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Solakian, welcome to EP. This is an easy task for a microcontroller. Alternatives will be more complex but not beyond practicality. Are you familiar with micros?

    Chris
     
  3. Alec_t

    Alec_t

    2,867
    768
    Jul 7, 2015
    Output pulse amplitude and polarity?
     
  4. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    And pulse width.
    Thanks
    Adam
     
  5. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    He said 500mS but he didn't define polarity and voltage.

    Chris
     
    Arouse1973 likes this.
  6. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    oh yeah duuuh.
     
  7. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Adam, maybe you're catching what I have? :D

    BTW, this is the kind of project that Kris used to salivate over. For sure he wouldn't be using a uC and equally for certain it wouldn't be simple; as the OP is hoping for. I envision Kris designing it totally discrete!

    I really do miss him. :(
    Chris
     
    Arouse1973, hevans1944 and duke37 like this.
  8. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    Yes he would of done it, I miss him too.
    Adam
     
  9. hevans1944

    hevans1944 Hop - AC8NS

    4,521
    2,104
    Jun 21, 2012
    We all miss him. But I disagree that Kris would automatically offer a discrete approach. His last projects were heavily involved with Microchip PICs. This would be ideal for PIC10F200 series operated from a coin cell. Depending on output pulse requirements (not specified completely by the OP) an external power supply (to provide perhaps 12 V amplitude output pulses) and a transistor driver could also be required. Sounds like an automotive application with the 12 to 14 V input specification.
     
  10. Solakian

    Solakian

    12
    1
    Mar 5, 2017
    I'm not familiar with microcontroller circuits. I was thinking along the line of a one shot using a 555, but getting two pulses when the input goes low has me stumped. Would prefer the output amplitude at +12Vdc (but could live with 5Vdc), and yes, this is an automotive application
     
  11. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    OK, we know you want a ~+12V pulse with a pulse width of 500mS. What's the time delay between the falling edge of the first pulse and rising edge of the second pulse?

    Chris
     
  12. Solakian

    Solakian

    12
    1
    Mar 5, 2017
    A 50% duty cycle would be good, rising edge - 500ms, falling edge - 500ms, rising edge - 500 ms, falling edge - cycle stops. The timing has quite a bit of leeway.
     
  13. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Since your Input Signal Low will produce a 50% duty cycle it should make things a tad easier. Since you'd like to work around a 555 solution (you'll need 2 or a 556) you could use the input low to run a 555 in astable mode. Then feed the output to a counter like a 4017. When it reaches a count of 2 the output voltage can be fed back to the 555's Reset pin. Thus stopping the count. FYI, this is just random thoughts containing very few details.

    Since you mentioned the 555, can we assume you've worked with them before? Also, are you aware of the issues involved with automotive electronics DYI? It's a very hostile environment. Both electrically and environmentally. Depending where in the auto this is going, it can also be a mechanically hostile environment.

    Chris
     
  14. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    While we're waiting for a reply to my last post you can add two more questions to the one's already asked.
    (1) Is the +12V input signal debounced? IE, is it coming from a mechanical switch or an existing logic signal.
    (2) What is the +12V pulse output current demand?

    I should tell you the following up front. We get many nubes posting questions while trying to keep their project secret. More times than not this becomes an intolerable irritant. This is because many of us will put the time in to actually design and simulate their circuit. Some members (not me) will actually breadboard a live circuit for the OP. Only to find out later that one or more of the nubes secrets totally made his time and effort a big pile of horse dung! At that point the nube becomes a target of virtual darts, spitballs and very real epithets. Don't be one of them. ;)

    Entry into Electronics Point's "Nubies Mystery Circuit Circus" section does not gain any "Like's" in their membership status.

    Chris
     
    Last edited: Mar 6, 2017
    OBW0549 and hevans1944 like this.
  15. hevans1944

    hevans1944 Hop - AC8NS

    4,521
    2,104
    Jun 21, 2012
    This project could be a great way to get some microcontroller experience! The circuit is simple because you have just one input signal and one output signal. Here is an example schematic from a project @KrisBlueNZ was working on when he passed:

    upload_2017-3-6_8-41-5.gif

    The details are not important, but notice there is only one input, SW1, and one output, the drive signal to the gate of Q1, which was used to complete an external circuit connected to WP1 and WP2. The entire circuit was completed with surface mount components on a small disk-shaped circuit board that fit inside the base of a powerful flashlight. Several of us worked on this after Kris passed, so you would have plenty of help available to get your project up and running.

    The biggest downside to using the PIC10F200 is programming it. This does require investing in an inexpensive "pod" that is temporarily connected to the circuit points labeled PP1, PP2, PP3, PP5, and PP6. The "pod" connects via USB to a personal computer, where you do the programming with free software downloaded from the Microchip website. You are done after your PIC program is downloaded from the PC to the PIC10F200 via the "pod"... provided the program works the first time, which hardly ever happens.:oops: However, it takes only minutes to make program changes to correct errors and download the program again. After you have it all working (several of us here at EP can help you with that), the "pod" is removed for use again on another project. Presumably by then you will have become thoroughly addicted to using PICs and will reject the thought of ever again using a 555 for timing purposes.

    That is so "old school" but perfectly acceptable for a simple project like this. As Chris mentioned, you need two 555 circuits as well as a pair of flip-flops, or a counter as he suggested, to count two output pulses and disable that 555 output when the pulses occur after the input goes low. When the input goes high again, that event would be used to reset the counter or the flip-flops in preparation for when the input goes low again.

    The first 555 is wired to produce a single pulse on the low-to-high transition of the input. The second 555 is wired to produce a train of pulses on the high-to-low transition of the input, but after two pulses have been output the second 555 is disabled by the counter or flip-flops. You could "wire OR" the two 555 outputs to the base or gate of a switching transistor to create your 12 to 14 V output, so either 555 output going high (to generate a pulse) would cause your output to go high. You could also use a logic gate for the same purpose. Those are available now in single-gate packages for surface mount to use as "glue" logic. Are you proficient enough to work out the details, or do you need someone here to design a circuit for you?

    The 555 and 556 timers are also available in surface mount if you want to go that route. Add some SMD Rs and Cs for timing purposes and a little solder and you are in business. Well, you do have to make some sort of circuit board, but prototype boards with pre-made pads and traces are acceptable and readily available. Use what you need, cutting unused traces with a sharp hobby knife, and leave the rest. Feel free to add jumpers if necessary. I use 30 AWG insulated wire-wrap wire and secure it with a dab of hot-melt glue when everything is working to my satisfaction. Or use clear RTV cement and wait 24 hours for it to cure.
     
    CDRIVE likes this.
  16. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Hop, as you're probably aware I've always been a Picaxe guy but only because I simply can't or won't invest the time to learn ASM or any flavor of 'C'. As of late I have managed to upgrade myself to blank PIC's but only because "Great Cow Basic" has made it soooo easy to do. I simply love GCB! That said I'd still recommend a Picaxe 08M2 for a uC nube because he could get that up and running in no time at all. If he has a real serial port or a USB/Serial dongle (most do) his cost will be the chip (~$5.00) alone. Hell, I'll write the code for him. All he'd have to do is copy and paste it into the FREE Picaxe Editor/Simulator and download it to the chip.

    Chris
     
    Arouse1973 and hevans1944 like this.
  17. Solakian

    Solakian

    12
    1
    Mar 5, 2017
    I work almost exclusively in the automotive environment, often on earthmoving equipment. I have worked with 555 and 556 before and I like the idea of a counter on the output.
     
  18. Solakian

    Solakian

    12
    1
    Mar 5, 2017
    Nothing secretive here, the input will come from a relay. I'm trying to run two senders to a single gauge (engine oil temp and transmission temp), a relay will switch which sender is selected. The gauge has 3 selectable background colors that sequence through at the push of a button. My objective is to simulate the button pushed once when one sender is chosen (selecting color x), and twice when the other sender is chosen (skipping color y, selecting color z), then x, then z, etc. Color x for the engine temp, color z for the trans temp, rinse, lather, repeat.
     
  19. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Thanks for the details but we still need an answer to #2.

    Chris
     
  20. hevans1944

    hevans1944 Hop - AC8NS

    4,521
    2,104
    Jun 21, 2012
    Could you sketch and photograph a circuit diagram of how the senders are selected? Is there a single relay with SPDT contacts that select one sender when the relay is de-actuated and the other sender when the relay is actuated? That seems simple enough to do with a toggle switch to turn the relay on and off, but how do you go from there to sending pulses to advance the backlit display colors? Where do the display color selections originate in the original equipment? Does the display assume there will be three independent senders always connected, and somehow it is commanded (push of a button?) to choose which sender to display? Is this "push of a button" function something you are trying to create to replace the button on the sensor display? How does the display "stay in sync" and advance between the first display to the third display, skipping the one in between? Is that why you want two pulses to occur when the input associated with the sensor selection relay goes from high to low? Is a low-to-high transition (generating a single pulse) required to display the first sensor? What happens if the display happens to be on the middle position instead of the last position when the input goes from low to high?

    I think you can do this with three (maybe four) 555 timers all operating as one-shots. The first one triggers on the low-to-high input transition. The second triggers on the high-to-low input transition. The third triggers after the second one times out. The tricky part is getting a sufficient off time for the second 555 before it triggers the third 555. Can probably work out something with an RC network and some small-signal diodes to steer and select the polarity of the trigger pulses applied to each 555 timer. All three timers would have their outputs ORed so any one of the three produces the output pulse or pulses. Easy way to do this is with three optical isolators, but three transistors (or even just one, properly biased and connected) would work.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-