DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: samhay on February 24, 2013, 06:42:50 AM

Title: Blinking LEDs out of phase
Post by: samhay on February 24, 2013, 06:42:50 AM
Over in the 4069 thread, Jimi requested a schematic get two LEDs to flash perfectly 180 degrees out of phase, and to be able to control the speed. Didn't want to derail the thread, so started this one.

Here is how I would do it, but not sure it is the best approach. It is how my optical compressor works (http://www.diystompboxes.com/smfforum/index.php?topic=101118.0 (http://www.diystompboxes.com/smfforum/index.php?topic=101118.0)).
The snippet of interest is the last op-amp and you can increase the LED brightness by reducing R6 down to 100R. The rest is biasing and a phase shift oscillator (vary e.g. R3 to change the frequency and other op-amp oscilltors should work). If it glitches the power supply too much, put a small (nF ish) ceramic cap across the LEDs like in the compressor.

(https://dl.dropbox.com/u/11996927/blinkingLEDs.jpg)

A circuit simulation is also here:
http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+61+10.0+50%0Aa+224+240+352+240+0+15.0+-15.0+1000000.0%0Aw+224+224+224+176+0%0Aw+352+176+352+240+0%0Aw+352+240+352+304+0%0Ar+352+304+224+304+0+100000.0%0Aw+224+256+224+304+0%0Ar+224+304+128+304+0+100000.0%0Ag+128+304+128+336+0%0Ac+224+176+128+176+0+1.0E-6+5.031289115000884%0Ag+128+176+128+208+0%0Aa+432+256+560+256+0+15.0+-15.0+1000000.0%0Ar+352+240+432+240+0+100.0%0Ag+432+272+432+288+0%0Aw+432+240+432+176+0%0Aw+560+176+560+256+0%0Aw+560+176+560+128+0%0Aw+432+128+432+176+0%0A162+432+176+560+176+1+2.1024259+1.0+0.0+0.0%0A162+560+128+432+128+1+2.1024259+1.0+0.0+0.0%0A174+224+176+352+176+0+10000.0+0.41090000000000004+Resistance%0Aw+288+160+288+128+0%0Aw+288+128+224+128+0%0Aw+224+128+224+176+0%0Ao+11+64+0+35+20.0+0.2+0+-1%0A (http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+61+10.0+50%0Aa+224+240+352+240+0+15.0+-15.0+1000000.0%0Aw+224+224+224+176+0%0Aw+352+176+352+240+0%0Aw+352+240+352+304+0%0Ar+352+304+224+304+0+100000.0%0Aw+224+256+224+304+0%0Ar+224+304+128+304+0+100000.0%0Ag+128+304+128+336+0%0Ac+224+176+128+176+0+1.0E-6+5.031289115000884%0Ag+128+176+128+208+0%0Aa+432+256+560+256+0+15.0+-15.0+1000000.0%0Ar+352+240+432+240+0+100.0%0Ag+432+272+432+288+0%0Aw+432+240+432+176+0%0Aw+560+176+560+256+0%0Aw+560+176+560+128+0%0Aw+432+128+432+176+0%0A162+432+176+560+176+1+2.1024259+1.0+0.0+0.0%0A162+560+128+432+128+1+2.1024259+1.0+0.0+0.0%0A174+224+176+352+176+0+10000.0+0.41090000000000004+Resistance%0Aw+288+160+288+128+0%0Aw+288+128+224+128+0%0Aw+224+128+224+176+0%0Ao+11+64+0+35+20.0+0.2+0+-1%0A)

Edit: Jimi - only one LED is on at a time. Iis this what you wanted, or do you want one to get brighter as the other dims?
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 24, 2013, 10:11:35 AM
Quote from: samhay on February 24, 2013, 06:42:50 AM
Edit: Jimi - only one LED is on at a time. Iis this what you wanted, or do you want one to get brighter as the other dims?

If you want a linear cross fade, you can do that with an emitter current biased diffamp. Three NPN transistors and some biasing stuff and the diffamp pair keeps the sum of the two collector currents the same all the time. An LED in each collector shows the current in that transistor.

The bases go from on transistor full on, the other off and vice versa with a +/-25mV difference in the base voltages. You input your LFO through a resistor divider to make it cross fade one above/below the other by that amount and you get smooth transitions if the LFO waveform has smooth transitions. If you drive it with a square wave, they blink back and forth. The total current through the power supply is always constant.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 24, 2013, 02:43:10 PM
Quote from: samhay on February 24, 2013, 06:42:50 AM
Over in the 4069 thread, Jimi requested a schematic get two LEDs to flash perfectly 180 degrees out of phase, and to be able to control the speed. Didn't want to derail the thread, so started this one.

Here is how I would do it, but not sure it is the best approach. It is how my optical compressor works (http://www.diystompboxes.com/smfforum/index.php?topic=101118.0 (http://www.diystompboxes.com/smfforum/index.php?topic=101118.0)).
The snippet of interest is the last op-amp and you can increase the LED brightness by reducing R6 down to 100R. The rest is biasing and a phase shift oscillator (vary e.g. R3 to change the frequency and other op-amp oscilltors should work). If it glitches the power supply too much, put a small (nF ish) ceramic cap across the LEDs like in the compressor.

(https://dl.dropbox.com/u/11996927/blinkingLEDs.jpg)

A circuit simulation is also here:
http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+61+10.0+50%0Aa+224+240+352+240+0+15.0+-15.0+1000000.0%0Aw+224+224+224+176+0%0Aw+352+176+352+240+0%0Aw+352+240+352+304+0%0Ar+352+304+224+304+0+100000.0%0Aw+224+256+224+304+0%0Ar+224+304+128+304+0+100000.0%0Ag+128+304+128+336+0%0Ac+224+176+128+176+0+1.0E-6+5.031289115000884%0Ag+128+176+128+208+0%0Aa+432+256+560+256+0+15.0+-15.0+1000000.0%0Ar+352+240+432+240+0+100.0%0Ag+432+272+432+288+0%0Aw+432+240+432+176+0%0Aw+560+176+560+256+0%0Aw+560+176+560+128+0%0Aw+432+128+432+176+0%0A162+432+176+560+176+1+2.1024259+1.0+0.0+0.0%0A162+560+128+432+128+1+2.1024259+1.0+0.0+0.0%0A174+224+176+352+176+0+10000.0+0.41090000000000004+Resistance%0Aw+288+160+288+128+0%0Aw+288+128+224+128+0%0Aw+224+128+224+176+0%0Ao+11+64+0+35+20.0+0.2+0+-1%0A (http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+61+10.0+50%0Aa+224+240+352+240+0+15.0+-15.0+1000000.0%0Aw+224+224+224+176+0%0Aw+352+176+352+240+0%0Aw+352+240+352+304+0%0Ar+352+304+224+304+0+100000.0%0Aw+224+256+224+304+0%0Ar+224+304+128+304+0+100000.0%0Ag+128+304+128+336+0%0Ac+224+176+128+176+0+1.0E-6+5.031289115000884%0Ag+128+176+128+208+0%0Aa+432+256+560+256+0+15.0+-15.0+1000000.0%0Ar+352+240+432+240+0+100.0%0Ag+432+272+432+288+0%0Aw+432+240+432+176+0%0Aw+560+176+560+256+0%0Aw+560+176+560+128+0%0Aw+432+128+432+176+0%0A162+432+176+560+176+1+2.1024259+1.0+0.0+0.0%0A162+560+128+432+128+1+2.1024259+1.0+0.0+0.0%0A174+224+176+352+176+0+10000.0+0.41090000000000004+Resistance%0Aw+288+160+288+128+0%0Aw+288+128+224+128+0%0Aw+224+128+224+176+0%0Ao+11+64+0+35+20.0+0.2+0+-1%0A)

Edit: Jimi - only one LED is on at a time. Iis this what you wanted, or do you want one to get brighter as the other dims?

thanks sam, this looke pretty close to what i'm looking to do. i also am looking at this: http://sound.westhost.com/project49.htm and tim e's wobbletron/bearfoot fx's magnavibe.
ideally, fading led's is probably best, i think i need a triangle wave to do this, not a square wave.. tho i don't think it will really matter in this application.
i'm still trying to find a way to get a sound similar to the old blonde fenders for a bud who's jonesin' for that tone. my bro mike is building a custom amp for the guy, and we wanna implement a version of that kinda vibe into the amp... but without all the room required for the extra tubes and stuff.

i'll try this on my breadboard, and see what i can do.. i really appreciate the help bro! ;)
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 24, 2013, 03:09:54 PM
Quote from: R.G. on February 24, 2013, 10:11:35 AM
Quote from: samhay on February 24, 2013, 06:42:50 AM
Edit: Jimi - only one LED is on at a time. Iis this what you wanted, or do you want one to get brighter as the other dims?

If you want a linear cross fade, you can do that with an emitter current biased diffamp. Three NPN transistors and some biasing stuff and the diffamp pair keeps the sum of the two collector currents the same all the time. An LED in each collector shows the current in that transistor.

The bases go from on transistor full on, the other off and vice versa with a +/-25mV difference in the base voltages. You input your LFO through a resistor divider to make it cross fade one above/below the other by that amount and you get smooth transitions if the LFO waveform has smooth transitions. If you drive it with a square wave, they blink back and forth. The total current through the power supply is always constant.


hi rg,
i will try to google that up. i think i'm finally admitting to myself totally i am pretty clueless. i can do the monkey-see/monkey do kinda thing, and once in a while i get lucky adapting bits and pieces of other things. but this is way above my paygrade still. i'm a fair solderhand, but still a hack. ;)

i'm still trying to figure out a "sound alike" for the blonde fender (any luck with the kustom vibe by any chance?)... i built this recently, :
(http://hotamp.free.fr/image/tremolo.gif)

and it's a really simple design, and believe it or not, works really well. i gigged with it a few times LOUD and didn't experience any ticking, which i gather is fairly common.
i assume it's a square wave, but it sounds pretty good.. the led kinda fades in and out. i made a couple changes to the circuit shown as per paul (prr)'s suggestions..
made the 220k resistor 100k, made the 100u cap 1,000u, and used a 500k pot for the speed.

what i'd like to do is copy the buffered part of the circuit, and graft on a flip flopping led circuit. i was thinking a cap before the ldr to ground on one color led and a cap to ground after the other ldr  on a different color led may get me in the ball park, but i haven't got much of an idea how to implement it.
i googled up a bunch of different led flasher circuits, and got a few to work (and smoked a few pots and 2n3904's, too  :icon_mrgreen:) and tried a very simple implementation of my idea with the lo and hi pass filters, and it kinda works... but it ticks like a time bomb, and only seems to really do it's thing when the two led's are in sync. as soon as i turn the speed pot, i lose the sync... and can't get much response. it's a fine line between way too slow and mosquitoland. the only dual pot i had was a dual 100k linear, but i think it's too big.

do you by any chance have anything at geo or in your collection that could help me get a clue? i really appreciate all the help i get from you guys.
thanks!!  :icon_mrgreen:
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 24, 2013, 05:43:04 PM
sam, i'm looking at this and wondering, if i were to use passive hi and lo pass filters with a pair of ldrs, and had the ldrs only in the audio path, and made sure they DIDn't share ground.. like, the circuit's ground going to the negative of the power supply, but NOT connected to the audio ground, would i still get a tick?
i'm wondering if it could be done completely passively?

also.. i just watched the falstaff sim, that's wicked cool..
would i need a dual gang 100k pot in place of r3 and r4 for a speed control?
or is there a more elegant way to do it?

i was looking at this, too, which "swells" the led's in and out in sequence, and you can replace one resistor with a 100k pot.

i think the addiction is setting in again.... the diy jones.. gonna make it work. ;) GOT TO. ;)
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 24, 2013, 06:03:09 PM
Quote from: pinkjimiphoton on February 24, 2013, 03:09:54 PM
i'm still trying to figure out a "sound alike" for the blonde fender
Is that like the Fender Concert?

Quote(any luck w ith the kustom vibe by any chance?)
Not yet. I haven't really had time to dig into it yet.
Quotewhat i'd like to do is copy the buffered part of the circuit, and graft on a flip flopping led circuit.
OK. That helps.

Quotedo you by any chance have anything at geo or in your collection that could help me get a clue?
I think I may. Look on the geofex index page for "Fender Pro Vibrato". I did a highpass/lowpass tremo based on the Fender Pro, but used the EA tremolo as the gain blocks. There are three different styles.

If you really want the LED/LDR based tremo, I can do some more hacking. The diffamp trick does a great job of doing two outputs out of phase, but it has some tricky requirements on the inputs that have to be satisfied to work. A dual opamp version may be less temperamental, but still needs some work. A good thing to do is to ditch the single transistor LFO for a single-opamp LFO in a similar style. That is - making a working unit is probably simpler with a redesign.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 24, 2013, 06:35:15 PM
Quote from: R.G. on February 24, 2013, 06:03:09 PM
Quote from: pinkjimiphoton on February 24, 2013, 03:09:54 PM
i'm still trying to figure out a "sound alike" for the blonde fender
Is that like the Fender Concert?

Quote(any luck w ith the kustom vibe by any chance?)
Not yet. I haven't really had time to dig into it yet.
Quotewhat i'd like to do is copy the buffered part of the circuit, and graft on a flip flopping led circuit.
OK. That helps.

Quotedo you by any chance have anything at geo or in your collection that could help me get a clue?
I think I may. Look on the geofex index page for "Fender Pro Vibrato". I did a highpass/lowpass tremo based on the Fender Pro, but used the EA tremolo as the gain blocks. There are three different styles.

If you really want the LED/LDR based tremo, I can do some more hacking. The diffamp trick does a great job of doing two outputs out of phase, but it has some tricky requirements on the inputs that have to be satisfied to work. A dual opamp version may be less temperamental, but still needs some work. A good thing to do is to ditch the single transistor LFO for a single-opamp LFO in a similar style. That is - making a working unit is probably simpler with a redesign.


yes please. i love the "compression" that the led/ldr combo seems to introduce. even if it's a square wave driving the led's, it seems to have a nice softness to it.
i think it will work. i did a rudimentary version that alternated, but i couldn't keep them in phase once i adjusted the speed pot.
which got me thinking maybe the way to do it is to use three led's and three ldrs, and three colours of led's... and in addition to hi and lo pass filters, may be a band pass filter to keep the middle full. but i think at that point it would start sounding more like a "phasered" tremolo kinda.

i do have the ersats fender trem from geo, but it seems just a little complex for me still to vero.
i like the idea of the simplicity of hotamp's circuit, it sounds "half like" what i'm looking for.
much like in music, i'm discovering distance makes depth applies with led's and ldr's.. a coulple millionths of an inch adjustment of angle and space between them can make a huge difference in how they work.

so if you could help me with this rg, understanding my understanding is fundamentally crippled and dense like it is, i'd appreciate it! thanks!
Title: Re: Blinking LEDs out of phase
Post by: deadastronaut on February 24, 2013, 08:52:21 PM
hi jimi: heres another alternating fading led circuit....i swapped the 100k for a 100k pot..speed adjustable blah blah...works in my sim. :)

(https://dl.dropbox.com/u/7464107/alt%20fading%20leds.jpg)

Title: Re: Blinking LEDs out of phase
Post by: samhay on February 25, 2013, 12:52:02 PM
I vote for a modern work-a-like too.
I would not suggest you try to use different colour LEDs to turn on LDRs with different colour sensitivities. There will be way too much cross-talk. Instead, just roll each LED with its LDR in e.g. shrink wrap or insulation tape.

Rob's schematic should work quite nicely. You can alternatively vary the rate by replacing the 47k resistor with a pot and if you bump the 100R LED resistors up a bit, you could use a single LED with each transistor.
By the look of things, it will give a triangle waveform (see e.g. here: http://www.play-hookey.com/oscillators/audio/function_generator.html (http://www.play-hookey.com/oscillators/audio/function_generator.html)). If you take the output from IC1b, you will get a square wave, which might be a bit choppy for a tremolo, but you can probably mix it with the triangle to get a funky waveform if you like.
Unless you use a rail-to-rail op-amp, the current through the LEDs will not quite get to 0. This might cause problems as the LEDs might not quite turn off completely. I will try and put one together on the breadboard tonight and see how it goes.

Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 25, 2013, 01:23:55 PM
thanks sam.
as soon as i box the 4069 distortion today, i'm gonna have a play with rob's circuit on the breadboard.
i was actually kinda counting on the cross talk between the leds to help with the "phaseyness" of the project, but i guess it shouldn't really matter.
my experimenting so far seems to show that a slight distance between led and ldr's seems to give a mellower trem; even with a square wave pulse driving them, they seem to fade in and out. maybe it's an optical illusion.
give yourself epilepsy playing with that fallstaff sym!! my bwain!!! why is it flopping on the floor? lol...
really appreciate the help guys.. will check in later hopefully.
Title: Re: Blinking LEDs out of phase
Post by: deadastronaut on February 26, 2013, 03:32:34 AM
+1 on trying different colour leds man...(yellow might be best)...might be.

and yep led/ldr distance can make a real difference...suck it n see. ;)
Title: Re: Blinking LEDs out of phase
Post by: samhay on February 26, 2013, 04:44:36 AM
Tried some things out on the breadboard last night - quite good fun, and the Mrs liked the blinking lights.
Rob's idea seemed to work nicely. My play on it is below. I used a TL072 and, as Rob suggested, I needed to use pairs of LEDs to get the voltage drop across them big enough to get above the rail voltage (1 LED would not quite go off). Pairs is cool anyway as you will get a set of indicators.
A switch to select either square or triangle waves would be a nice idea. Tying to mix these with a pot was not very useful.
I would suggest you do not vary the feedback resistance (R2) as this shifts the amplitude, and has knock-on effects. A limiting resistor (R3) and a pot pot between the op-amps (R4) worked well for me. You can tune the frequency range with C1 and a range switch with different caps is not a bad idea.

I like this enough to think about using it to drive something too - perhaps a tremolo with a sweeping cut-off filter.

(https://dl.dropbox.com/u/11996927/blinkingLEDs2.jpg)

Edit: Jimi - here is the ciruit simulation.

http://www.falstad.com/circuit/#%24+1+5.0E-6+19.056626845863+61+10.0+50%0Aa+80+240+208+240+0+9.0+0.0+1000000.0%0Aa+352+256+480+256+0+9.0+0.0+1000000.0%0Ar+208+240+288+240+0+100000.0%0Aw+480+176+480+256+0%0Ac+352+176+480+176+0+1.0000000000000001E-7+-1.120095509100862%0Aw+208+352+80+352+0%0Aw+80+256+80+352+0%0Ar+208+240+208+352+0+100000.0%0Aw+480+256+480+352+0%0A174+288+240+352+240+0+1000000.0+0.5198+Resistance%0Aw+480+352+368+352+0%0Ar+368+352+208+352+0+56000.0%0Aw+320+224+320+208+0%0Aw+352+208+352+240+0%0Aw+352+208+352+176+0%0Aw+480+256+512+256+0%0Aw+208+240+208+128+0%0Aw+288+240+288+208+0%0Aw+288+208+320+208+0%0At+576+160+624+160+0+1+-3.3799606912922258+0.6404804164807123+100.0%0A162+624+192+624+224+1+2.1024259+1.0+0.0+0.0%0A162+624+224+624+256+1+2.1024259+1.0+0.0+0.0%0Ar+624+256+624+304+0+100.0%0Aw+208+128+512+128+0%0AS+576+192+512+192+0+0+false+0%0Aw+512+256+512+208+0%0Aw+512+128+512+176+0%0AR+624+144+624+112+0+0+40.0+9.0+0.0+0.0+0.5%0AR+80+224+80+192+0+0+40.0+4.5+0.0+0.0+0.5%0AR+352+272+352+304+0+0+40.0+4.5+0.0+0.0+0.5%0Aw+624+176+624+192+0%0Ag+624+304+624+320+0%0Ag+720+304+720+320+0%0Aw+720+256+720+272+0%0AR+720+144+720+112+0+0+40.0+9.0+0.0+0.0+0.5%0Ar+720+144+720+192+0+100.0%0A162+720+224+720+256+1+2.1024259+1.0+0.0+0.0%0A162+720+192+720+224+1+2.1024259+1.0+0.0+0.0%0At+672+288+720+288+0+-1+5.620039308707774+-0.4946788718401365+100.0%0Aw+576+352+672+352+0%0Aw+672+352+672+288+0%0Aw+576+160+576+192+0%0Aw+576+192+576+352+0%0Ap+512+80+512+128+0%0Ap+512+256+512+304+0%0Ax+517+231+552+234+0+12+switch%0Ax+497+108+537+111+0+12+square%0Ax+494+286+537+289+0+12+triangle%0Ax+801+327+858+333+0+24+hello%0Ao+43+64+0+38+9.353610478917778+9.765625E-55+0+-1%0Ao+44+64+0+38+9.353610478917778+9.765625E-55+0+-1%0A (http://www.falstad.com/circuit/#%24+1+5.0E-6+19.056626845863+61+10.0+50%0Aa+80+240+208+240+0+9.0+0.0+1000000.0%0Aa+352+256+480+256+0+9.0+0.0+1000000.0%0Ar+208+240+288+240+0+100000.0%0Aw+480+176+480+256+0%0Ac+352+176+480+176+0+1.0000000000000001E-7+-1.120095509100862%0Aw+208+352+80+352+0%0Aw+80+256+80+352+0%0Ar+208+240+208+352+0+100000.0%0Aw+480+256+480+352+0%0A174+288+240+352+240+0+1000000.0+0.5198+Resistance%0Aw+480+352+368+352+0%0Ar+368+352+208+352+0+56000.0%0Aw+320+224+320+208+0%0Aw+352+208+352+240+0%0Aw+352+208+352+176+0%0Aw+480+256+512+256+0%0Aw+208+240+208+128+0%0Aw+288+240+288+208+0%0Aw+288+208+320+208+0%0At+576+160+624+160+0+1+-3.3799606912922258+0.6404804164807123+100.0%0A162+624+192+624+224+1+2.1024259+1.0+0.0+0.0%0A162+624+224+624+256+1+2.1024259+1.0+0.0+0.0%0Ar+624+256+624+304+0+100.0%0Aw+208+128+512+128+0%0AS+576+192+512+192+0+0+false+0%0Aw+512+256+512+208+0%0Aw+512+128+512+176+0%0AR+624+144+624+112+0+0+40.0+9.0+0.0+0.0+0.5%0AR+80+224+80+192+0+0+40.0+4.5+0.0+0.0+0.5%0AR+352+272+352+304+0+0+40.0+4.5+0.0+0.0+0.5%0Aw+624+176+624+192+0%0Ag+624+304+624+320+0%0Ag+720+304+720+320+0%0Aw+720+256+720+272+0%0AR+720+144+720+112+0+0+40.0+9.0+0.0+0.0+0.5%0Ar+720+144+720+192+0+100.0%0A162+720+224+720+256+1+2.1024259+1.0+0.0+0.0%0A162+720+192+720+224+1+2.1024259+1.0+0.0+0.0%0At+672+288+720+288+0+-1+5.620039308707774+-0.4946788718401365+100.0%0Aw+576+352+672+352+0%0Aw+672+352+672+288+0%0Aw+576+160+576+192+0%0Aw+576+192+576+352+0%0Ap+512+80+512+128+0%0Ap+512+256+512+304+0%0Ax+517+231+552+234+0+12+switch%0Ax+497+108+537+111+0+12+square%0Ax+494+286+537+289+0+12+triangle%0Ax+801+327+858+333+0+24+hello%0Ao+43+64+0+38+9.353610478917778+9.765625E-55+0+-1%0Ao+44+64+0+38+9.353610478917778+9.765625E-55+0+-1%0A)


Title: Re: Blinking LEDs out of phase
Post by: duck_arse on February 27, 2013, 09:42:46 AM
pinkjimi, you should get yourself over to geofex and look up the "spiff up your ean tremolo" by r.g. it might be a useful thing for a second oscillator/led combo.

I modified the original circuit (much in the same style you use) to start or stop a trem, but the osc was a dual op-amp, and it did a strange, too long volume cut each time it started, in particular.
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 27, 2013, 10:53:55 AM
@ Samhay:
I messed with the LED-in-feedback setup that you started with. By splitting out one LED around two different opamps, and using different-phases of drive, I got a setup that will drive two opamps out of phase from zero to some resistor-settable current. I did this the formal analog computation way, so it uses a quad opamp for the full effect, but it contains adjustments for taking an LFO waveform from an existing LFO, and adjusting the DC level and scaling so the LEDs can go from full on to full off smoothly over quite a range.

A single LM324, some resistors, the LEDs, a trimmer for offset and another for gain to get the full range on the LEDS and you're done. It could probably be simplified, but I was trying to make it generally applicable.
Title: Re: Blinking LEDs out of phase
Post by: samhay on February 27, 2013, 05:51:17 PM
R.G. - sounds promising, but I think I am going to have to see a schematic. I can get each LED to dim, but they are still on one at a time.

Edit - to clarify. This is not the case for Rob's dual BJT approach. This works quite well and both LEDs are on for all but the extremes of the LFO sweep.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 27, 2013, 06:35:34 PM
i'd really appreciate a schematic, cuz this is right over my head!! well, 90% of it.  :icon_redface:
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 28, 2013, 11:57:52 AM
See http://www.geofex.com/FX_images/Panning LEDs.pdf (http://www.geofex.com/FX_images/Panning%20LEDs.pdf)
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on February 28, 2013, 01:11:17 PM
thanks RG!
Title: Re: Blinking LEDs out of phase
Post by: samhay on February 28, 2013, 01:37:28 PM
Ah - that makes sense. Nice job, thanks R.G.
I realised today that an inverting stage was probably involved but should have also realised you were using a single supply op-amp for a good reason. If I had read carefully, I would have also realised it used a quad PLUS the LFO op-amps. Now to marry the two...
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 28, 2013, 03:52:50 PM
Yeah, you feed whatever LFO you have into it, and the adjustments let you scale and shift that to make the LEDs go full on to full off.

The LFO can be either a single opamp as in the Phase 90 or a two-opamp version. The MXR LFO is an integrator/Schmitt trigger that uses a capacitor as a stand-alone noninverting integrator.

All this sounds like a bit of a PITA to do, but it is very flexible to apply.
Title: Re: Blinking LEDs out of phase
Post by: moosapotamus on February 28, 2013, 09:08:01 PM
R.G. - That's pretty cool! Thanks for sharing. 8)

Could you get it to work like an envelope follower if you fed it with a guitar signal (w/ added gain, maybe?) instead of an LFO?

~ Charlie
Title: Re: Blinking LEDs out of phase
Post by: R.G. on February 28, 2013, 10:05:29 PM
Hmm. Interesting question.

I think it doesn't work well with an AC guitar signal, but feeding it an envelope would work.

As shown, the LEDs naturally sit at half-brightness (well, OK, half current) with an input at the Vref (or adjusted to look that way by the trimmer). An AC signal like guitar would make the LEDs track out of phase up and down, OK, but the receiver, often a human eye or an LDR, would average this so that they still looked like they were at half-brightness all the time, in spite of them running back and forth madly. They're still doing the right thing, but a human eye or an LDR couldn't tell it. That's why doing an envelope ahead of it would work better.

If you had an envelope that was at ground for silence and a volt or two for signal peaks, you could sure make the thing have one LED off and one fully on with silence, and these would flip states on the peak of the envelope, then slide back to the silence value.
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 01, 2013, 04:52:54 AM
moosapotamus - if you want an envelope detector, the first schematic I posted (essentially the compressor without the LDR: http://www.diystompboxes.com/smfforum/index.php?topic=101118.0 (http://www.diystompboxes.com/smfforum/index.php?topic=101118.0)) is probably a better bet. Collectively, the 2 LEDs give you a full-wave rectification of the signal, and the relatively slow response of the LEDs/LDR (if using one) will smooth it out to give you something like a classic envelope detector.
The schematics that Rob and R.G. posted are great with really slow LFOs (few Hz), but much faster signal will smear out the LEDs response and the extra engineering required will be largely unnecessary.
Title: Re: Blinking LEDs out of phase
Post by: moosapotamus on March 01, 2013, 07:12:29 PM
Quote from: R.G. on February 28, 2013, 10:05:29 PM
...feeding it an envelope would work.

Cool! Two envelope detectors that simultaneously sweep in opposite directions (hmmm...)? I might have to find some time to give that a try. 8)

Thanks
~ Charlie
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 04, 2013, 08:33:54 AM
While this has been a fun intellectual exercise, I have been struggling to find a good use for the out-of-phase LEDs.
As a warm up, I cobbled together a 2 stage phaser/vibe on the breadboard that is similar to one of the links that Jimi posted earlier (http://sound.westhost.com/project49.htm (http://sound.westhost.com/project49.htm); very similar to the MadBean smoothie and its brethren). I am currently using 2 LEDs in phase to drive a couple of LDRs in place of the FETs. The LDRs are not especially matched yet it works really well - it sounds very watery and I quite like it. Using the square wave out of the LFO is surprisingly useful too - I guess the slow response of LEDs/LDRs has there advantages.
I am now trying to work whether there is any milage in further molesting it with another set of LEDs/LDRs out of phase. Jimi - what did you have in mind initially.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on March 04, 2013, 11:22:48 AM
hi sam,
originally i wanted to kinda ape that phasey kind of tremolo on the old blonde fenders.
i still haven't had a chance to revisit this yet, trying to get a bunch of business taken care of.
would LOVE to see a layout of what ya did, seems like you're on the path!
the idea was to use a lp and hp filter... one on each of the blinky pairs.. so that when say treble is being tremoloed, the bass isn't.. each pulse it will switch.
does that make any sense?
at high speeds i'm imagining it'll sound a little metalic, at low speeds i'm hoping to get that wobble kind of sound.
with your experimenting, do you think it's feasible?
i looked at RG's ersatz fender vibe etc, but i wanna do something veroboard friendly. that's just a wee bit over the top for me still i think.
Title: Re: Blinking LEDs out of phase
Post by: moosapotamus on March 04, 2013, 01:12:59 PM
That's a cool idea, Jimi. I was thinking of a filter application, too... like replacing the LED envelope follower in something like the Anderton Bi-Filter Follower so that the two filters would simultaneously sweep in opposite directions. I have no idea if it would sound any good, but it seemed like another cool idea.

~ Charlie
Title: Re: Blinking LEDs out of phase
Post by: electrosonic on March 04, 2013, 03:39:30 PM
Quoteoriginally i wanted to kinda ape that phasey kind of tremolo on the old blonde fenders.

What about this...

Take the BMP tone stack, replace the pot with two LDRs in series the output is taken from the junction of the LDRs. Make an LFO with two outputs out of phase and drive the LDRs with that.

Andrew.





Title: Re: Blinking LEDs out of phase
Post by: samhay on March 05, 2013, 03:39:45 AM
I was initially thinking about a tremolo that alternatively and/or simultaneously swept a LP and HF filter. I don't know why I haven't tried that yet. I freed up some breadboard space last night so will move that the the front of the queue.
Jimi, I'm guessing that you are still looking for the old Fender 'harmonic vibrato' sound. Something link this: https://www.youtube.com/watch?v=7dChBeEYIkM (https://www.youtube.com/watch?v=7dChBeEYIkM)?  I think we can get close with an optical phaser/vibe that I would imagine will fit in a 1590B on vero. I will post a preliminary schematic (there is nothing that hasn't been done before though) and sound clips as soon as I can cobble them together.
Title: Re: Blinking LEDs out of phase
Post by: deadastronaut on March 05, 2013, 05:44:19 AM
interesting ideas guys... :icon_cool:
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 05, 2013, 10:45:03 AM
Here's what I have thus far. It is a work in progress, and not very original. With the square wave LFO and vibe switch open you get a pretty nice tremolo. The two fixed all-pass filters fatten up the phaser sound a fair bit, but are very much an optional extra.

(https://dl.dropbox.com/u/11996927/Another_Optical_Phaser.jpg)

Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on March 05, 2013, 11:46:47 AM
god, have i told you guys how much i love you lately?
;)

cuz i DO!! (umm, platonically...don't get too excited there, mungo straight)

sam,  the harmonic vibratto is exactly what i was hoping to lummox across in a simplified "sound alike" kinda form.
perfect.

charlie, i had the exact same idea the other nite!! either we both got great minds, or you got as much pus betwixt the ears as me!!
;)

sam, i'm gonna try your circuit out asap..

i gotta tcob a little, so bear with me!! thanks bro!
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 05, 2013, 03:31:04 PM
Jimi - you might want to look at the Hollis EasyVibe http://www.hollis.co.uk/john/circuits.html (http://www.hollis.co.uk/john/circuits.html). I had forgotten about this, but it is very similar to what I posted - it uses 4 LED/LDR combos and the LFO is a bit more magnificent - and it might well do the trick. There are a bunch of layouts for it kicking around and you shouldn't have too much trouble finding sound clips on youtube etc.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on March 05, 2013, 05:41:23 PM
but... i wanna see THIS thing in action. ;)

i've seen the easyvibe, i don't need a vibe so much as a tremolo that "sounds like" the fender harmonic vibrato.

so.. see if i got this right... two dual opamps and a quad?
any pref for which opamps to use where?

i've got the usual tl06/7/82's, 4558's etc .

lm324's etc for the quad.

thanks sam, this looks easy enough even i hopefully can't bugger it too badly. ;)
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 06, 2013, 03:15:04 AM
OK fair enough.
Had more of  a play last night. For a tremolo sound, you can probably drop the 2 optional stages. Not sure how much use the vibe/phaser switch is either. The mojo seems to be in the square/triangle switch. I am using TL072/4s on the breadboard. There is a little bit of ticking that is probably coming from the LEDs. Using a TL062 (I'm out of these at the moment) for the LFO and whatever else you want for the audio would be worth a shot. I like TL072s for the input buffer so you have more input impedance than you can shake a stick it.
My LDRs get down to ~10k when lit together with 1 LED driven from the LFO, so this seems to be workable. If you want/need a deeper effect, use 2 x 1LED/1LDR combos.

Edit: You might need to add a BJT buffer between the LFO and the LEDs like in Rob's suggestion. Also, you can bump up the 56k feedback resistor in the LFO to 82k (or use a trimmer) to get a bit more voltage swing.
Title: Re: Blinking LEDs out of phase
Post by: electrosonic on March 06, 2013, 04:22:12 AM
Here is an old circuit from the internet's past - I have used it for LED eyes at Halloween (similar to posted except LEDs are buffered). (It needs a rate pot - the 47k resistor can be replaced by a pot + resistor)

(https://dl.dropbox.com/u/30050282/Fading%20leds.png)

Credit: image taken from here - http://www.bowdenshobbycircuits.info/fade_led.htm (http://www.bowdenshobbycircuits.info/fade_led.htm)

Andrew.
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 06, 2013, 04:55:03 AM
Thanks Andrew - looks like the same idea as Rob posted.

Seeing as we are back on topic - I found some 2 leg bi-colour (red/green) LEDs in my stash today. If I understand correctly, these are just anti-parallel LEDs in a single package; reverse the polarity and you change the colour. I think that you could put one of these in the feedback loop of the schematic I originally posted to smoothly alternate between red and green via orange. I have seen LDRs with both 530 nm (green) and 600 nm (red) peak sensitivities. These are pretty broad (100+ nm FWHM) peaks, but you might be able to get a useful response out of a 1 bi-colour LED/2 LDR combo...

Edit: works with a square wave - alternates between red and green at low speed then eventually get an orange blur at faster rates. With a triangle wave, you just get orange.
Title: Re: Blinking LEDs out of phase
Post by: PRR on March 07, 2013, 01:34:24 AM
> rate pot - the 47k resistor can be replaced by a pot + resistor

FWIW: the 47K+100K at pin 5 control the output level as well as the rate. As a blinker, no big deal until you get to tiny values.

But if you like the Triangle output: The 100K to pin _2_ only controls rate. Using LM324, values from 2K to 1meg should work and cover over 8 octaves of rate. If it still won't go where you need, change the 22uFd+22uFd to perhaps 0.1uFd for audio, 470uFd N.P. for glacial.
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 07, 2013, 05:40:47 AM
Quote from: PRR on March 07, 2013, 01:34:24 AM
> rate pot - the 47k resistor can be replaced by a pot + resistor

FWIW: the 47K+100K at pin 5 control the output level as well as the rate. As a blinker, no big deal until you get to tiny values.

But if you like the Triangle output: The 100K to pin _2_ only controls rate. Using LM324, values from 2K to 1meg should work and cover over 8 octaves of rate. If it still won't go where you need, change the 22uFd+22uFd to perhaps 0.1uFd for audio, 470uFd N.P. for glacial.

Yup - that's exactly what I would recommend too, and this is almost (I used a 10k limiting resitor) exactly how the LFO in the above phaser schematic is laid out.
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 07, 2013, 05:50:15 AM
In a vain attempt to make use of the alternating LEDs, I put together a 4 stage phaser on the breadboard where the first 2 stages swept up and the other two down. I guessed there is a reason why that design hasn't taken off and I was mostly right. It makes for an interesting effect - quite tremolo like - but not as nice as the straight phaser sound you get with 4 stages sweeping in the same direction and not likely to be worth the engineering effort.

I have had to play with the power filtering quite a bit - starting to appreciate why the EasyVibe has such a weird Vref - and it is now quite acceptable for the triangle wave. It ticks quite badly with the square wave output and I am pretty sure this is because the Vb power rail is spiking everytime the LDRs start swing down. Buffering it is not quite cutting it, so I am not sure that I want to go much futher down the square wave implementation.
I think I am just about ready to put this to bed, but might box up a simple little optical phaser before I clear the breadboard. I see that Jon (midwayfair) has just posted an optical implementation of the Harmonic Tremolo, which should keep Jimi happy for a while.
Title: Re: Blinking LEDs out of phase
Post by: pinkjimiphoton on March 07, 2013, 11:19:52 AM
yah, i'm looking at jon's design... looks good, too.
sam,i appreciate all the guidance, help and work!!
still digesting this thread, gonna be a few days before i can get to start 'sperimenting,
trying to clear my bench so i can get to some repair gigs.
thank you so much you guys.. this thread has contained some amazing info!
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 07, 2013, 11:35:19 AM
No worries Jimi - it's been fun.
I will beinterested to see what you make of it all once you get some time to play with some of the ideas.
Title: Re: Blinking LEDs out of phase
Post by: deadastronaut on March 07, 2013, 12:10:45 PM
hi sam,

optical phaser sounds interesting...got a clip?
Title: Re: Blinking LEDs out of phase
Post by: samhay on March 07, 2013, 12:21:06 PM
Rob - no, but I guess you could twist my arm. Probably won't happen tonight, but might get a chance tomorrow.