1 KHz Sine Wave


Closed Thread
Results 1 to 13 of 13

Thread: 1 KHz Sine Wave

  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default 1 KHz Sine Wave

    Hi Guys,
    I was wanting some ideas on making the best 1kHz sine wave for audio test tone.
    I know you would never get the best result out of any mcu source, and the faster the better,
    but the test tone is for amplifier clipping test, not quality test.

    The best I can come up with is the biggest resistor ladder that can possibly be afforded
    with available ports on the chip for as many possible voltage levels.
    Where the hardware and software is totally dedicated to producing the sine wave,
    and nothing else.

    There would be some points where you could set more than one IO port to feed
    current via more than one resistor to improve resolution.
    Are there any examples of this?
    Cheers, Art.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    This will get you started

    https://www.google.co.in/search?q=pi...CcTQiAfj7YCoBQ

    Regards
    Jerson

  3. #3
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Why not simply pick a PIC with a DAC?

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    If there is a good on board DAC compatible with PBP, that would be fine
    Can you suggest one?

    I imagine al the caps in the diagram are to smooth out intermediate steps?
    That's going a bit far for me.
    The 1kHz sine wave is to hear audible clipping matching an amplifier to a source.
    I think it does have to be of fair quality to begin with.
    What we hear are the tops and bottoms cut off the sine wave,
    which may not be as noticeable if it is squared off to begin with.

    It's a pity a DTMF encoder can't be dumbed down to do single frequencies.

  5. #5
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Sometimes, when you are used to using a hammer, everything looks like a nail.

    If that's all you need to do, a PIC might not be the best answer:
    http://www.stufinnis.co.uk/oscillator.html
    or http://www.discovercircuits.com/Andy...oscillator.pdf
    Far simpler than a 5-bit DAC and filter.

  6. #6
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Thanks, you are right, it does look like it will do the trick

  7. #7
    Join Date
    Nov 2013
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    extract:

    " Arduino Sine wave Generator using the direct digital synthesis Method

    Here we describe how to generate sine waves with an Arduino board in a very accurate way. Almost no additional hardware is required. The frequency range reaches form zero to 16 KHz with a resolution of a millionth part of one Hertz! Distortions can be kept less than one percent on frequencies up to 3 KHz. This technique is not only useful for music and sound generation another range of application is test equipment or measurement instrumentation. Also in telecommunication the DDS Method is useful for instance in frequency of phase modulation (FSK PSK)."

    http://education-tn.blogspot.com/201...-circuits.html

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Am I the only one who can't see the images on that page?

    EDIT,, ok, maybe he has just deleted the early example pictures.

    That's interesting, I also want to do a frequency counter where the input
    is a buffered sine wave, and both for the same project!

    It has undergone some transformation since I got it

    Last edited by Art; - 12th November 2013 at 11:34.

  9. #9
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Lol, it just increments/decrements the index for a lookup table that is a pre-generated sine wave
    to send to PWM.

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Quote Originally Posted by Art View Post
    Am I the only one who can't see the images on that page?
    Must be, I can see pictures & tables & code, lucky link for me as I was wanting an example in C for a lookup table. Check your ADBLOCK & script blocker settings, maybe you're blocking the images from there. . . I would say it's a safe bet that radio was old when you were born, what is it?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  11. #11
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Yes, but when I'm dead, it's going to be newer than that
    There is another box that ends up going under this, to interface with it,
    but without any new chassis holes (i.e.. nothing that can't be reversed.



    It's the most ambitious for me yet.
    RF probe frequency counter to display the LO frequency minus the Intermediate frequency for
    digital station display, and then later, feedback to turn the original dial with a low geared stepper motor.
    It is difficult to introduce a new micro or PSU, into an AM radio.

  12. #12
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Your lookup table in C is the same as using a PBP array.

    byte[36] of the static declared array is index 35.
    The size you declared the array, you start counting from one like a Human,
    but when you go to address it, it's back to programming, and you count from zero.

  13. #13
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 1 KHz Sine Wave

    Don't know what to say... Old tube radios have analogue components, and unstable oscillators
    Will have to do the Huff Puff technique to stabilise it with analogue components.
    This is not yet fit for a robot tuner.

    Kinda got a rule about completing projects, and number of simultaneous projects!


Similar Threads

  1. Sine wave power inverter
    By sougata in forum mel PIC BASIC Pro
    Replies: 244
    Last Post: - 23rd February 2017, 05:16
  2. Sine wave
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th May 2009, 03:31
  3. square to sine wave help
    By TONIGALEA in forum General
    Replies: 6
    Last Post: - 2nd July 2006, 09:32
  4. Sine wave generator
    By Mario in forum Forum Requests
    Replies: 13
    Last Post: - 16th March 2006, 23:30
  5. 40 kHz wave
    By RUBiksCUbe in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 14th December 2005, 20:01

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts