envelope/edge detection

Started by artifus, February 27, 2011, 02:14:14 PM

Previous topic - Next topic

Gurner

#20
Quote from: deadastronaut on October 15, 2012, 10:14:46 AM
updated:

i'll give it a go and see if the led, 'ripples' ..flickers on the dying out...

so if i swap R4 and R6 for pots i should be able to adjust attack,release?...

yes, but I'd put some series resistance in situ in that case (rather than just a pot) ...so a small value resistor followed by a pot - that way at least when the pot is fully turned & presents zero resistance, then at least you've still got some resistance in play via the additional resistor I'm speaking of.

One other point a TL072 should be able to drive the LED, but it hasn't that much brute force in reserve, (there are better opamps out there), but nevertheless it should still work.

deadastronaut

cheers for your help G. ;)

i have other opamps 358's 5532's etc...i'll try those too..

nice one...i'm on it now!!.. :icon_cool: :icon_cool: :icon_cool:
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#22
Quote from: deadastronaut on October 15, 2012, 10:24:46 AM
cheers for your help G. ;)

i have other opamps 358's 5532's etc...i'll try those too..

nice one...i'm on it now!!.. :icon_cool: :icon_cool: :icon_cool:

The main problem I foresee, is that the signal is going to have to charge up C2 to the 'fwd voltage' of the LED before it starts to conduct (this is why I said a few posts back that the cathode should really be sitting at a voltage of Vref minus the fwd voltage of the led, so for a red led, the cathode should probably be sitting at about 2.5V)

On a 9V supply, red led, with no guitar signal both the LED anode & cathode are sitting at 4.5V, the signal arrives, the cap C2 starts charging up, but the led won't turn on until it has charged up Vref+2V (6.5V)   ....how this works in practice....dunno - like I say, you're taking a circuit that I was recommending for an LED on/off requirement (vs. a smooth fadeout from max brightness to led extinguished ...relating to incoming guitar signal)

deadastronaut

no worries i'll try it and see what happens......that's if i can see, my overhead bulbs have just gone!!!! arghhhhhhhhhh.....ffs..... ::)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

deadastronaut

yep tried it, checked connections, kept bottom rail seperate,  no led response though , tried standard red/ super blue led......

i used a 1n914 diode..


https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

Quote from: deadastronaut on October 15, 2012, 12:18:07 PM
yep tried it, checked connections, kept bottom rail seperate,  no led response though , tried standard red/ super blue led......

i used a 1n914 diode

If you've a dvm, remove the LED & put the dvm on the output pin of the final opamp that drives the led .......plug in an input signal to the cct - you should have about 4.5V when the input signal is silent & this voltage should  rise when you put a signal into the circuit.

deadastronaut

hi G:   yep i pulled the led out,  i put my DMM + on the output pin 7, and the - lead to ground (instead of botom rail VCC2) ...getting 4.54v with no signal

which raises  to 5.60v when strummed/whacked really hard...

when DMM ground lead is on bottom rail VCC2 , 0.00 with no signal , then when guitar strummed 1..10v....
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#27
Quote from: deadastronaut on October 16, 2012, 04:36:10 AM
hi G:   yep i pulled the led out,  i put my DMM + on the output pin 7, and the - lead to ground (instead of botom rail VCC2) ...getting 4.54v with no signal

which raises  to 5.60v when strummed/whacked really hard...


That's only a difference of 1.1V (between quiescent = 4.5V & strummed hard= 5.6V, you'll need much more DC voltage swing than that (a red led will only start lighting up with 1.9V)...... try increasing the gain of the 1st opamp (up R2 in value), you will need at least 3V of swing (therefore the output of the first opamp should get to about 7.5V)....you should only use a red led here. (& ideally you want a rail to rail opamp, not a TL072)

Quote from: deadastronaut on October 16, 2012, 04:36:10 AM
when DMM ground lead is on bottom rail VCC2 , 0.00 with no signal , then when guitar strummed 1..10v....

This doesn't make sense (perhaps I'm not understanding the way you've measured it) ......VCC/2 should measure 4.5V & not stray when the guitar is plucked. Can you clarify?

edit: last bit deleted pending me checking my facts!.



deadastronaut

#28
morning... ;D

i raised the R2 all the way up to 1M , led lights when plucked , but only just...not full bright...


clarification/re-measure:  with led taken out, and DMM + from out of ic.(pin7) .and DMM - Lead from where led - was (bottom rail not -ve rail).... i now get oscillating voltages.

in the range of 0.33 to 0.75....when not plucked....when plucked i get 1.6v..


opamp sugestion?..i'll see if i have a couple...
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#29
Quote from: deadastronaut on October 16, 2012, 05:27:06 AM

i raised the R2 all the way up to 1M , led lights when plucked , but only just...not full bright...

1M is a tad excessive! I wouldn't go any higher than 47k (& even then that's excessive).....that's a gain of approx 50. (meaning once your initial pluck transient has died to a say a 200mV AC signal level, the output of the 1st opamp preamp should be a signal of about 10V...which of course is impossible with a 9V supply & non rail to rail opamp). I think you're being imapcted by the TL072's output inability to swing to rail here...meaning the cap can't get charged sufficiently, meaning not enough swing on the LED anode.


Quote from: deadastronaut on October 16, 2012, 05:27:06 AM
opamp sugestion?..i'll see if i have a couple...

