q about schmitt triggers

...and how to do so...
Post Reply New Topic
RELATED
PRODUCTS

Post

we know schmitt triggers are used for the "metal" on several classic analog hats, and that schmitt trigger oscillators are generally unipolar and equal cycle pulse waves. we also know that in some machines, these are XOR'ed in pairs, as per dozens of sources online.

i believe they are not XOR'ed in the dr110, the hats are 4 schmitt oscillators and white noise.

i've been attempting to emulate this by analysing my extensive samples from my heavily modified dr110... and then other schmitt trigger machines... generating pulses with various combinations of polarities, amplitudes, widths, et c. XOR and not... modeling diode softclipping.

my observation is there is some significant difference between schmitt trigger reality and summing four unipolar pulses. in my machine, when the pitch was raised (modification), the osc count would start to drop, which i expect was due to duty cycle. there's something in the combination of the oscs that is outside of the modulations i mentioned above.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

..the ic's clock rate jitter..?
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

Image

realised i had some rechargeable batteries and constructed my own high tech circuit probe :hihi:

tapped the oscs and the noise source directly. (the noise source is a shift register, it has a periodicity of around 1 second!!)
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

hey xoxos, what mods have you done to dr110?
same as 'resonant frequency', care to share some tips on
getting the work done? can heavily recommend circuitbenders'
dinsync mod kit, has transformed my dr110, i love this thing!!
kit well worth it for 30quid.
i'm loathe to start chopping into it, and need to figure out
what format i want it to end up as - rack seems a good idea,
these sounds are usable for anything -
(i've also been given a farfisa partner rhythm unit by novaflash
that appears to run off 12v -currently at 'separation stage',
figuring out what i want to keep from it; has separate sound and
circuit board - there's a preset sequencer in there- and i need
to find a case for it - have some pristine schematics for it)

Post

A schmitt-trigger is simply a comparator with hysteresis.

The oscillator works exactly like you'd expect any pulse generator to work and the hex ICs are just used to minimize parts count.

If you want to "model" this in software you'd do something like:

Code: Select all

struct schmtrig_osc_t
{
 float rc;
 float c_v;
 
 float threshold;
 float hysteresis;

 float output;

 float operator()()
 {
  c_v += (output - c_v) * rc;
  if (output > 0) {
   output = (c_v + hysteresis) < threshold ? 0.0f : 1.0f;
  } else {
   output = (c_v - hysteresis) > threshold ? 1.0f : 0.0f;
  }
  return output;
 }
};

schmtrig_osc_t osc;

in loop:
{
 mix += osc();
}
Sorry if the code doesn't work without modification, I just typed it directly without testing.

As you can see, we have a simple "lossy integrator". If you want to be more accurate you can use a more accurate integrator as desired. In most cases all you'd need to add would be different output levels and detection of the sub-sample position the output changes and anti-aliasing of that change.

The level of the integrator is compared to the threshold plus hysteresis.

You'll probably want to start with c_v = threshold = 0.5f. hysteresis = 0.25f. output = 0.0f.

c_v should oscillate forming a "lossy" triangle from 0.25 to 0.75.

Usually you'll find in the real-world circuit the charge/discharge rates are slightly different. (Usually because the threshold vs. the output levels are radically different. To get a square you'd need an exact 7.5v threshold and balanced hysteresis with 15v output.) You can deal with this by changing the output levels, rather than 0.0 and 1.0, use different values. "Square" those back to 0.0 and 1.0 or -1.0 and 1.0 when you actually use them.

(Most likely your pitch-mod creates a situation where the capacitor can not charge past the threshold level once you factor in hysteresis. Try using hysteresis greater than the output level in software, identical result.)
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

xoxos wrote:...and equal cycle pulse waves.
Just wanted to point out that is almost never the case. Usually the threshold is close to 1/2 of the supply but the threshold and hysteresis are variable.

Look at this datasheet for example: http://www.onsemi.com/pub/Collateral/MC ... .PDF&#8206;

The "off" voltage ranges from 4.6 to 9.8.

The "on" voltage ranges from 5.2 to 10.5.

Typical are 6.9 and 8.0.

Obviously to get a square wave you'd need 1/2 of 15v which is 7.5, which is what the typical on/off voltages would provide.

So, the duty-cycle of the output could be quite far from 50% and only will average "close to" 50%.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post Reply

Return to “DIY: Build it and they will come”