Author Topic: Simple exponential decay generator  (Read 7345 times)

0 Members and 1 Guest are viewing this topic.

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Simple exponential decay generator
« on: December 08, 2013, 05:22:53 am »
Hi everyone, long time viewer, first time poster.

I'm trying to create a circuit that generates an instant rise and exponential drop when I press a button. I need it to act so that pressing the button sends the signal high and then when the signal reaches its peak it begins to decay exponentially.

I've got something working using an RC circuit, but holding the button keeps the signal high until it is released, and ideally I need the signal to begin to decay as soon as it reaches its peak. I'll attach my schematic for reference. The voltmeter and resistor would be replaced by an output jack to go to the circuit I hope to control - the 5v control input of a voltage controlled filter. The button will be replaced with a 5v pulse signal from a microcontroller eventually.

Any help would be greatly appreciated.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11888
  • Country: us
Re: Simple exponential decay generator
« Reply #1 on: December 08, 2013, 05:39:09 am »
I've got something working using an RC circuit, but holding the button keeps the signal high until it is released, and ideally I need the signal to begin to decay as soon as it reaches its peak.

The button will be replaced with a 5v pulse signal from a microcontroller eventually.

It would be possible to create a circuit that turns the button press into a momentary pulse, but if you plan to get a pulse from the microcontroller eventually, why not use that? The microcontroller can set the output high during the "countdown" phase to the start of the decay curve and set the output low at t=0 exactly when the decay should start. (You probably need to buffer the output signal from the micro with a diode or transistor switch so it is not active low--it needs to be "off" otherwise it will drain the timing capacitor instantly.)
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: Simple exponential decay generator
« Reply #2 on: December 08, 2013, 05:48:27 am »

It would be possible to create a circuit that turns the button press into a momentary pulse, but if you plan to get a pulse from the microcontroller eventually, why not use that?

I did think about using the microcontroller to do it, but I'm building a very simple analog synthesizer and the MCU is just going to manage the note on/off data and the MIDI clock. I want to be able to build it without any digital circuitry and then modify it later. It's a slightly awkward way of doing things, but I'm trying to learn as much as I can about electronics in the process  :D
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11888
  • Country: us
Re: Simple exponential decay generator
« Reply #3 on: December 08, 2013, 06:01:17 am »
Take a look at this page about edge triggering:

http://www.allaboutcircuits.com/vol_4/chpt_10/5.html

That should get you started.
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: Simple exponential decay generator
« Reply #4 on: December 09, 2013, 06:11:11 am »
Thanks for the info. The propagation delay thing seems to be my best bet. Could I use that pulse to trigger a 555 timer in monostable mode so I could vary the length of the delay? Being able to press a button as a one shot and then after a variable amount of time get a pulse out would be incredibly useful.

Also, would I need to buffer the output of the circuit above? I've not had a chance to breadboard it because I'm waiting on some parts.
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: Simple exponential decay generator
« Reply #5 on: December 11, 2013, 05:54:34 pm »
I've built the circuit, but the propagation delay is too short to charge the cap, even with bog standard "slow" CMOS 4000 series chips. The circuit is working as it should (I have it triggering a flip-flop) but it's way too fast to charge a cap.

Is there another way of doing this?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11888
  • Country: us
Re: Simple exponential decay generator
« Reply #6 on: December 13, 2013, 04:23:58 am »
If the pulse is too short by itself you can use the pulses to trigger a monostable circuit--short pulse in, long pulse out. You can set the time constant of the monostable to make the extended pulse as long as you need.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Simple exponential decay generator
« Reply #7 on: December 13, 2013, 02:19:02 pm »
Hmmm - I'm thinking something like an SCR or TRIAC sitting between the supply and a parallel RC circuit to ground.  Trigger the TRIAC capacitively with your push-button and it will start the TRIAC conducting, quickly charging the cap. When the cap reaches full charge, the current through the device will drop below the holding current and it will shut off.  Then the slow decay of the voltage on the cap will be from the resistor in parallel.
« Last Edit: December 13, 2013, 07:05:05 pm by w2aew »
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Simple exponential decay generator
« Reply #8 on: December 15, 2013, 04:10:10 am »
I've built the circuit, but the propagation delay is too short to charge the cap, even with bog standard "slow" CMOS 4000 series chips. The circuit is working as it should (I have it triggering a flip-flop) but it's way too fast to charge a cap.

Is there another way of doing this?

Here's a video showing the circuit idea I suggested, using an SCR.  I've also included a short tutorial and demonstration of the operation of an SCR.


YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11888
  • Country: us
Re: Simple exponential decay generator
« Reply #9 on: December 15, 2013, 07:21:11 am »
Neat. Elegant simplicity without logic gates or transistors  :)
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: Simple exponential decay generator
« Reply #10 on: December 15, 2013, 11:07:59 am »
That's really cool, thanks! I'll have to get an SCR to try it, but it looks absolutely spot on for what I need.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Simple exponential decay generator
« Reply #11 on: December 15, 2013, 11:39:44 am »
If you have a NPN and a PNP transistor you do not need to buy a SCR, just connect like in the video and use it. Will have issues with reverse breakdown but will do as a demo at 9V A common PN2222 and PN2905 will do.
 

Offline Wytnucls

  • Super Contributor
  • ***
  • Posts: 3045
  • Country: be
Re: Simple exponential decay generator
« Reply #12 on: December 16, 2013, 10:10:22 am »
I have replicated the circuit with a NEC 5P4M 400V thyristor. It works fine with the same approximate components Alan has in his circuit.
Thanks Alan, that's was fun ;)
« Last Edit: December 16, 2013, 10:18:40 am by Wytnucls »
 

Offline IvoS

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: us
Re: Simple exponential decay generator
« Reply #13 on: December 20, 2013, 11:55:40 pm »
Nice video. I have a similar problem I would like to solve. But in my situation, I need to have the exponential "rising" edge with sharp turn off - falling edge, pulse width duration adjustable within 10-100ms. Pulse peak around 10V. Any ideas?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf