Function Generator Design

Discussion in 'Electronics & Electrics' started by nux, Jun 19, 2007.

  1. nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Carrying over discussion from the end of this thread.

    I would like to get some input and help in designing, prototyping and completing a DIY function generator.

    I guess there are two ways to approach it:
    • Standard function generator chip eg. XR2206
    • DDS (Direct Digital Synthesis) chip eg. AD9850

    The XR2206 approach is much easier, can perform all the functions itself and has minimal extra components. However it is not as accurate and lower speed (0.01Hz - 1MHz)

    The DDS approach will be much more involved, as we'll need some type of microcontroller to set the frequency and output. However it is incredibly accurate and can go into the 10's and 100's of MHz.


    Having the parts easily available the larger electronics sites would be a plus. As well as easier to solder chips (down to SMD SSOP for example). Oh, and all the parts obtainable for <$50 would be good.

    Then perhaps when the design is finalised we can get some professional PCB's made up for kit sales etc.
     
    Last edited: Jun 19, 2007
  2. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    XR2206 Specs

    XR2206 Specs
    http://www.jaycar.com.au/images_uploaded/XR2206V1.PDF

    16 pin DIP Package

    Frequency Range: 0.01Hz - 1MHz

    Adjustable Duty Cycle/Symmetry Amplitude, Total Harmonic Distortion.

    Waveforms:
    • Sine
    • Triangle
    • Square
    • Pulse
    • Ramp

    Supply Voltage: 10V-26V

    Low-Sine Wave Distortion, 0.5% typical
     
    Last edited: Jun 19, 2007
  3. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Last edited: Jun 19, 2007
  4. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Design Choices

    Decided Design Choices
     
  5. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Progress

    Hopefully some progress soon :p
     
  6. GooSE

    GooSE New Member

    Joined:
    Jun 26, 2001
    Messages:
    6,679
    Location:
    Sydney
    Obviously you have to look at your requirements to figure out which way to go. From what I've seen you're pretty handy with circuit design and a soldering iron, so the extra complexity of a DDS chip shouldn't be a problem.

    Do you need the extra accuracy and output bandwidth of a DDS chip? If not, save yourself some hassle and use the XR2206.
     
  7. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Personally I'm leaning towards a DDS, just looking for input on which chip to use and what others are looking for as I think more than a few people may want to have one. Plus I've already made a semi-working XR2206 board, but just want some extras like adjustable DC offset and some extra current drive for example.
     
    Last edited: Jun 19, 2007
  8. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,756
    Location:
    Cambridge, Massachusetts
    Definitely go with the DDS and microcontroller option. I'd use something with plenty of IO, like the 16F877 or better, so you can include an LCD display, and microswitch input to control options. Maybe coarse control over frequency etc using the buttons, and pots for vernier control.
     
  9. Goth

    Goth Grumpy Member

    Joined:
    Jun 22, 2002
    Messages:
    9,228
    Location:
    /dev/null
    If you're gonna use a PICMicro, how about the 18F452, or 18F4550?
     
  10. GooSE

    GooSE New Member

    Joined:
    Jun 26, 2001
    Messages:
    6,679
    Location:
    Sydney
    Also, this way you can use Microchip's C18 compiler which I've found is alright.
     
  11. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,742
    Location:
    Gippsland
    I was going to suggest that the posts in the other thread get split into a new one, but this is good enough

    I'm very keen to go through with this and if it comes down to it I'll be making my own design variation and it no doubt will be >$50, probably more in the order of $200 depending on what can be from free samples, bought and what I have

    I dont like the XR2206, the specs arent nearly as good as I'd like, and something as simple as this could easilly be thrown together on some protoboard pretty quickly. I'm not overly worried about a complex design, actually I'd like it to be a little more complex, you learn something then :)

    I probably need to set some hard requirements for myself but not knowing what is entirely possible for us to achive I need to look into that further, but a quick glance over the ad9850 it looks alright, or some other AD chip would probably be suitable
     
  12. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    I think the 18F2550/4550 is a good choice for a microcontroller. USB controlled frequency would be cool, and allows for easy updating of firmware.

    The main thing is finding a good DDS chip that is easily available. I might order an AD9850, although I'm not sure if it does anything but Sinewave output?
     
  13. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,742
    Location:
    Gippsland
    The microcontroller isnt overly important in this stage of the design, just need just about anything with plenty of pins, I'd like something that can be programmed in C

    The AD9850 only does sine wave output, AD5930, AD5932 and AD9833 do sine, square and triangle. Availability doesnt really have to be something from Australia, Digikey have a big range and ordering from them isn't that hard.
     
  14. Goth

    Goth Grumpy Member

    Joined:
    Jun 22, 2002
    Messages:
    9,228
    Location:
    /dev/null
    Well, it's easy enough to shape a sine into whatever you want, as you posted above, assuming your op-amps etc are gonna cut it for noise ratio and bandwidth.
     
  15. P.YO

    P.YO Member

    Joined:
    Feb 2, 2004
    Messages:
    443
    Location:
    Brisbane - Southside
  16. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,742
    Location:
    Gippsland
    AD9833 - 0.1hz to 12.5mhz, SNR ~62dB, 10pin MSOP

    AD5932 - 50hz to 25mhz, SNR 60dB, 16pin TSSOP

    AD5930 -20pin TSSOP, same as the AD5932 except its DAC has current output and a few different modes where is bursts the frequency or ramps them up an down and other unwanted things

    I really like the AD9833, and its $8 from digikey, Add some gain control and DC offset control and you got most of the functionality, though I don't think the duty cycle of the squarewave output can be adjusted

    I'll make sure they cut it, I've played with plenty of +100mhz opamps with massive slew rates (though only for audio)

    [sorry - accidentally edited]
     
    Last edited by a moderator: Jun 19, 2007
  17. Goth

    Goth Grumpy Member

    Joined:
    Jun 22, 2002
    Messages:
    9,228
    Location:
    /dev/null
    Who needs 100MHz for audio anyway?
     
  18. OP
    OP
    nux

    nux Member

    Joined:
    Jan 20, 2002
    Messages:
    16,780
    Location:
    Melbourne
    Well, is duty cycle adjustment really necessary? The AD9833 looks like the go otherwise. Then once the basics of how the chip works and a general circuit with micro is worked out, an output amplifier can be added as well as DC offset? MSOP is pretty small though.

    I might order a few from Digikey this week, anyone want some to play around with?
     
    Last edited: Jun 19, 2007
  19. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,742
    Location:
    Gippsland
    Me, and plenty of others, because they sound so good. A big favourite of mine does 325MHz and 1000V/uS and there are plenty of "designed for audio" devices that are quite fast
     
  20. dakiller

    dakiller (Oscillating & Impeding)

    Joined:
    Jun 27, 2001
    Messages:
    7,742
    Location:
    Gippsland
    Duty cycle would have been nice, makes it easy to do some PWM signal with it then,

    I'd hold off on the Digikey order for just a bit, there will no doubt be a few more things needed from there, like a good oscillator to feed the AD9833 and output amp/buffer, but I'll be keen on a chip or 2. I'm thinking of designing for 2 so that if you populate 2 of these fed from the same oscillator, the chip does phase control so you can have 2 signals and control the phase between them but you can save and only fill in enough for one
     

Share This Page