Searching \ for '[EE:] sine wave generator' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=sine
Search entire site for: 'sine wave generator'.

Exact match. Not showing close matches.
PICList Thread
'[EE:] sine wave generator'
2004\04\22@070756 by Hulatt, Jon

flavicon
face
Hi,

I need to generate a 1300Hz ish sine wave pulse, from a pic, that I can plug
into a tape recorder's line in jack to log.

Obviously, it's fairly easy to get a 1300 Hz square wave, but what can I do
to simply and easily smooth this out a bit, so it's reasonably close to a
sine wave?

Any pointers appreciated

Thanks

Jon

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@072038 by SavanaPics

picon face
here is the basic circuit that I found  online. You may be able to adapt it
to your needs.  or use some switching to put it in and out of line as needed
Sine wave oscillator . Hope this at least gets you started in the right
direction

Eddie Turner, kc4awz

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@083213 by Jinx

face picon face
> Obviously, it's fairly easy to get a 1300 Hz square wave, but
> what can I do to simply and easily smooth this out a bit, so it's
> reasonably close to a sine wave?

Try a triangular wave and a little external RC smoothing. The topic
has come up before, it should be in the archives

Or this will convert a triangle to a pretty good sine wave

http://home.clear.net.nz/pages/joecolquitt/tri2sine.html

Obviously not optimised for a single 5V supply though, but that
shouldn't be too difficult. I've made this many times, but always
for signals that needed to be centered around 0V, not mid-rail

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@084451 by Hulatt, Jon

flavicon
face
Eddie,

No ciruit! (link / attachment?)

Thanks

Jon

{Quote hidden}

http://www.piclist.com/#topics

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@085113 by hael Rigby-Jones

picon face
{Quote hidden}

If the signal is always going to be at the same frequency, this isn't too
hard.  You simply need to remove the harmonics to leave the fundamental
frequency using a low pass filter.  You get something approaching a decent
sinusoid, you will need a multi-stage active filter.

Alternatively you could try loosely coupling the square wave to an parallel
LC resonant circuit http://www.wenzel.com/documents/waveform.html

Regards

Mike




=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
Any questions about Bookham's E-Mail service should be directed to
postmasterspamspam_OUTbookham.com.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@093307 by Mike Hord

picon face
This is one of those "Rorshach ink-blot tests" for engineers, I think.  ;-)

Software guys will suggest lookup tables, PWM, external DACs, etc.,
while hardware guys will typically suggest some sort of filter network,
sometimes based on PWM, sometimes on a triangle wave, or, my
personal favorite for this application, filtering out the first harmonic of
a square wave.

That may prove a little tricky, since at such a low frequency your 3rd
harmonic isn't going to be TOO far away, but you should be able to
attenuate it below audible range fairly easily.  See FilterLab for details.

The other thing I'll mention is that you may want to leave the signal
running full time.  Starting and stopping an audio signal can lead to a
very audible POP at the beginning and end.  TI makes a couple of
audio amplifiers (unfortunately SMT only), the TPA 122 and 152,
which have in-built pop reduction.  Hook those up as your output
stage and connect up to the MUTE lead on the chip, start your PICs
PWM at 1300 Hz, and away you go!

Mike H.

PS- A more saavy audio/analog guy may know an easier way to
lose that popping effect, but that's not me!
{Quote hidden}

_________________________________________________________________
Get rid of annoying pop-up ads with the new MSN Toolbar   FREE!
http://toolbar.msn.com/go/onm00200414ave/direct/01/

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@094345 by Andrew Kilpatrick

flavicon
face
First of all, if you're plugging this thing into a tape recorder,
what would be wrong with just using a simple capacitor low pass filter
with the 3db down point set around 1300Hz. Or, to be really crude,
is it bad to be recording a square wave? It's not going to come out
square when you play it back, and it's certainly not going to fold
over since you're not using a DAC.

Also, as for the starting and stopping, it might not matter if you
get an audible pop if it's not a signal designed for human listening.
If you're really concerned about it, make a bandpass filter around the
centre frequency, as you'll find that most pops from turning things
on and off tend to create big disturbances in the near-DC range that
cause loud bass thumps.



Andrew


On Thu, Apr 22, 2004 at 08:32:16AM -0500, Mike Hord wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@130645 by Herbert Graf

flavicon
face
> Hi,
>
> I need to generate a 1300Hz ish sine wave pulse, from a pic, that
> I can plug
> into a tape recorder's line in jack to log.
>
> Obviously, it's fairly easy to get a 1300 Hz square wave, but
> what can I do
> to simply and easily smooth this out a bit, so it's reasonably close to a
> sine wave?
>
> Any pointers appreciated

       How pure a 1300Hz wave do you need? You could take the 1300Hz square wave
and put it through a band pass filter centered on 1300Hz, that'll give you a
reasonably clean wave. If you need better then try some PWM+filter with the
PIC to get a pretty well perfect sine wave. TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@133720 by Denny Esterline

picon face
Does it have to come from the PIC? There's several other oscillator options
available that you could *control* with a PIC. I'm thinking some kind of
VCO using the PWM to adjust the voltage, or maybe just "gating" the signal
(analog switch?)

You'd get a cleaner signal with much less complicated software.

At 1.3KHz you could also implement some crude freq meter function to
provide a feedback loop...  Assuming exact freq is important to you.

Just some ideas.
-Denny



> Hi,
>
> I need to generate a 1300Hz ish sine wave pulse, from a pic, that I can
plug
> into a tape recorder's line in jack to log.
>
> Obviously, it's fairly easy to get a 1300 Hz square wave, but what can I
do
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

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