-1
\$\begingroup\$

enter image description here

I have a sawtooth oscillator, and I am trying to get it so that there is an average voltage of 0, so that I can later waveshape. Any idea how I can achieve this?

UPDATE: I have added a filter to the output, which has given the required output. However it will only run for a few seconds and then experiences an error. Is this a simulation glitch or is something connected wrong?

enter image description here

\$\endgroup\$
2
\$\begingroup\$

You can't have a \$V_{rms}\$ of 0 while also having a waveform that has nonzero amplitude, so I'm assuming you mean an average voltage of 0. In that case, consider adding a capacitor to your output, \$10-100\mu F\$ will likely work, followed by a large resistor to ground, such as 10k.

schematic

simulate this circuit – Schematic created using CircuitLab

This creates an RC high pass filter with \$f_c=10Hz\$ which is much smaller than your frequency of \$1kHz\$, so it should introduce minimal distortion to your signal.

\$\endgroup\$
  • \$\begingroup\$ Yes that worked! However the simulation only runs for a seconds and then an error cancels it. Any thoughts? Ill add a photo of the simulation \$\endgroup\$ – konobyBYnight Mar 24 '18 at 19:55
  • \$\begingroup\$ The photo you showed looks exactly how I'd expect it would. Do make sure that you haven't stuck the capacitor in the opamp feedback path \$\endgroup\$ – C_Elegans Mar 24 '18 at 19:57
  • \$\begingroup\$ I have updated the post, showing how it is connected. It is also worth mentioning that the frequency of the sawtooth will change. At its maximum of 1khz, the wave takes about 0.1s to settle. is this a problem? In fact, there is only an error at the lower frequencies \$\endgroup\$ – konobyBYnight Mar 24 '18 at 20:40
  • \$\begingroup\$ Also, you mentioned a cut off frequency of 10Hz, surely the cut off of a HPF needs to be higher than the highest required frequency (1khz) to avoid blocking desired frequencies ? \$\endgroup\$ – konobyBYnight Mar 25 '18 at 0:11
  • \$\begingroup\$ @JackTranckle a high pass filter passes frequencies higher than fc and attenuates frequencies lower than fc (slightly more complicated than that). The waveform shown above illustrates that it’s working correctly, but for some reason the simulation errors. \$\endgroup\$ – C_Elegans Mar 25 '18 at 0:21
0
\$\begingroup\$

The only way to get an output voltage of 0 VRMS is to maintain a zero volt output. If the output deviates from zero you will have a non-zero RMS voltage.

Maybe you mean an average or mean voltage of 0 V? If so, then please update your question.

\$\endgroup\$
0
\$\begingroup\$

To answer the question in your update: I don't really see any issues with your circuit itself, but maybe try disconnect the ground from terminal B on the oscilloscope, as that might be causing the floating B+ terminal to enter the SPICE simulation.

If that doesn't work, I recommend that you use the convergence assistant to resolve the error (a prompt should pop up when the simulation breaks). If that doesn't work, it could be something to do with your simulation settings (e.g. software tolerance). Follow the various steps listed on the National Instruments website to adjust simulation settings to accommodate for a simulation error: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019RqVSAU

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.