element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Signal Generator
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 473 subscribers
  • Views 784 views
  • Users 0 members are here
  • signal_generator
  • arm;
  • pic
Related

Signal Generator

JohnDSiviter
JohnDSiviter over 15 years ago

I want to build a bench signal generator one day, 0-100MHz, sine, triangular, square, variable M/S ratio etc and want a single chip solution (except for maybe a few optoisolators/buffers), I was thinking about using a fast ARM processor and fast DAC/s, it would also need USB so I can use the PC to program waveforms, what processor would you choose and why?

  • Sign in to reply
  • Cancel
Parents
  • michaelkellett
    michaelkellett over 15 years ago

    Use pretty much any processor you like - the cost will be dominated by the FPGA, clock generator/DDS, DAC, reconstruction filter etc.

    You can go out and buy signal generators like this and there is a reason they cost £2000 or more.

     

    To get 100MHz sine wave at reasonable noise and distortion you will need at least 3e8 samples per second, even fast processors can't do IO at that rate so you'll need the FPGA to work the DAC.

     

    Use a processor with the necessary features from the family you are most familiar with.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • JohnDSiviter
    JohnDSiviter over 15 years ago in reply to michaelkellett

    Come on Michael, thats a bit of a cop out image, I cant use pretty much any processor I like because of the 100Mhz problem, I reckon if you get a fast enough processor the actual system is not that difficult to program, high speed DACs might be however....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 15 years ago in reply to JohnDSiviter

    John - you haven't quite got my point - I don't know of ANY processor that can drive a DAC at 300MHz with reasonable jitter. A DAC that fast will probably have LVDS inputs  - an easy interface to an FPGA but not to any processors I know.  Since you will need an FPGA (or other custom logic) the processor doesn't have any demanding real time work to do - so it is not a performance driven decision (at least as far as the signal generation goes). This is the case in a great many real development projects.

     

    You haven't given anything like enough spec details to really drive the processor choice but if I were doing this (on the basis of the limited information) I would use an ARM Cortex, probably one of the STM32F parts, because I am familiar with them so the cost of development would be lower. If you are tooled up for a PIC32 or something else - that would probably do just as well.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jorge_Garcia
    Jorge_Garcia over 15 years ago in reply to JohnDSiviter

    Hi John,

     

    I've used this type of solution before on a PIC processor so I have a little experience on the subject. I think it's going to be pretty difficult to achieve what you're looking for using fully digital means. Here's the issue, and again this is the way I've done it, perhaps someone can mention a better way.

     

    Basically a produce a PWM waveform at the highest frequency my hardware will allow, or that I deem suitable. The idea is to use the PWM as a DAC. Fourier analysis tells us that a positive square wave (0 - 5V) will have frequency components at odd multiples of the fundamental as well a strong fundamental, additionally since it's a positive square wave we have a DC average value.

     

    It's the DC value that allows us to create arbitrary waveforms. If we vary the pulse width we can vary the DC component, in order to obtain the desired waveform we need to filter out the harmonics, so in order to obtain a clean waveform you'll need probably a filter of 3rd or fourth order.

     

    So basically you program the waveform by modulating the pulse width with the waveform. This method works very well for arbitrary waveforms. In my earlier experiment I got pretty amazing results just using a first order filter( Not the cleanest signals but much better than I expected).

     

    Besides the fact that you have to get a high speed PWM going which you can modify cycle by cycle(Takes one heck of a processor). In order to represent arbitrary waveforms with a high degree of accuracy you would want to be able to have at least 100 points for every period of the waveform. To reproduce one point you need one PWM cycle so If you run your PWM at 100Mhz the highest frequency you could faithfully recreate with this method would be a 1Mhz arbitrary signal.

     

    Following this same reasoning if you wanted to produce an arbitrary signal from 0-100MHz you would need a 10GHz PWM waveform! I'm not aware of too many computers that can run that fast let alone an embedded processor.

     

    Now that I've shattered your will to live, here's the good news. You could cut the 100 points per period minimum to 50 points. You mentioned you only want to create Sine, Triangle, and adjustable Square wave so the ability to create an arbitrary waveform is not really necessary.

     

    Another more feasible solution would be to use PLL which could easily generate a 100MHz Square wave, if you filter it you'll get a 100 MHz sine wave and with some other processing you can get a triangle waveform. I'm not to clear on the details but I believe many commercial units use this method.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Jorge_Garcia
    Jorge_Garcia over 15 years ago in reply to JohnDSiviter

    Hi John,

     

    I've used this type of solution before on a PIC processor so I have a little experience on the subject. I think it's going to be pretty difficult to achieve what you're looking for using fully digital means. Here's the issue, and again this is the way I've done it, perhaps someone can mention a better way.

     

    Basically a produce a PWM waveform at the highest frequency my hardware will allow, or that I deem suitable. The idea is to use the PWM as a DAC. Fourier analysis tells us that a positive square wave (0 - 5V) will have frequency components at odd multiples of the fundamental as well a strong fundamental, additionally since it's a positive square wave we have a DC average value.

     

    It's the DC value that allows us to create arbitrary waveforms. If we vary the pulse width we can vary the DC component, in order to obtain the desired waveform we need to filter out the harmonics, so in order to obtain a clean waveform you'll need probably a filter of 3rd or fourth order.

     

    So basically you program the waveform by modulating the pulse width with the waveform. This method works very well for arbitrary waveforms. In my earlier experiment I got pretty amazing results just using a first order filter( Not the cleanest signals but much better than I expected).

     

    Besides the fact that you have to get a high speed PWM going which you can modify cycle by cycle(Takes one heck of a processor). In order to represent arbitrary waveforms with a high degree of accuracy you would want to be able to have at least 100 points for every period of the waveform. To reproduce one point you need one PWM cycle so If you run your PWM at 100Mhz the highest frequency you could faithfully recreate with this method would be a 1Mhz arbitrary signal.

     

    Following this same reasoning if you wanted to produce an arbitrary signal from 0-100MHz you would need a 10GHz PWM waveform! I'm not aware of too many computers that can run that fast let alone an embedded processor.

     

    Now that I've shattered your will to live, here's the good news. You could cut the 100 points per period minimum to 50 points. You mentioned you only want to create Sine, Triangle, and adjustable Square wave so the ability to create an arbitrary waveform is not really necessary.

     

    Another more feasible solution would be to use PLL which could easily generate a 100MHz Square wave, if you filter it you'll get a 100 MHz sine wave and with some other processing you can get a triangle waveform. I'm not to clear on the details but I believe many commercial units use this method.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube