Author Topic: Looking for <$50 function generator  (Read 8060 times)

0 Members and 1 Guest are viewing this topic.

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Looking for <$50 function generator
« on: May 26, 2020, 06:58:49 pm »
I'm looking to buy a cheap (cheap) function generator to complement my oscilloscopes (good old Hitachi analog dual trace 100MHz and DS2072A which I got for a song out of an estate sale).

I mostly work with digital circuits (STM32, ESP32) and I have one of those cheap 8 bit logic analyzers that together with sigrok allows me to do most of the digital and protocol debugging. Rarely audio circuits, and for those I use the amazing Daqarta function generator with the PC soundboard (http://www.daqarta.com/dw_gen.htm)

From time to time, though, I would like to have a basic (sine, triangular, square) function generator, up to a few MHz. Up until now I mostly used square waves out of one of the many microprocessor boards I have around and a bit of code.

So I started looking at options on eBay, from the cheap XR2206 units to AD9833 kits, all the way up to the FY3224s which currently can be found for ~$50 shipped to the USA.

It's very easy to start from the FY3224s, get carried away and end up with a ~$130 arbitrary function generator (and I have seen many: FY6900, UniT, etc). After all, spending $50 poorly or more for a much better product seems smart, but I'm trying to stick to a cheap solution for basic waveforms, given how rarely I have needed it in the past decades

Any suggestion is welcome
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27925
  • Country: nl
    • NCT Developments
Re: Looking for <$50 function generator
« Reply #1 on: May 27, 2020, 11:49:24 am »
IMHO the FY3224s is just fine but it needs a grounded AC inlet with the ground connected to the 0V of the power supply. This modification is easy to make.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #2 on: May 27, 2020, 01:09:26 pm »
If you want a DIY project?

I built my own with an AD9834 DDS for just the same reason (very little use).
It has sine, triangle, square, sine sweep up or down with start trigger, and PWM.
Frequency is 1Hz to 15MHz at 2Vp-p.

« Last Edit: December 17, 2020, 04:49:19 pm by MarkF »
 
The following users thanked this post: robca


Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #4 on: May 27, 2020, 09:58:30 pm »
FeelTech looks to be closest to your preferred budget.

Up a bit in price (might be lower elsewhere) is:
https://www.amazon.com/Waveform-Generator-Arbitrary-Function-Sampling/dp/B0819W89DH/ref=pd_sbs_328_3/130-6234271-5610843?_encoding=UTF8&pd_rd_i=B0819W89DH&pd_rd_r=0dddad65-cb5a-46a6-80fe-a7d05d6ed780&pd_rd_w=gJ4vD&pd_rd_wg=RZxoI&pf_rd_p=12b8d3e2-e203-4b23-a8bc-68a7d2806477&pf_rd_r=RCQ64G0938PZDSH3BATW&psc=1&refRID=RCQ64G0938PZDSH3BATW

Plenty of info on FeelTech and some on Uni-T in the forums.
As I said at the beginning, I know that I can get a much better instrument a around $130. It's just roughly $100 higher than I want to spend, though ;). Given how infrequently I might need to use it, I don't think it makes sense spending that much at this point. And if in the future I need a better instrument, I can always buy at that time (and I'm sure that there will be even better ones for less)
 

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #5 on: May 27, 2020, 10:33:49 pm »
If you want a DIY project?

I built my own with an AD9834 DDS for just the same reason (very little use).
It has sine, triangle, square, sine sweep up or down with start trigger, and PWM.
Frequency is 1Hz to 15MHz at 2Vp-p.

I would consider building something but based on what I saw, it might not be worth the time/cost unless I were looking for something unique. I looked at the reference designs for the AD9834, and it looks like I would need to have specific filters to avoid having spurious harmonics. For example, I'm attaching a rather common board (eBay), where there are R/C filters for both outputs, which is something that seems to be implemented differently in yours (and I would not have enough knowledge to design something that produces clean waves at those frequencies)

I was looking at possibly getting one of the AD9833 from eBay with the built-in amplifier, and simply add an Arduino front end with a display. In that case I would rely on the amplifier and digital potentiometer on the board to do all the hard work (https://www.handsontec.com/dataspecs/module/Module%20Collection.pdf, with the relevant attached portion below). Given that I have already plenty of displays and microprocessor boards around, the only actual cost would be the AD9833. And using an ESP32 oe ESP8266, would be even possible to send commands to it wirelessly. The downside is that it would have no enclosure and the software never finished :)

Is your project shared somewhere?
 

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #6 on: May 27, 2020, 10:34:56 pm »
IMHO the FY3224s is just fine but it needs a grounded AC inlet with the ground connected to the 0V of the power supply. This modification is easy to make.
Yes, I did see that while browsing the forum here for the FY3224, but thanks for pointing it out anyway. Better safe than sorry...
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #7 on: May 27, 2020, 11:27:12 pm »
If you want a DIY project?

I built my own with an AD9834 DDS for just the same reason (very little use).
It has sine, triangle, square, sine sweep up or down with start trigger, and PWM.
Frequency is 1Hz to 15MHz at 2Vp-p.

I would consider building something but based on what I saw, it might not be worth the time/cost unless I were looking for something unique. I looked at the reference designs for the AD9834, and it looks like I would need to have specific filters to avoid having spurious harmonics. For example, I'm attaching a rather common board (eBay), where there are R/C filters for both outputs, which is something that seems to be implemented differently in yours (and I would not have enough knowledge to design something that produces clean waves at those frequencies)

I was looking at possibly getting one of the AD9833 from eBay with the built-in amplifier, and simply add an Arduino front end with a display. In that case I would rely on the amplifier and digital potentiometer on the board to do all the hard work (https://www.handsontec.com/dataspecs/module/Module%20Collection.pdf, with the relevant attached portion below). Given that I have already plenty of displays and microprocessor boards around, the only actual cost would be the AD9833. And using an ESP32 oe ESP8266, would be even possible to send commands to it wirelessly. The downside is that it would have no enclosure and the software never finished :)

Is your project shared somewhere?

The advantage of the AD9834 over the AD9833 is that it has an external reference you can use to control the amplitude (See attached App Note).  Plus the differential output allows you to adjust the amplitude and DC offset independently of each other.

I didn't see much need for a reconstruction filter because the output is pretty clean.  If I get a chance I'll get a screen capture and measure the harmonics.  However, I did a 2nd order filter with the help of an online LC filter program.   https://www-users.cs.york.ac.uk/~fisher/lcfilter/
Here is a 5th order filter:



(Updated design)
« Last Edit: July 15, 2024, 12:57:02 am by MarkF »
 
The following users thanked this post: robca

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #8 on: June 07, 2020, 05:15:00 pm »
Just following up in case anyone wants to consider the same AD9833 board I mentioned. Don't!!! :palm:

It's a pretty useless board above audio frequencies, and you will be better off with one of the much cheaper AD9833 only boards and a better filter/amplification stage. The only saving thing for me, is that the individual chip outputs are broken out in edge connectors and the chip connected with a 0 Ohm resistor, so it's easy to isolate the AD9833 and use only the chips you want. I haven't had time to look at how to improve it, but I think that the weak link in the chain is the MCP41010, with a pretty slow rise and fall time. the AD8051 should be plenty capable of dealing with the frequencies in play

Here are a few screen captures, at 1Khz, 100KHz, 1MHz for sine, triangle and square waves on the main board output (the AD8051 out), and the square and triangle waveform at 2MHz for the AD8051 out and the AD9833 out (the latter much better)
« Last Edit: June 07, 2020, 05:17:39 pm by robca »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #9 on: June 07, 2020, 07:39:47 pm »
Here are some screen captures of my AD9834 based Function Generator shown above
with a 48MHz clock, 1Vp-p output and 2nd order filter:

The triangle and square waves above 1MHz are not very useful.
« Last Edit: June 07, 2020, 07:55:12 pm by MarkF »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #10 on: June 07, 2020, 07:42:37 pm »
And some signal analysis:

Ending with 10MHz triangle waveform:
« Last Edit: June 07, 2020, 07:44:38 pm by MarkF »
 

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #11 on: June 07, 2020, 11:58:34 pm »
There's no questions: your circuit works much better (which I knew since the beginning, I was just hoping in something better from a cheap module). Since Ii could not find any high frequency waveform from the module I used, at least I can help others considering buying it

Thanks again for sharing both your design and waveforms, I might go with an AD9834 if I decide to do something better. Ironically I also have one of those $20 testers (https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/) and that generates a very clean 4MHz square wave (with a 16MHz clock). The only problem is that there are limited options for frequencies at the high range of the frequency, due to the limited number of dividers available when running code at close to the limit of the chip.

I will hack my module to bypass the MCP41010 and use a potentiometer instead, and for the time being that will work for me for the time being
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Looking for <$50 function generator
« Reply #12 on: June 08, 2020, 12:28:56 am »
I have three function generators but only need one.  So PM me if you are interested.
 

Online MasterT

  • Frequent Contributor
  • **
  • Posts: 824
  • Country: ca
Re: Looking for <$50 function generator
« Reply #13 on: June 08, 2020, 01:08:24 am »
What value of the MCP41010?  Be aware, that pot 10k has 1 MHz bandwidth, 50k & 100k likely 280kHz and 145kHz
I see there is a typo in the microchip datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
MHz instead of kHz.
 If stm32f4 having around, there is a way to get sine up to 6 MHz using internal DAC. It would allow to regulate amplitude in software, to some  - 20dB and frequency with acceptable resolution
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #14 on: June 08, 2020, 03:52:47 am »
There's no questions: your circuit works much better (which I knew since the beginning, I was just hoping in something better from a cheap module). Since Ii could not find any high frequency waveform from the module I used, at least I can help others considering buying it

Thanks again for sharing both your design and waveforms, I might go with an AD9834 if I decide to do something better. Ironically I also have one of those $20 testers (https://www.eevblog.com/forum/testgear/$20-lcr-esr-transistor-checker-project/) and that generates a very clean 4MHz square wave (with a 16MHz clock). The only problem is that there are limited options for frequencies at the high range of the frequency, due to the limited number of dividers available when running code at close to the limit of the chip.

I will hack my module to bypass the MCP41010 and use a potentiometer instead, and for the time being that will work for me for the time being

For a higher frequency square wave, you can do what I did in order to generate a PWM waveform:
  • In certain modes, the AD9834's Sign_Bit output pin is high impedance.
    So, I multiplexed it with one of the MCU pins. 
    You need to be very very careful when switching the AD9834 mode and the state of the MCU pin
    (i.e. Always select both pins to high impedance before enabling the function you want).

    I used a PIC18F2550 as my MCU which has a maximum clock rate of 48MHz. 
    The AD9834CRUZ can go to 75MHz (FYI. not the AD9834BRUZ version, only 50MHz). 
    Therefore, you could use separated clocks or a MCU capable of 75MHz. 
    This would allow all the waveforms to double their frequency.  I limited mine to 15MHz.

    The only drawback here is that the combined digital output has NO amplitude control (5V in my case). 
    You could add something to scale the digital output as well.

As an aside, the PIC18F2550 only has 32K program memory and I used 99% of it compiling the program with the XC8 compiler.

The other specialty item is the 1.27" Color OLED Breakout Board  from Adafruit.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #15 on: June 08, 2020, 04:08:12 am »
Another thought:

I have a LM7171 Op-amp on the output.
It gets hot driving a 50Ω load at 2Vp-p.
(My artificial output limit not to burn it up.)

The boards do not have an output buffer.  So.......
 

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #16 on: June 08, 2020, 04:08:16 pm »
What value of the MCP41010?  Be aware, that pot 10k has 1 MHz bandwidth, 50k & 100k likely 280kHz and 145kHz
I see there is a typo in the microchip datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
MHz instead of kHz.
 If stm32f4 having around, there is a way to get sine up to 6 MHz using internal DAC. It would allow to regulate amplitude in software, to some  - 20dB and frequency with acceptable resolution
Yes, the MCP41010 is clearly the problem.

I was looking for a pre-made solution that could get me most of a low-end function generator. I could go with a barebone AD9833 board and add a way to amplify the signal, or look at boards with more support. I saw at least another project built around the same AD9833 board I used and the author seemed to be happy with the results. So, given that the price difference of a barebone AD9833 and the one I got was not that high, I went with the board with the 3 chips, naively believing that if someone designed and sold it, it must be working. Naively being the key word  :). And that's why I provided the waveforms, so that anyone else would know what to expect

I can easily bypass the MCP41010 and still get something half usable, so not a complete loss

I have an STM32F407 and an STM32H743 board and can definitely use them to build a signal generator. With DMA and plenty of memory, I should be able to also have arbitrary waveforms.

But I'm unclear on how you you would get a 6 MHz sine, given that the DAC rate on an STM32F407 is 10.5Msps, and you would need at a minimum 128 samples for a full sine with half decent SNR. Do you have more info on what technique is used for that?

According to ST, you can expect much lower frequencies from a STM32F407 even using multiple tricks and optimizations https://www.st.com/resource/en/application_note/dm00129215-extending-the-dac-performance-of-stm32-microcontrollers-stmicroelectronics.pdf
« Last Edit: June 08, 2020, 04:20:35 pm by robca »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2648
  • Country: us
Re: Looking for <$50 function generator
« Reply #17 on: June 08, 2020, 04:33:55 pm »
Here is a little code I did for a PIC16F877A to generate a sine wave.
It outputs parallel 8-bit samples to a MC1408 DAC from an interrupt routine.
The main() function does the setup from USB data.
I abandoned it because of its limited frequency range.  About 10KHz max with the 20MHz PIC clock.

These are just pieces of code.  See if you can follow it.

And you are right.  You need to send out a lot of samples at a fixed rate.
You are probably better off with the DDS and adding an output driver.

Code: [Select]
#ifdef WAVEGEN
typedef union {
   uint8_t  b[2];
   uint16_t i;
} bits_t;

uint8_t  S_Count;
uint8_t  S_Phase;
uint8_t  S_PhaseRate;
uint8_t  S_TimeRate;
uint8_t  S_Triangle;
bits_t   S_Time;
bits_t   S_Time1;
bits_t   S_Time2;

const uint8_t cosine[256] =
{
   254, 254, 254, 254, 254, 254, 253, 253, 252, 251, 251, 250, 249, 248, 247, 246,
   245, 244, 242, 241, 239, 238, 236, 235, 233, 231, 229, 228, 226, 224, 221, 219,
   217, 215, 213, 210, 208, 205, 203, 200, 198, 195, 193, 190, 187, 184, 182, 179,
   176, 173, 170, 167, 164, 161, 158, 155, 152, 149, 146, 143, 139, 136, 133, 130,
   127, 124, 121, 118, 115, 111, 108, 105, 102,  99,  96,  93,  90,  87,  84,  81,
    78,  75,  72,  70,  67,  64,  61,  59,  56,  54,  51,  49,  46,  44,  41,  39,
    37,  35,  33,  30,  28,  26,  25,  23,  21,  19,  18,  16,  15,  13,  12,  10,
     9,   8,   7,   6,   5,   4,   3,   3,   2,   1,   1,   0,   0,   0,   0,   0,
     0,   0,   0,   0,   0,   0,   1,   1,   2,   3,   3,   4,   5,   6,   7,   8,
     9,  10,  12,  13,  15,  16,  18,  19,  21,  23,  25,  26,  28,  30,  33,  35,
    37,  39,  41,  44,  46,  49,  51,  54,  56,  59,  61,  64,  67,  70,  72,  75,
    78,  81,  84,  87,  90,  93,  96,  99, 102, 105, 108, 111, 115, 118, 121, 124,
   127, 130, 133, 136, 139, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173,
   176, 179, 182, 184, 187, 190, 193, 195, 198, 200, 203, 205, 208, 210, 213, 215,
   217, 219, 221, 224, 226, 228, 229, 231, 233, 235, 236, 238, 239, 241, 242, 244,
   245, 246, 247, 248, 249, 250, 251, 251, 252, 253, 253, 254, 254, 254, 254, 254,
};
#endif


//================================================================================
void main(void)
{
   while (1) {
         receivePacket();
         switch () {

            #ifdef WAVEGEN
            // Sine wave generation token...
            // MC1408 8-Bit Multiplying Digital-to-Analog Converter
            //    buffer[2] == Time1 MSB
            //    buffer[3] == Time1 LSB
            //    buffer[4] == Time2 MSB
            //    buffer[5] == Time2 LSB
            //    buffer[6] == Time rate
            //    buffer[7] == Phase rate
            //    buffer[8] == Triangle flag
            //    buffer[9] == Voltage reference
            case FT_WAVEGEN:
               S_Time1.b[1]=buffer[2];
               S_Time1.b[0]=buffer[3];
               S_Time2.b[1]=buffer[4];
               S_Time2.b[0]=buffer[5];
               S_TimeRate=buffer[6];
               S_Time.i=S_Time1.i;
               S_PhaseRate=buffer[7];
               S_Triangle=buffer[8];
               S_Phase=0;
               S_Count=0;
               TRISC=0x00;                   // set port C as output
               // Setup voltage ref configuration
               TRISAbits.TRISA2=1;
               CVRCON=buffer[9];
               // Setup CCP1 configuration
               CCPR1H=S_Time.b[1];
               CCPR1L=S_Time.b[0];
               CCP1CON=0x0B;                 // Compare mode, trigger special event
               // Setup Timer1 configuration
               TMR1H=0;
               TMR1L=0;
               T1CON=0x05;                   // 1:1 Prescale | TMR1CS | TMR1ON bits
               // Enable CCP1 interrupt
               PIR1bits.CCP1IF=0;            // CCP1 Interrupt Flag bit
               PIE1bits.CCP1IE=1;            // CCP1 Interrupt Enable bit
               INTCON=0xC0;                  // GIE and PEIE interrupts
               break;
           #endif

         }
   }
}


//================================================================================
#ifdef WAVEGEN
void __interrupt() isr(void)
{
   if (PIE1bits.CCP1IE && PIR1bits.CCP1IF) {

      PIR1bits.CCP1IF=0;            // clear CCP1 Interrupt Flag

      IOCKpin=0;                    // set CLOCK- pin low

      if (S_Triangle) {
         if (S_Phase < 128)
            PORTC=S_Phase*2;
         else
            PORTC=(255-S_Phase)*2;
      } else {
         PORTC=cosine[S_Phase];
      }
      S_Phase+=S_PhaseRate;

      if (S_TimeRate > 0) {
         if (S_Count == 0) {
            if (S_Time2.i > S_Time1.i) {
               S_Time.i+=S_TimeRate;
               if (S_Time.i > S_Time2.i) S_Time.i=S_Time1.i;
            }
            if (S_Time2.i < S_Time1.i) {
               S_Time.i-=S_TimeRate;
               if (S_Time.i < S_Time2.i) S_Time.i=S_Time1.i;
            }
            CCPR1L=S_Time.b[0];
            CCPR1H=S_Time.b[1];
         }
         S_Count++;
      }

      IOCKpin=1;                    // set CLOCK- pin high
   }
}
#endif


 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Looking for <$50 function generator
« Reply #18 on: June 08, 2020, 04:39:28 pm »
I have an STM32F407 and an STM32H743 board and can definitely use them to build a signal generator. With DMA and plenty of memory, I should be able to also have arbitrary waveforms.

But I'm unclear on how you you would get a 6 MHz sine, given that the DAC rate on an STM32F407 is 10.5Msps, and you would need at a minimum 128 samples for a full sine with half decent SNR. Do you have more info on what technique is used for that?
Name of technique: filtering. With good filter you can achieve better than 60dB SNR up-to 1:10 fout/mclk rate. 6MHz sine is above Nyquist frequency of 10.5 Msps, it means harmonic mode with steep bandpass filter and huge SNR penalties. I would not go higher than 1/4 MCLK meaning 2.5MHz for 10.5Msps. Further reading: https://www.ieee.li/pdf/essay/dds.pdf.
« Last Edit: June 08, 2020, 04:45:53 pm by ogden »
 

Online helius

  • Super Contributor
  • ***
  • Posts: 3675
  • Country: us
Re: Looking for <$50 function generator
« Reply #19 on: June 08, 2020, 05:01:09 pm »
There are many XR2206 based function generators under $7 on ebay. It's an obsolete part, but they seem to have made millions of them.
 

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #20 on: June 08, 2020, 05:12:47 pm »
There are many XR2206 based function generators under $7 on ebay. It's an obsolete part, but they seem to have made millions of them.
Yes, thanks, it's one of the cheap options I mentioned in my original post. Alas, most (all?) of the XR2206 on eBay are built using Chinese clone chips that are not as good as the original especially at higher frequencies, so I would have to buy a kit, then look for an original XR2206 (which from time to time pops up on eBay but tend to be expensive).

They didn't make that many original XR2206, but Chinese cloners seem to have filled the void  >:D
 

Online MasterT

  • Frequent Contributor
  • **
  • Posts: 824
  • Country: ca
Re: Looking for <$50 function generator
« Reply #21 on: June 08, 2020, 06:13:21 pm »
But I'm unclear on how you you would get a 6 MHz sine, given that the DAC rate on an STM32F407 is 10.5Msps, and you would need at a minimum 128 samples for a full sine with half decent SNR. Do you have more info on what technique is used for that?

According to ST, you can expect much lower frequencies from a STM32F407 even using multiple tricks and optimizations https://www.st.com/resource/en/application_note/dm00129215-extending-the-dac-performance-of-stm32-microcontrollers-stmicroelectronics.pdf
The trick is you don't have to run 128 samples / period of sine. 4 samples is sufficient at high frequency end, and there are 2 DAC . Filtering would smooth out edges and take care of SNR. Triggering DAC's by two Timers in "interleaved" manner with preconfigured DMA & LUT.   Having master clock  180MHz  on stm32F446re frequency resolution is about 6kHz with 1MHz output, well not milliHertz .

Pictered 1 dac at 4MHz clock outputs sine, stm32f446re, built like AP note you linked, with external buffer ad4891 and 4-th order sallen-key filter.
 
The following users thanked this post: robca, ogden

Online MasterT

  • Frequent Contributor
  • **
  • Posts: 824
  • Country: ca
Re: Looking for <$50 function generator
« Reply #22 on: June 16, 2020, 02:51:29 pm »
I tested STM32G474 -nucleo board, to see what max data rate could get. FYI, micro has 7 DAC's, 4 of them 15 msps. Theoretically 60 msps AWG, but dma limits this value down to 40 msps.
I also checked out overclocking possibility, and find out that micro is stable at 280 MHz internal clock, not bad for rated as 170 over all temperature range.  So, rate jumps up to 40 x 280/ 170 = 65.88 msps
The issues with 4 to 1 MUX upconverter, using internal MUX-OPA I was able to build one in two stages. Two mux-es (OPAMP6 & 5) driving 10 msps up to 20 (nominal clock PLL 160MHz) , and than one mux (OPAMP2) brings 20 to 40. Problem with slew rate of internal OPA, switching inputs with OPA been in high power mode complicates stability, settling time is too big , like 100 nsec or so.  Idea may works with external up-converter LVC4066 and fast high speed opamp.
 If not to chase high rates, than 4 buffered channels AWG at 10 msps per each channel easily obtainable out of $23~ CAD board.
« Last Edit: June 16, 2020, 02:54:11 pm by MasterT »
 
The following users thanked this post: robca, ogden

Offline Chris Roubis

  • Contributor
  • Posts: 19
  • Country: au
  • Chris Roubis
Re: Looking for <$50 function generator
« Reply #23 on: July 08, 2020, 11:48:01 am »
I have the FY6900 Function generator.

Cannot complain, except when I do a square wave, anything above 10mhz and the square wave starts looking like a sine wave.

Other than that, its all good.
Electricians have longer fuses
 
The following users thanked this post: robca

Offline robcaTopic starter

  • Frequent Contributor
  • **
  • Posts: 257
Re: Looking for <$50 function generator
« Reply #24 on: July 12, 2020, 08:23:29 pm »
In the end I went with a 1980s era Wavetek 190, for which I paid around $30, shipping included. It works well up to 5MHz, starts having problems with distortion above that. Still need to calibrate it, though, so it might get better. https://www.eevblog.com/forum/testgear/help-restoring-1980s-era-electronics-(wavetek-190-function-generator)

I have to say that I really like the old school potentiometers and rotary switches to quickly set up everything. Clearly not as powerful as a modern one, but does everything I need and then some

Before calibrating, though, I need to ensure I have the proper 50 Ohm terminators and cables. I can see big differences in signal, especially square waves, when I use different probes and switch the oscilloscope input to 50 Ohm (which I need to be careful doing, since the scope I use has only a tiny 50 Ohm resistor and the signal generator can provide 15 Vpp at 50 Ohm)

So for your FY6900 you also might need a pass through 50 Ohm terminator or a T with a 50 Ohm terminator on one side
« Last Edit: July 13, 2020, 01:23:10 am by robca »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf