Ticking optical tremolo problem, sigh...

Started by ElectricDruid, November 01, 2022, 01:44:15 PM

Previous topic - Next topic

Vivek

#20
Does PDM need a low pass filter to convert from digital to analog ?

I was expecting to see a cap on the schematic with StompLFO. That cap would remove high order harmonics, I suppose



Could you please post oscilloscope screenshot of voltage across vactrol LED ?

ElectricDruid

Quote from: Vivek on November 04, 2022, 01:12:45 PM
Does PDM need a low pass filter to convert from digital to analog ?
Not if it's feeding an LED. PDM or PWM are good ways to control the brightness of an LED, and they're digital. The slow response of the LDR acts as the lowpass filter. In the case of the StompLFO, the output pulses are at roughly 1MHz (this is only strictly true at the midpoint voltage, because of how PDM works), so the lowpass effect of the LDR is *massive*. No LDR is ever going to show "ripple" at 1MHz!

Quote
I was expecting to see a cap on the schematic with StompLFO. That cap would remove high order harmonics, I suppose
Filtering the LFO back to analogue and then adding more filtering to smooth the waveform, and then using that to drive an LED would be a *lot* more work!
Which is not to say it couldn't be done that way, just that I don't think it's *efficient* and I'd like to avoid it if at all possible.

Quote
Could you please post oscilloscope screenshot of voltage across vactrol LED ?
I'll try and do some stuff in the workshop this weekend and get some of these scope shots you'd like to see, Vivek.


puretube

#22
You surely don`t have mixed the "digital" and the "audio" ground-returns on their way back to the power-supply?
Dunno whether your circuit is on breadboard or else.
Anyway: if there are wires leading to V1.1, twist them and keep them away from (or at right angles to) the signal-path.
Or: don`t have parallel V1.1-traces near any audiosignal-traces on a PCB without some ground-path (or plane) between them.
Maybe you can swap the positions of V1.1 and R14. In this case one end of the opto-LED (and its wiring/tracing) is directly grounded.
In the latter case, maybe even a small integrating cap (100p - 10n) across the LED can help, without messing up uP1`s output, or completely ruining the PWM-signal.
And: maybe the usual 100n cap directly soldered to pin1 & pin8 of uP1 can help.

Fancy Lime

Good point about separating the grounds. Hasn't even occurred to me despite having had similar ticking problems with breadboard tremolos due to the relatively high ground impedance you get with less than ideal ground routing on the breadboard. Optimizing that may indeed help.
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Vivek

If grounds were the issue

Then in experiment where LDR was replaced by fixed resistor

There should still have been ticking

But there wasn't.

ElectricDruid

Quote from: Vivek on November 05, 2022, 02:23:48 PM
If grounds were the issue

Then in experiment where LDR was replaced by fixed resistor

There should still have been ticking

But there wasn't.
Quite so, Vivek. Also the StompLFO doesn't actually output the LFO signal, so *there is no square wave to tick* at that point. The output from the uP is a PDM signal at roughly 1MHz. Which is definitely *not* what I'm hearing.

The only place the Square wave exists as a square wave at all is at that LDR.

For the record, the circuit is partly on a Rev.1 PCB, with the critical parts looped off onto a breadboard for experiments. If I get some time in the workshop tomorrow I might try some more radical things to see what makes a difference, but I've got a wall to build too!



antonis

#26
Tom..
For third (or more) time..

Did you try to place a shunt cap across Vactrol and bias resistor..??
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

puretube

Quote from: antonis on November 05, 2022, 05:17:15 PM
Tom..
For third (or more) time..

Did you try to place a shunt cap across Vactrol and bias resistor..??

Wouldn`t that resemble a treble oll-off?

Vivek

I too feel that there should be a LPF or integration cap across vactrol LED and its CLR

and that possibly would convert digital pulses to analog in a smoother way than integration by LDR.


But I am worried about the cap getting charged to the Vf of the LED. Maybe we need a larger discharge resistor across the integration cap, to adjust release time.



Another simple test could be to send square pulses to the LED in a different way, like 555, to check if the StompLFO is part of the issue

puretube

Okay, checked the vactrol datasheet: LDR can go up to 10M when dark, though that`d take 10s, which would be a very slow LFO-rate, I admit.
You say it goes down to 1k. This means the max. attenuation is @ R7 to RV1.2 = 47k to 1k (=max. "silence", when the vactrol`s LED is full on).
With a 1V signal at the output of the first opamp that leaves 21mV at the second opamp`s input.
Max. "loudness", when the vactrol`s LED is dark (=min. attenuation) would be 47k to 10M, which leaves 999mV ("full volume").
That`s an "on/off volume-ratio" of 47.6/1.
If you wire a 220k shunt resistor across V1.2 to limit its max. resistance (when dark), that`d leave ~ 824mV ("full volume").
With the LED full on, the attenuation remains leaving 21mV of "silence".
That`s an "on/off" volume-ratio of 39.2/1.
Enough for a convincing Optical Tremolo? Guess so.
This alleviates the sensitive high-impedance scenario at the non-inverting input of IC1.2
from ~10M to less ticking-sensitive 220k.
Your observance that ticking is less severe at higher tempos imho derives from the fact that the LDR doesn`t have much time to "breathe" back to high resistance, but stays in lower regions ...

amptramp

I have a Univox amp that uses a phase-shift oscillator as a tremolo LFO.  It doesn't have a problem with ticking because current variations on the power supply do not change suddenly - the current drain follows the inverse of the output voltage waveform.



