Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simple sawtooth generator schematic simulation question

Lucky-Luka

Member
I've tried to play a bit with the passives values of this circuit and I obtained max 2kHz freq signal.
Do you think that using this circuit I can obtain a 70kHz signal?
Would you suggest another kind of simple circuite for the purpose?
Thanks
 

Attachments

  • sawtooth-wave-gen.asc
    1.4 KB · Views: 165
That circuit probably can be ramped up to 70 kHz, but the vertical edge of the sawtooth might not be as vertical as you need. Better to have the Q1 / Q3 pair drive a transistor specifically to discharge C1.

I would think that a triangle wave would work better, if for no reason other than it does not require a super-fast slew rate from its components.

ak
 
That circuit probably can be ramped up to 70 kHz, but the vertical edge of the sawtooth might not be as vertical as you need. Better to have the Q1 / Q3 pair drive a transistor specifically to discharge C1.

I would think that a triangle wave would work better, if for no reason other than it does not require a super-fast slew rate from its components.

ak
For a class-D amplifier he needs a high quality triangle wave, not a sawtooth - assuming it's for the A2D conversion?.

I've no idea what his circuit is?, as he didn't post it in a visible format (such as PNG).
 
Its an LTC Spice file,

1688982622777.png


Regards, Dana.
 
For a class-D amplifier he needs a high quality triangle wave, not a sawtooth - assuming it's for the A2D conversion?.
Depending how much total harmonic distortion is tolerable in the re-constituted audio, triangle (or sawtooth) quality may not be critical.
 
Discharging the timing capacitor through what is essentially an SCR will add distortion to the recovered audio waveform.

Even if Q3's Vsat is a perfectly constant, the current through Q1 will decrease as the cap voltage decreases, causing its Vbe to change, causing its effective resistance as seen by C1 to change, adding a non-linearity to the C1 discharge current, adding a small exponential bend to what should be a straight-line discharge edge. This divergence from a straight line will show up at the output of the comparator as a small error in the output pulse width for that instantaneous audio signal voltage.

ak
 
Last edited:
Your posting of the same circuit in AAC with C1=2.2nF oscillates at about 70kHz in the simulation.
Why did you increase it to 10nF here?
 
The only possible advantage I see for using a triangle-wave over a sawtooth is possibly lower distortion, but that can likely be significantly reduced by some negative feedback from the demodulated output to the audio input.
 
Out of curiosity I ran a simple sim to explore how class D distortion in a re-constituted 500Hz audio signal is affected by PWM triangle wave shape. I used a 'perfect' triangle (blue) and a shark-fin (yellow) for comparison. Like this :
Triangle&Sharkfin.png

The results were a total harmonic distortion figure of 3.84% when using the perfect triangle and 3.97% when using the shark-fin. Surprisingly little difference.
Here's the harmonic content of the re-constituted audio. Most of the harmonic energy is in the 8th harmonic for some unknown reason:
Harmonic content.png

(For anyone wanting to play, I've attached my asc file for the sim.)
 

Attachments

  • PWMdistortion-compare.asc
    2.2 KB · Views: 129
Surprisingly little difference.

Not surprised.

Both halves of the shark fin are exponentially curved, so at any height above 0 the distance between two points on the fin and two points on the triangle are almost exactly equal.

The reason they are not exactly equal is that the rising edge of the fin is a charging exponential (heading toward being asymptotically flat at the positive peak), while the falling edge is a discharging exponential (heading toward being asymptotically flat at the negative peak).

If the shark fin were composed of two circular sections instead of two different exponential sections, the distortion figures for both waveforms would be identical.

ak
 
Okay.
So why not go to the smaller cap value to get the desired oscillation frequency?
 

Latest threads

New Articles From Microcontroller Tips

Back
Top