Searching \ for 'DC level to 1KHz sine wave conversion.' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=sine
Search entire site for: 'DC level to 1KHz sine wave conversion.'.

Truncated match.
'DC level to 1KHz sine wave conversion.'
1998\02\12@124855 by

My latest project involves a PIC16C73A , which amongst other things,  drives
a serial 16bit DAC. This gives me a control voltage  programmable from 0  to
10V.
I also need to generate a sinewave of nominally 1KHz. The p-p amplitude
must track the DAC voltage and be always 10 percent of its DC  voltage.
It has to be a reasonably clean and stable sinewave.
Input voltage range varies from   0.5 to  10V.
Sine wave output will vary 0 to 1V p-p for the above input range. Accuracy
better than 3%.
Sine wave Total Harmonic Distortion better than 5%
Sine wave frequency accuracy 1Khz +/- 100Hz
Output current 5mA max.
Power supply -  I have +15V, -15V and +5V available.

For example if I have a DC input of 3V the sinewave generator should output
300mV peak to peak at 1Khz.
this 300mV should be accurate to 309mV max or 291 mV minimum.

I am considering an MF10 switched capacitor filter with clock 128 times that
of the 1KHZ output but am looking for ideas

All ideas welcome. Must be reasonably low component count but parts cost is
not paramount for a change!

Regards,
Gerry Cox
did you look into magic sinewaves?
http://www.tinaja.com/magsn01.html
seems pretty interesting to me

Peter

----------
> From: GERRY COX <gcoxDEK.COM>
> To: PICLISTMITVMA.MIT.EDU
> Subject: DC level  to 1KHz sine wave conversion.
> Date: Thursday, February 12, 1998 12:20 PM
>
> My latest project involves a PIC16C73A , which amongst other things,
drives
> a serial 16bit DAC. This gives me a control voltage  programmable from 0
to
> 10V.
> I also need to generate a sinewave of nominally 1KHz. The p-p amplitude
>  must track the DAC voltage and be always 10 percent of its DC  voltage.
> It has to be a reasonably clean and stable sinewave.
> Input voltage range varies from   0.5 to  10V.
> Sine wave output will vary 0 to 1V p-p for the above input range.
Accuracy
> better than 3%.
> Sine wave Total Harmonic Distortion better than 5%
> Sine wave frequency accuracy 1Khz +/- 100Hz
> Output current 5mA max.
> Power supply -  I have +15V, -15V and +5V available.
>
> For example if I have a DC input of 3V the sinewave generator should
output
> 300mV peak to peak at 1Khz.
> this 300mV should be accurate to 309mV max or 291 mV minimum.
>
> I am considering an MF10 switched capacitor filter with clock 128 times
that
> of the 1KHZ output but am looking for ideas
>
> All ideas welcome. Must be reasonably low component count but parts cost
is
> not paramount for a change!
>
> Regards,
> Gerry Cox
> My latest project involves a PIC16C73A , which amongst other things,  drives
> a serial 16bit DAC. This gives me a control voltage  programmable from 0  to
> 10V.
> I also need to generate a sinewave of nominally 1KHz. The p-p amplitude
>  must track the DAC voltage and be always 10 percent of its DC  voltage.

Do you need the control voltage for anything else, or are you just looking
to have a finely-adjusted sinewave amplitude?  If you're trying to produce
an amplitude-adjusted sine wave, one approach you might consider would be
to generate two 1KHz sine waves in different phases (the phase difference
will set the net amplitude).  I don't know exactly how much precision you
could hammer out of a PIC that way, but it should be possible to do pretty
well (I use that trick in my music box, btw).

Alternatively, since your sine wave frequency is fixed, you could probably
use a simple gating circuit to convert your DC signal into a square wave,
and then feed that through a 4 or 5 stage filter.  Since the frequency is
fixed, you could optimize the RC's so as to give the best possible 1-1.5KHz
cutoff and if you use an active feedback filter you could even add some "Q"
to make your sinewaves really gorgeous.
GERRY COX wrote:
>
> My latest project involves a PIC16C73A , which amongst other things,  drives
> a serial 16bit DAC. This gives me a control voltage  programmable from 0  to
> 10V.
> I also need to generate a sinewave of nominally 1KHz. The p-p amplitude
>  must track the DAC voltage and be always 10 percent of its DC  voltage.
> It has to be a reasonably clean and stable sinewave.
> Input voltage range varies from   0.5 to  10V.
> Sine wave output will vary 0 to 1V p-p for the above input range. Accuracy
> better than 3%.
> Sine wave Total Harmonic Distortion better than 5%
> Sine wave frequency accuracy 1Khz +/- 100Hz

Use an LM13700 it's a dual transconductance amp
both as the osc and the attenuator

