0
\$\begingroup\$

What is simplest way to convert digital signal 1 0 0 1 0 0 1 0 0 (i.e. 1/3 of time its ON and 2/3 of time its off) into sinusoidal signal of same frequency, which can vary from 3 KHz to 6 MHz?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ PLL (Phase-Locked Loop) or DDS module is needed, not a simple DAC, since the only information given is timing between cycles. A plain DAC by itself can't interpolate a whole sinewave. \$\endgroup\$ – MarkU Aug 5 '15 at 10:17
1
\$\begingroup\$

If you don't care too much about being exactly sinusoidal, you could just filter the signal to make it less square.

If you don't mind a small lag in response time, and losing phase information, you could filter it very aggressively, say at a few hundred Hz, effectively turning the input PWM into a voltage. You could then apply that to a voltage-to-frequency converter circuit.

Otherwise, you'd have to build an analogue PLL, possibly using a PLL IC: http://www.sentex.ca/~mec1995/gadgets/pll/pll.html

Or if you don't mind software, interpret the signal with a microcontroller/DSP and output a matching sine (generated with a table or CORDIC) through a DAC.

\$\endgroup\$
  • \$\begingroup\$ Filtering won't work over a 2000:1 range. And voltage-to-frequency conversion won't work if the duty cycle of the input signal is a constant. Your first useful suggestion is in your third paragraph. \$\endgroup\$ – Dave Tweed Aug 5 '15 at 11:25

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.