Driving 3 LEDs with an LFO (and trying to fix the problems it gives)

Started by Labaris, May 07, 2013, 07:01:40 PM

Previous topic - Next topic

Labaris



Hi,

This circuit is intended to use as a multiple indicator. It flashes or stays on (the LEDs) and an external switch select one of two combinations: Blue and green, Blue and red.
It's working right now, but I got three issues:

1. When I switch to the Blue-red option both LEDs turns off and go on again quickly. I changed the OPAMP for a JRC022 and now both LEDs stay on all the time as needed. Anyway I'd like to know how the specs of the chip could affect this.

2. It seems that the LEDs don't flash exactly at the same frequency. Maybe it's just an illusion, but I know there's some dependence between the total current in the LEDs and the LFO frequency.

3. This is the worse of all three. Since the voltage changes of the square wave are so fast, a thick is heard in the audio output. LFO and audio circuits share the same ground; the only isolation a tried is the "current reserve" using R11 and C5 (first components from left to right).
C10 is there to soften the jumps a little, but I need 100uF to makes the thick disappear and this makes the flashing of the LEDs a little too slow

Any help is appreciated. Thanks.
A long way is the sum of small steps.

jpwilksch

Hi Felipe,

I think you'd be better off inserting a transistor after IC2B to drive the LEDs. This might help clean up some of the interaction you are seeing.

J.

R.G.

I guess my advice would be to do it a different way.

First, generate your flashing signal in a low-current way, then buffer it into the LEDs with slew-rate limited buffers. And since you don't show the selection circuits, I'm guessing this is a switch of some kind to ground. Return the "ground" side of this current back to the same capacitor that bypasses your flasher, not the audio circuit.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Labaris

Quote from: jpwilksch on May 07, 2013, 07:47:50 PM
Hi Felipe,

I think you'd be better off inserting a transistor after IC2B to drive the LEDs. This might help clean up some of the interaction you are seeing.

J.

I'd like to use ICB to do this if possible, just to maintain part count low. What do you think?
A long way is the sum of small steps.

Labaris

Quote from: R.G. on May 07, 2013, 08:08:56 PM
I guess my advice would be to do it a different way.

A. First, generate your flashing signal in a low-current way, then buffer it into the LEDs with slew-rate limited buffers. B. And since you don't show the selection circuits, I'm guessing this is a switch of some kind to ground. Return the "ground" side of this current back to the same capacitor that bypasses your flasher, not the audio circuit.

A. A "low-current way would be to use higher resistor values for the oscillator? I'm confused with the concepts involved in this, because the supply voltage is reached anyway since it's oscillating, am I wrong?
Limited slew-rate means "trapezoid" waveforms? Or this buffers you mention would do the job of limiting voltage changes? Should I need a dedicated buffer for each LED? (I hope not)

B. Yes, it's a switch that connects the desired LED pair to ground. The "LFO" terminal is the activator and it's connected to a grounded switch too. I tried the isolated-grounds approach before with a PCB with 2 dedicated grounds for audio and LFO. I did it differently this time just to have a smaller PCB. Which is the capacitor that bypasses the flasher?
A long way is the sum of small steps.

R.G.

Quote from: Labaris on May 07, 2013, 08:52:27 PM
A. A "low-current way would be to use higher resistor values for the oscillator?
One way would be to multiply the resistors by ten and divide the capacitances C6 and C10 by ten. This lowers the current and hence current changes the circuit does by about the same factor of ten, without changing the voltages much if at all.

QuoteI'm confused with the concepts involved in this, because the supply voltage is reached anyway since it's oscillating, am I wrong?
You're right, the oscillator bangs into its limits near ground and +V. However, you're wrong in thinking this has anything to do with the currents. A voltage change can involve any current change at all, from nanoamperes to mega-amperes, same voltage change. Your current is ticking. The tick is almost certainly either capacitive coupling or coupling of a voltage jump because the sudden change of current in a ground wire was picked up and amplified by your circuitry sharing the same ground wire (note that "wire" is the same as "low value resistor").

It is common for electronics beginners to be confused by ground noise since they are trained to think of voltages and in grounding you have to think in currents and where they flow.

QuoteLimited slew-rate means "trapezoid" waveforms? Or this buffers you mention would do the job of limiting voltage changes? Should I need a dedicated buffer for each LED? (I hope not)
Trapezoidal is one way to look at it. If you happened to be getting capacitive coupling, instead of ground current coupling, then the degree of coupling depends on the small capacitances between parts and the frequency content of the signals being coupled. Signals with truly vertical rise and fall edges have nearly infinite frequency content. Slowing down the edges lowers the frequency content and reduces the ability of stray capacitances to conduct the lower frequency signal content. Trapezoid is one way. Slow-response buffers is another. You can use fast buffers, and only one buffer, if your oscillator has slower rise and fall times.

QuoteB. Yes, it's a switch that connects the desired LED pair to ground. The "LFO" terminal is the activator and it's connected to a grounded switch too. I tried the isolated-grounds approach before with a PCB with 2 dedicated grounds for audio and LFO. I did it differently this time just to have a smaller PCB.
Details of where the ground currents flow matter.
Quote
Which is the capacitor that bypasses the flasher?
C5.

If making C5 100uf makes it all work, why not make it 100uF and get on with the next problem?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PRR

R11 looks awful big.

What is current demand of a '358? Something like 3mA-4mA? That much current flowing in 820 ohms is around 3V drop. Starting from 9V you are already down to 6V. IIRC chips like '358 don't work good below 7V (a basic Zener drop).

C10 is very dubious..... a capacitor right on the output of an opamp makes it very unhappy. It should oscillate without it.

With those values for R16 R17 R18 I don't see any need for a buffer, transistor or even IC2B. IC2A should pull those loads fine (if it gets ample supply voltage, if it isn't slugged-down with 47u hanging on its output).

A buffer (IC2B is fine) is needed if you want the *triangle* wave at pin 2. And a triangle is less likely to throw switching clicks.
  • SUPPORTER

Labaris

Quote from: R.G. on May 07, 2013, 10:25:54 PM
Quote from: Labaris on May 07, 2013, 08:52:27 PM
A. A "low-current way would be to use higher resistor values for the oscillator?
One way would be to multiply the resistors by ten and divide the capacitances C6 and C10 by ten. This lowers the current and hence current changes the circuit does by about the same factor of ten, without changing the voltages much if at all.

Done, but the tick didn't change very much.

Quote
Quote
QuoteI'm confused with the concepts involved in this, because the supply voltage is reached anyway since it's oscillating, am I wrong?
You're right, the oscillator bangs into its limits near ground and +V. However, you're wrong in thinking this has anything to do with the currents. A voltage change can involve any current change at all, from nanoamperes to mega-amperes, same voltage change. Your current is ticking. The tick is almost certainly either capacitive coupling or coupling of a voltage jump because the sudden change of current in a ground wire was picked up and amplified by your circuitry sharing the same ground wire (note that "wire" is the same as "low value resistor").

It is common for electronics beginners to be confused by ground noise since they are trained to think of voltages and in grounding you have to think in currents and where they flow.

Ok, I get that. How do I separate the grounds? Would be useful to have 2 ground planes in the PCB with 2 separate connections to the ground of the pedal (DC jack)?

Quote
QuoteLimited slew-rate means "trapezoid" waveforms? Or this buffers you mention would do the job of limiting voltage changes? Should I need a dedicated buffer for each LED? (I hope not)
Trapezoidal is one way to look at it. If you happened to be getting capacitive coupling, instead of ground current coupling, then the degree of coupling depends on the small capacitances between parts and the frequency content of the signals being coupled. Signals with truly vertical rise and fall edges have nearly infinite frequency content. Slowing down the edges lowers the frequency content and reduces the ability of stray capacitances to conduct the lower frequency signal content. Trapezoid is one way. Slow-response buffers is another. You can use fast buffers, and only one buffer, if your oscillator has slower rise and fall times.

I'd like to use the simplest solution for this particular design, but I also want to learn the concepts involved. The "response speed" is a parameter of the chip?

Quote
QuoteB. Yes, it's a switch that connects the desired LED pair to ground. The "LFO" terminal is the activator and it's connected to a grounded switch too. I tried the isolated-grounds approach before with a PCB with 2 dedicated grounds for audio and LFO. I did it differently this time just to have a smaller PCB.
Details of where the ground currents flow matter.
Asked above

Quote
Quote
Which is the capacitor that bypasses the flasher?
C5.

If making C5 100uf makes it all work, why not make it 100uF and get on with the next problem?


Rising the value of C5 doesn't make significant changes. I don't know; it's a very unstable design. It behaves different with different power supplies. Sometimes C5 fixes it all, sometimes not. Sometimes C10 is the solution. Making C10 100uF alters the waveform too much for what I need.
A long way is the sum of small steps.

Labaris

Quote from: PRR on May 09, 2013, 02:17:25 AM
R11 looks awful big.

What is current demand of a '358? Something like 3mA-4mA? That much current flowing in 820 ohms is around 3V drop. Starting from 9V you are already down to 6V. IIRC chips like '358 don't work good below 7V (a basic Zener drop).

Ok, what's a good value? What's the criteria for picking that value? This a current limiting resistor isn't it? It forces the chip to get current from C5, am I right?

QuoteC10 is very dubious..... a capacitor right on the output of an opamp makes it very unhappy. It should oscillate without it.

C10 in fact doesn't change the oscillation, it just makes the tick quieter and the drops of the waveform less "vertical". Does this cap contribute to the instability observed in the whole pedal?. What happens now when in the "flashing state" of the pedal, all switches start to pop and microphonics seem very obvious. When switched back to non-oscillating everything get quieter and normal.

QuoteWith those values for R16 R17 R18 I don't see any need for a buffer, transistor or even IC2B. IC2A should pull those loads fine (if it gets ample supply voltage, if it isn't slugged-down with 47u hanging on its output).

I changed all values proportionally and now I got the same LFO frequency, but no apparent change in the tick.

Quote
A buffer (IC2B is fine) is needed if you want the *triangle* wave at pin 2. And a triangle is less likely to throw switching clicks.

A simple buffer with no loads on the output will generate triangle waveform on pin 2?
A long way is the sum of small steps.

Labaris

Now I tried with the triangular wave from pin 2 (using ICB2 as buffer). The flashing is ok, but the voltage is very low compared to 9V, so when I stop the oscillation the brightness of the LED is too different.
Ticking is still a problem...
A long way is the sum of small steps.

toneman

That's the strangest LFO circuit I've seen  ???

You have, what looks like, a low pass "pi" filter from out to in  ???


Usually, the timing cap goes from output to the neg input.

Where did you find the schematic  :icon_question:  :icon_question:  :icon_question:

With unipolar LFO's (9V), the triangle wave is usually centered at the midpoint (4.5V).

inquiring minds
T

  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

Labaris

Quote from: toneman on May 11, 2013, 10:09:05 PM
That's the strangest LFO circuit I've seen  ???

You have, what looks like, a low pass "pi" filter from out to in  ???

Usually, the timing cap goes from output to the neg input.

Where did you find the schematic  :icon_question:  :icon_question:  :icon_question:

With unipolar LFO's (9V), the triangle wave is usually centered at the midpoint (4.5V).

inquiring minds
T


Hi.

The original circuit comes from here

C10 is an attempt to make the square wave less "sharp" and get the ticking off. R11 and C5 are there making a current reserve for the chip (trying to reduce the ticking too).
Thanks for the tip on the triangle wave, didn't see it before in the article. My goal is to create an LFO with separated voltage peaks to create the illusion of flashes (longer OFF times related to ON times), and get the same brightness in both modes of operation (oscillating mode and no-oscillating mode).
A long way is the sum of small steps.

Labaris



So, here's an update of the circuit.
I left the original circuit because it never stopped ticking and I picked the LFO of the phase 45.
Some values are different and the LED-driving stage is added.

The problem I'm getting with this design is that the brightness of the LEDs when flashing is too low compared to not-oscillating mode (LFO switch open).
Ticking went home, so that's great with this one, but I need to get more brightness when oscillating.

I guess I could lower the values of R14 and C10 to let more current flow to the LEDs and store less energy in every cycle (which maybe is the reason for a little too rounded waveform)

I got only one (white) LED connected right now and the voltages through it are in the [1.6 - 2.3]V range.
Voltage in C10 is in the [1.8 - 2.8]V range.

Thanks
A long way is the sum of small steps.

PRR

> Voltage in C10

I don't see a C10?

Is the R11 R12 unbalance necessary somewhere else in the circuit?
  • SUPPORTER

Labaris

Quote from: PRR on June 11, 2013, 12:24:43 AM
> Voltage in C10

I don't see a C10?

Is the R11 R12 unbalance necessary somewhere else in the circuit?

I meant C6.
I measured currents in the LED. With no oscillation: 0.6mA. Oscillating: 21uA

The R11/R12 unbalance VD is used only here, just trying to get a shorter on-time for the LED.
A long way is the sum of small steps.