As I can see, I can use a voltage reference to make a DC offset, and I can make the span lower or higher for my taste, however I can't seem to find a solution to put this thing going between 3.5 and 4.6 Volt... With a Zener I feel like I would be badly served because mine is 5.1 Volt.. Is there any way I can get around that? Maybe doing a voltage divider from the Zener just like the P90, but without the whole DC bias stuff?
The 100k and 56k set the Schmitt trigger thresholds.
For you +/-15V case in the link:
- Supply +/- 15V
- Opamp output swing about 1V less than power rails, so +/-14V
- Schmitt trigger voltages are the voltages at the out of the 56k + 100k divider
Vt = +/- 14 * 56k / (100k + 56k) = +/-5.02V ; that agrees with you simulation.
A slightly different way to look at it is to separate the DC level and the *change* in the output level.
The input to the divider swings -14V to 14V, a total change of 28V.
The change in voltage at the output of the divider is 28V * 56k / (100k + 56k) = 10.05V ; which agrees with 2x5.02V
The change in the Schmitt trigger sets the change in threshold and also sets the change in the peak to peak output of the triangle wave.
For your 9V case with DC offset,
You currently have 3.68V to 6.16V which is a change of 2.48V
But you want 3.5V to 4.6V, which is a change of 2.1V
You want to reduce the change by a factor of 2.1/2.48 = 0.847.
The way to reduce the swing at the output is the modify the Schmitt trigger levels. You want to reduce them
If we go back to your +/- 15V simulation.
The 100k + 56k divider sets the Schmitt trigger levels. To reduce Schmit trigger them we could for example decrease the 56k.
If you set the 56k to 43.7k the voltage change at the output of the divider is,
28V * 43.7k / (43.7k + 100k) = 8.51V
This reduces the swing by a factor of 8.51/10.05 = 0.85.
If you modity the value in you falstad similation you will see it works.
If you use these new values on you 9V circuit you will find the change in the output is close to what you want. It will be a bit low because the opamp doesn't swing to the full supply and this affects a 9V circuit more than a +/-15V circuit. So you may need in increase the value from 43.7k.
Once you get the change in the output correct you can use the DC offset to shift it so the actual voltages are where you want them.
The way I've describe it above is to take something that is nearly correct and tweak it. You can actually calculate the required divider ratio and the 43.7k resistor from maths without ever build a trial circuit. Look up how to calculate Schmitt trigger levels. I think I already explained this.
I mentioned this before, when you use the DC offset you will find the output duty cycle changes. The time to rise-up is no longer the same as the time to fall-down. That's another reason why the MXR pedal separates the DC bias and the LFO.