I seldom work with 9V opamps (normally 5V), so I have no immediate suggestion....I'm sure others can suggest a rail to rail opamp capable of 9V supply though.

Edit,
I've just spotted an error with your schem...the cathode of the diode D1 should not go to VCC/2 take it out!


deadastronaut

#30
yeah i spotted that line mistake after the diode yesterday...its not there... ;)


it goes straight to the cap/resistor..

edit.

i was looking at this and thinking of ripping just the attack/sense off this tried n tested envelope but just adding my own filter to it...

might be easier.....erm....he says... ;D...it'll handle most opamps by the look.

http://www.muzique.com/schem/quack.gif


https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#31
Another plan of attack  - which might be better for what you seek (& you wouldn't need a rail to rail opamp)  & it's quite quick....

1. Make  R7 = 7.2k & R9 = 1.8k (or if you don't have those values, then approximate multiples thereof so 15k/3.6k, 33k/15k etc)....what you're shooting for is the output of the R7/R9 junction to be about 1.8V

2. Connect the LED cathode to ground (not VCC/2) ....you should use a RED LED.

Ok, now you've got a situation where with no signal the LED anode should be at about 1.8V (so if a red led is used, then just off, becuase it normally needs 2V), guitar signal arrives & that last opamp DC voltage will increase a fair bit (you might wish to decrease the gain of the first opamp stage and use a higher value LED series resistor initially, else there's a chance your LED might get stressed!)

deadastronaut

#32
edited.

i stuck the led to ground,




right i have 1.81v on the junction,  i used a 22k/5.6k...
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

deadastronaut

#33
ok i have 1.84v on the juncton.


i changed the resistor led to 1k.

and left the R2 gain resistor at 10k...

i now have sound to light......led is off with no signal, .but i have to whack guitar hard to get it to light....getting there.. :)


changing the gain R2 from 100r to 47k doesn't change the intensity...


i now have this:

https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#34
So try increasing the value of R8 up at touch until the RED LED is visibly faintly on...then reduce the resistor back  a little (we are try to get the LED biased just off with no signal)...it might need nearer 2V.....also try reducing the LED series resistor (R5) a tad, & also up R6 to something like 4.7k to stop the cap draining so quickly.

deadastronaut

#35
R8 now at 2.2M..

led resistor at 470r

R6, is pretty cool to adjust, on 68k it has a nice smooth fade...no flickering... :icon_cool:.(.lower resistor quicker fade etc..(pretty cool, that'll be nice with the filter.) (i'm using my resistor sub box to switch R'S).. ;)



still takes a good hard whack to get it lit though.(but does go bright)....led still completely off when no signal....

https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#36
Quote from: deadastronaut on October 16, 2012, 07:43:16 AM

still takes a good hard whack to get it lit though.(but does go bright)....led still completely off when no signal....


That's because of the forward voltage drop loss of D1 (you are losing 0.7V across the diode, which is quite a percentage at these signal levels) ...if you use a schottky diode for D1, there'll be less diode voltage loss, less whacking the strings to overcome the D1 voltage loss, which means the led will light earlier.

deadastronaut

right gotcha...hmmm i don't think i have a shottky diode.....i have various diodes though...i'll try some others..

after tweaking around a bit (in between my cat smashing a vase of flowers on the floor..the b.....d ::))  i can see its a bit of a juggling act with voltage and led resistor to get it going properly..

but its much much better than the ol'386 mularky... ;)...very promising, i love the slow fade when R6 is upped...i can imagine a pot on there for sure... 8)

i'll have a twiddle with the attack R4 too...

i'm guessing an input buffer would kick it into being more responsive to a lighter pluck?...

maybe the other half of the voltage follower could be used?..hmmmm....thinking aloud..
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#38
the signal path is like thus...

Signal arrives from guitar....it's piddly so we need to amplify. That's what the first opamp does. An AC guitar signal obviously has a positive & negative cycle...but here we've thrown away the negative cycle (that's what D1 does).

So signal arrives at a post pluck (transient) level of say 200mV to 300mV, but gets whacked up to something workable ...ideally about 5V positive cycles only  (that's not gonna be possible with a tl072 biased at 2.0Vish ). Nevertheless let's shoot for about 30x gain (Therefore make R2 30kish or even a little higher). Ok, so now we dispensed with the negative cycle & we've about 5V of half wave rectified positive cycle AC signal to charge up the cap C2 with, but we'll lose some here too...probably best we can expect is something like 3.7V voltage swing on the cap....but that should be sufficient for the requirements.

Strategy...

1. try & find/source a rail to rail opamp.
2. Make the gain of the first stage at least 30X (therefore R2 about 33k & R3 1K)
3. try & source/use a schottky diode for D1.
4. Experiment with R5's value.
5. Tweak the value of R8 until the RED LED is just off with no signal (a pot in place of R* would be good toe set this level)

(I've just noticed another error on your schem.....on the last opamp the feedback loop from the output pin to the -ve input pin should not also go to Vref)

deadastronaut

yeah i didn't have that on breadboard that way...just my crappy drawing..fixed!.



i might nip to maplin tomorrow,  can you suggest a schottky and rail to rail opamp?..

i'm running out of light, hopefully my bulbs for my overhead will arrive tomorrow..and i'll be able to see again.. ::) ;D

cheers G: i appreciate your patience man!.. 8) ;)


edit btw i tried using the opamp as a buffer...nopey nope nope... :)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//