--
Peter Cousens
email: petercousens.her.forthnet.gr  phone: + 3081 324450, 380534
snailmail:  Folia, Agia Fotini, Karteros, Heraklion  Crete, Greece.
On Thu, 12 Feb 1998 17:20:29 -0000 GERRY COX <gcoxDEK.COM> writes:
>My latest project involves a PIC16C73A , which amongst other things,
>drives
>a serial 16bit DAC. This gives me a control voltage  programmable from
>0  to
>10V.
>I also need to generate a sinewave of nominally 1KHz. The p-p
>amplitude
> must track the DAC voltage and be always 10 percent of its DC
>voltage.
>It has to be a reasonably clean and stable sinewave.
>Input voltage range varies from   0.5 to  10V.
>Sine wave output will vary 0 to 1V p-p for the above input range.

It would go from 0.05 to 1V. if it were linearly controlled.

>Accuracy
>better than 3%.

Why are you using a 16-bit converter then?  A 3% requirement is less than
6 bits of accuracy.

The first thing that comes to mind is to use an 8-bit DAC chip in
multiply mode.  By driving a constant level sinewave into the reference
pin, the output will be a sine wave wiht level varying according to the
digital code input.  Unfortunately most of the DACs only multiply in
2-quadrants (positive voltages), so a DC bias needs to be applied to the
input, causing the DC level at the output to also vary according to the
input code.  Another DAC could be operated to ouptut only the DC level
expected at the output, then (assuming the 2 DACs are balanced) the two
subtracted to leave a sine wave centered around 0 volts.

Another possibility is an analog multiplier.  This is the obvious choice,
though multiplier chips are somewhat expensive (if you already have a
16-bit DAC, this may not be much of an issue).  And you have to come up
with a constant-amplitude sine wave from somewhere to begin with.

One thing that you didn't specify is the time to reach a new amplitude
setting after a change is demanded.  If this is rather slow (100s of ms),
then another realm of possibilities opens up, using feedback.  A
rectifier or amplitude detector would sample the output of the circuit,
and this would be compared to the desired level.  The error voltage would
control some other part of the circuit to set the amplitude.

If the long response time and otherwise poor dynamics are acceptable (the
level isn't changed very often, in other words), I would highly recommend
this method.  The use of feedback makes the amplitude accuracy dependent
only on the sampling detector, reference level source, and error
amplifier.  Variations in other parts of the circuit would automatically
cancel out.

>Sine wave Total Harmonic Distortion better than 5%
>Sine wave frequency accuracy 1Khz +/- 100Hz

Since the frequency only has to be within 10%, a self-oscillating circuit
should work.  Use a filter of relatively high "Q" with feedback from the
output back to the input to make it oscillate.  In the feedback path, put
an adjustable limiter (a diode clamp circuit).  I think it would work to
clamp only one polarity of the signal.  The input to the filter would be
almost a square wave but it would filter to a sine wave.  The clamping
level could be controlled directly (open loop) or through feedback
(closed loop, Automatic Level Control).

A slightly more or maybe less complicated variation on this would be to
generate a variable-level square wave and filter it to a sine wave.  As
with the oscillator circuit, the filter could be either an RC network or
a switched-capacitor filter like an MF10.

>Output current 5mA max.
>Power supply -  I have +15V, -15V and +5V available.

This makes it easy.  Standard op-amps will meet the current
specification.

>I am considering an MF10 switched capacitor filter with clock 128
>times that
>of the 1KHZ output but am looking for ideas

Yes, this is a good start.  It could serve as the 1 KHz sinewave
generator for the multiplier ideas, or filter or oscillate with a varying
square-wave input level.

_____________________________________________________________________
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]
I've done similar projects in two different ways.
{Quote hidden}

GERRY COX wrote:

> I also need to generate a sinewave of nominally 1KHz. The p-p
> amplitude must track the DAC voltage and be always 10 percent of its
> DC  voltage. It has to be a reasonably clean and stable sinewave.

I'd be very tempted to just use an 8038CC function generator chip.  Or
anything that has subsequently rendered it obsolete.  I'm not sure of
the linearity or voltage range, but an XR2206 may do.

Cheers,
Paul B.
Gerry:

Try one of Motorola's or Analog Devices analog multipliers like the
For a oscillator and attenuator try National's LM13700.
Try a multipier DAC like Maxim MAX505 and others.
If you want a software solution see http://www.tinaja.com/magsn01.html
for what they call "magic sinewaves" - if you want more details on this
contact me. I was part of the IC design team that produced the first all
digital DTMF chip generators (Comdial Telephone Systems) Patents now
expired and the technology is "as old as the hills" so I can explain and
give details if there is interest.

- Wayne Foletta
BMI - Saratoga, CA

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...