Digital Sine Wave Generation

Discussion in 'General Electronics Chat' started by davyna, May 15, 2013.

  1. davyna

    Thread Starter New Member

    May 15, 2013
    13
    1
    i didn't understood this circuit...need help!
     
    Last edited by a moderator: May 15, 2013
  2. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Congratulations,

    Welcome to AAC.

    Congratulations, you have practiced the arcane art of necromancy, the revival of a long dead thread. Likely the OP (Original Poster) has solved his problem in the years that has passed, or thrown it away, or something.

    In adddition, a thread belongs to the OP (original poster). Trying to take over someone elses thread is called hijacking, which is not allowed at All About Circuits. I have therefore given you a thread of your very own.

    This was split from need help understanding how digital sine wave circuit works
     
  3. davyna

    Thread Starter New Member

    May 15, 2013
    13
    1
    How a timer and counter can generate sine-wave? help me..:confused:
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,003
    3,232
    The circuit is a crude Digital-Analog converter. As the switches are sequentially sequenced ON and OFF the output voltage will rise and fall in a stepped sine-wave with value determined by the voltage divider resistors connected to the ON output.
     
  5. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    NE555 → 8 bits Counter(CD4520) → 4bits sinewave DAC (16 digits)
    The resistors as 10K,20K,40K,80K,80K,40K,20K,10K

    NE555 → 16 bits Counter(CD4520) → 8bits sinewave DAC (256 digits)
    The resistors as 1K,2K,4K,8K,10K,20K,40K,80K,80K,40K,20K,10K,8K,4K,2K,1k

    8bits sinewave DAC (http://www.lennard.net.nz/electronics/dac.html#r2r)
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Scott, can you post a schematic of the
    ?
    I can't see how it works.
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Ron H, the method almost there, the linked page is only 4 bits(16 digits), the waveform will be only low to high, so it needs to adding the waveform from high to low, that's why I want to using 8 resistors.

    if you felt that the circuit seems can't get a good sine wave, that's true, because the OP asked for a timer and counter can generate sine-wave, that's not a good way to generate a sine wave.

    I have been designed a digital sine wave for a industrial product used, I can't post the details, but I can sharing the idea, there are somethings need to modify, when using a math to calculate and drawing the sine wave and to get the values of the waveform, and the frequency is fixed.

    1. To get or write a program to drawing a waveform of sine wave and to get the 256 bytes data of the waveform, the data should be according to the input frequency.

    2. When I get the data, I still need to modify the data, this is a boring and hard work, because I have to check each byte from 256 bytes, when the position of data is not right, then I have to change it, so I have to modify again and again.

    3. The 256 bytes data of sine wave saved into the 8 data bits EEPROM.

    Square wave → 8 bits Binary counter → sine wave EEPROM → 8bits DAC → Op Amp Waveform shaping → sine wave

    The input frequency divided by 256, so the output frequency are equal to input frequency /256.

    I'm not sure all the described is correct or not.
     
    Last edited: May 16, 2013
    davyna likes this.
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Scott, I requested a schematic, but all I got was a lot of hand-waving.
    Do the circuits you described in post #5 work, or not?
     
    Last edited: May 16, 2013
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Does it have to be using a 555 and a counter? What did you need to make sinewaves for?

    I did a project for a 1kHz "precision" sine generator, using a PIC to digitally make the sine wave using PWM;

    http://romanblack.com/onesec/Sine1kHz.htm

    Generally this is a much simpler circuit and will produce much better frequency accuracy and much better sine shape accuracy;

    [​IMG]

    [​IMG]
     
    Ron H and davyna like this.
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    If you replace the EEPROM with RAM and make the clock adjustable you have the innards of an arbitrary waveform generator.
     
  11. davyna

    Thread Starter New Member

    May 15, 2013
    13
    1
    hi, how can i obtain pure sine wave fro this wave
    [​IMG]o get
    I want to get the pure sine wave help me
     
  12. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    since it is digitally generated it will never be a pure sine. You could try lowpass filtering it to reduce the harmonics. Or use more levels to get better approximation.
     
  13. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
Loading...