Neat. I hadn't seen the distinction between PWM and PDM before. That is pretty much exactly what I want to do, absent the zero crossings. Other posters here suggested a full wave rectification of the audio signal before the comparator step, and I think that is exactly what I want. My application doesn't require the negative portion of the audio to reverse the polarity of the output the way a Class D amplifier would. That way I can avoid the filtering by treating 0 volts in as 0% duty cycle out.
Thank you for the good suggestion. doug
Didn't find your answer? Ask the community — no account required.
J
John Nagle
You're working way too hard.
Take a look at "dimmer packs" like this.
formatting link
You can probably put together a system out of standard DJ/nightclub/ theatrical lighting parts for a few hundred dollars.
John Nagle
J
Jan Panteltje
On a sunny day (Thu, 2 Jul 2009 12:01:25 -0700 (PDT)) it happened "Doug B." wrote in :
There is an other possibility though. Looking from an artistic POV it could be that the artist wants the sine wave waveform to remain a sine wave, not a half wave, or double half wave. To make zero amplitude output with zero amplitude sine wave - while maintaining a sine wave form -, one could use a clamp circuit:
- C + slow sine -- opamp -- ||--------------------- | | --- | / \\ R --- | | | -------------------------------- 0V
The way this works, is that the bottom of the sine wave is clamped close to 0V, so if the sine wave is say 10 Vpp, then the output of this circuit will be from
0 to 10 V, if the sine wave is 0 Vpp, the output will be zero, and if the sine wave is 3 Vpp then the output will be from 0 to 3 V, and always the waveform will be a sine wave.
The C and R time constant are important. So is the diode voltage drop, if you use a germanium diode it can be a few hundred millivolts, that few hundred millivolts the signal will go negative. You can bias that diode a bit (making the anode a bit positive) to compensate perhaps.
Feed the output into the comparator with on the other side the ramp.
This also solves the problem with negative supply, as all signals are now positive, if you use an opamp type that allows the input to go all the way to the negative rail (LM324?).
The opamp in the input is to create a low impedance, and to get a larger input signal so as to have less problems with the diode drop.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.