The tremolo oscillator is in the lower left of the schematic and it works.  There is a mistake on the diagram in that the junction of the 330K and 39K resistors goes to the base, not the collector as shown.  You could take the output to a vactrol and use the circuit to drive the LED portion of it if you want to maintain isolation between the signal path and the LFO but in this application, there was no need.  The second transistor acts as a variable shunt across the 100K input resistor and linearity doesn't seem to be a problem.  The unidentified resistor coming from the collector to the intensity control is select-on-test.  The jack goes to a shorting switch that turns the tremolo off.

Most amps use phase-shift oscillators for tremolo and many don't bother with vactrol isolation because they get perfectly good results without it.

ElectricDruid

The phase-shift oscillator above produces a sine wave, right?

Sine waves are *easy* to do with no ticking, since there's no sharp edges. I've got sines, triangles, random slopes, and various other waveforms working fine - no ticking. Even one of the ramps is ok, since the problem only turns up on the rising edge. So the ramp-up is ok, because the abrupt change is a *falling* edge (and the LDR takes ages to switch off and smooths it effectively), whereas the ramp-down is somewhat problematic because the abrupt change is a rising edge and the LDR switches on pretty fast and that seems to cause the issue.

Which makes me think that one experiment should be a different vactrol/LDR.

The StompLFO isn't like a typical schmitt trigger-integrator LFO where you've got an op-amp that spends its life crashing from one rail to the other and causing clicks all over the place, even if you only use the triangle output. The output is completely different and very high frequency, and the uP that produces it is running at 8MHz, so *processor* noise is possible, but certainly won't be heard as LFO ticks.

Quote from: antonis on November 05, 2022, 05:17:15 PM
Tom..
For third (or more) time..

Did you try to place a shunt cap across Vactrol and bias resistor..??
When I get a chance to try it, I'll definitely give it a try and let you know, Antonis. I'm not ignoring you, I'm just busy!

I've got quite a list of further experiments to try, but workshop time is in short supply. Sorry. Many of you have been very helpful and made all sorts of good suggestions, but I honestly haven't had a chance to try them yet.





anotherjim

Is there anything in the way the code cycles the waveform that can produce a pin change at the start or end of the cycle? It would be the only thing I can think of that could create a click at the LFO frequency - but I would have thought something like this would have occurred before.

ElectricDruid

Later Update, April 2023

I have eventually found time to go back to this  It was indeed the ground paths being insufficiently separated. The other things (AC vs DC impedances, offset voltages, etc etc) are somewhat helpful, but as soon as you fix the ground paths, the problem goes away and they become irrelevant.

I tried it with a couple of my Rev.1 PCBs, using the digital side of one board, and the audio side of the other, with only the vactrol joining the two boards together, LED wired to one board, LDR wired to the other. The two PCBs shared a power supply, and the grounds only united back at the power supply. Instant solution! No ticking whatsoever!

So the moral of the story is to separate your analogue and digital grounds. But we all knew that, right?!? And I was somehow being lazy and thought I'd get away with it...;)

Now I need to do a proper Rev.2 layout with better grounding and I might be able to declare this one finished!

Hypernurbs

May I ask why you opted for the vactrol's resistance side going to V-ref instead of in series with the signal? Because of noise generated by the vactrol?


ElectricDruid

Good question, and I don't have a good answer. "It seemed logical at the time" is the honest answer. I was looking for a way to make a divider, so I came up with one. I don't think I really stopped to consider other possibilities once that was done.

Would one way around would be much better than the other? I can see it might be worth trying it both ways.




Hypernurbs

I breadboarded your input and output stages and combined them with my harmonic tremelo filter stages and found the input stage a bit too mid-rangey, as you mention in the schematic. It might get exaggerated because of the parallel stages, I'm not sure.
Is there a way to minimize the mid-rangey side effect? I suppose it's because of the cap to ground connected to the feedback loop?

ElectricDruid

Quote from: Hypernurbs on April 18, 2023, 03:25:22 PM
I breadboarded your input and output stages and combined them with my harmonic tremelo filter stages and found the input stage a bit too mid-rangey, as you mention in the schematic. It might get exaggerated because of the parallel stages, I'm not sure.
Is there a way to minimize the mid-rangey side effect? I suppose it's because of the cap to ground connected to the feedback loop?
There are two caps in that feedback loop, and both of them are significant. Referring to this schematic:

https://electricdruid.net/images/minitrem/MiniTremSchematicRev2Pg1.jpg

C6 sets a highpass cutoff that removes bass. Increase this to increase the bass response and fill in the bottom end.

C7 sets a lowpass cutoff that removes treble. This interacts with the Boost control, and has most effect at maximum boost. Decreasing the value of this cap will reduce the amount of treble reduction.

These two together were intended to *shape* the frequency response, but since I never sorted out the ticking until now, I never got onto the "fine detail" stuff of tuning the frequency response to get it how I wanted it. One of my paper notes says "Too honky! Adjust!" so I had this in mind.

The C6/R5 47n/10K values give a HPF at 338Hz. 330n or greater for C6 gives you a full bass range (<50Hz).
The R6+PR1/C7 values give a maximum lowpass at around 3.4Khz. Reducing C7 to 220p or less should give you pretty much full treble (roughly 15Khz with 220p).

Hypernurbs

Thanks. Good you solved the ticking problem!

Hypernurbs

#39
Alright, so I tried your suggestions and yes, I got full frequency response now but... mine is ticking now too! :icon_lol:  :icon_rolleyes: In fact, the ticking has a lot of oomph as well.
Could be that the circuit is still on breadboard. I don't have the ticking issue with my first design, with the gain boost in the last stage.

Now from what I've seen from conventional tremelo designs is that the boost is most always done in the last stage. I wonder if boost in first stage has something to do with it?
I was figuring, the boost in front, especially with a tremelo with filtering like a harmonic trem, it would be better in terms of noise reduction, so that's why I was keen on trying out your design Tom.

Now I'm confused lol...