Tuesday, 21 November 2017

analog - Sawtooth/ramp waves with fixed amplitude from sine or square clock source?



I hope someone can help me out!


A bit of background info: I have created a DDS based signal generator (Using PIC MCU to drive a AD9833 for DDS output). The generator is capable to produce sine, triangle and square waves up to 12.5Mhz. However the output at higher (more than 2 Mhz) frequencies is far from perfect (nowhere near the desired wave forms). Anyway, currently I don't need more than 2MHz. I have added a 7-th order elliptic filter to smooth the sine output from the DDS. After th? filter I use a Schmitt trigger in order to obtain a rectangular wave forms (I can adjust the duty circle as well). The problem is I don't know how I can create sawtooth/ramp or a triangular wave forms based on the DDS signal as a reference clock source (either rectangular or the filtered sine). My most important requirement is for a sawtooth waveform, with adjustable frequency and a constant amplitude in the frequency range from 1Hz to 2MHz.


My query is: Is there a cheap, easy for implementation solution, which could generate sawtooth/ramp waveforms (triangle as an extra is welcome too) with linear slope (without aliasing or discretization artifacts), adjustable frequency and fixed amplitude in wide frequency range?


Unfortunately I'm not able to find decent solution to that problem. The only thing that I have found was a post in a forum: http://www.eevblog.com/forum/blog/eevblog-483-microcontroller-voltage-inverter-tutorial/msg247080/#msg247080, which suggests usage of 4046 PLL chip, that generates a higher frequency square wave, which tracks the input and a 4024 binary counter, which is then fed into a cheapo r2r DAC consisting only of a resistor ladder. Incorporating that, possibly I could generate arbitrary frequency sawtooth with fixed amplitude. However the frequency range that I could get from 4046 PLL will not cover requirements (this is my opinion based on the formulas given in 4046 datasheet, that specify the frequency range), also there will be staircase artifacts because of the ADC conversion.


It will be best if I could cover the range from 1Hz to 2MHz.


Can anyone recommend something, which could do thе things properly?


Sorry for the long post, I hope that I managed to explain the problem (excuse me for my English, as it's not my native language).


Thanks, Osvaldo




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...