How to Convert Analog Input to PWM Output Easily


Project background: I'm building a plasma speaker. There are several examples online using a TL494 power supply IC and feeding audio into its feedback pin to get sound out. A sample schematic: enter image description here

I'm wondering if there is a better way to do this. I'm a hobbyist, so I'm not terribly interested in the absolute cheapest method since it's a one-off, and I'll also be tolerant of potentially dangerous or sketchy things since I don't have to get certification for anything.

I have access to a few micros, but little experience with them. I did get a Launchpad, and my understanding is one of the MSP430s that came with it has a built-in ADC. While going from analog to PWM seems a little underwhelming for a microcontroller, I do have an additional requirement that I must limit my upper duty cycle to remain below about 95% to prevent saturation of the flyback transformer. Operating frequency is 120-150khz.

To summarize my question:

Are there more straightforward ways to go from a high-impedance 1V P-P input signal to a 150khz output signal with proportional PWM, capped at a maximum 95% duty cycle? Unless built natively into the device, I will be building my own output stage to drive the power MOSFET.

Best Answer

Amusingly enough, I was literally just looking at single-chip PWM generators for my job.

If interest to you might be the Linear LTC6992 - TimerBlox: Voltage-Controlled Pulse Width Modulator (PWM)

You give it a 0-1V input, and you get a PWM pulsetrain out. It can also internally limit the duty cycle to 5%-95%, or 0-100%.

enter image description here

You would need a op-amp or two to scale your input to the chip's input range, but you would need to do that anyways, because very few ADCs are bi-polar (assuming you were going the microprocessor route).

Looking at the reference schematic you provided, I would also recommend using a MOSFET driver of some sort, to improve switching times, if nothing else.
It would also likely provide level-shifting for the gate-voltage.