A PWM signal generated by a PC

Reloadron

Joined Jan 15, 2015
7,892
Congratulations on that note. I have done that and the thought of using LtSpice never even crossed my mind. :(

Glad it came together for you.

Ron
 

crutschow

Joined Mar 14, 2008
38,533
It order to get that low frequency through the audio output of the PC, I think you will have to record a PWM version of the signal, since I believe the PC audio output is AC coupled and will severely attenuate and distort the low frequency ramp.
 

Reloadron

Joined Jan 15, 2015
7,892
It order to get that low frequency through the audio output of the PC, I think you will have to record a PWM version of the signal, since I believe the PC audio output is AC coupled and will severely attenuate and distort the low frequency ramp.
Thinking about it I believe that would be correct.

Ron
 

crutschow

Joined Mar 14, 2008
38,533
Here is a way to generate the desired PWM wav file with LTspice.
It uses an LTC6992 to generate the PWM signal.
The PWM frequency is about 200Hz for the resistor values shown.
The PWM output is inverted from the input so the modulating voltage from V1 starts at the high voltage and goes low (it has an approximate 0.9V to 0.1V MOD input for 0% to 100% duty-cycle at the OUTput).
The V(out) signal is the averaged PWM signal from the R3C1 low-pass filter.

upload_2017-6-3_12-49-59.png
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
18,117
That's what I was recommending to do with the computer - produce the PWM at some audio frequency, output through the audio port, then LPF the output to retrieve the triangle wave.
 

Thread Starter

Martino Chiro

Joined May 1, 2015
128
Many thanks,
i enclose what i get, reproducing the simulation proposed by Crutschow.
I suppose also what stated by Reloadron and Wayneh is correct: the audio output is more likely to reproduce
correctly the PWM output and not the (nearly) DC triangular signal with a period of 60sec.
Now is the time (for me) to put a jack in the PC and, with the right cable (and an RC group), see with an oscilloscope what happens.
 

Attachments

Top