Choosing a Signal Generator

A common problem in embedded firmware development is having to develop routines which read-in a given signal. Usually you have a sample device available which can produce the required signal on demand, but it is not always quick and simple to get this signal when you need it, and to get an exactly repeatable version of it. For example, if it is a sensor signal, then the signal will vary according to the sensed parameter (temperature, humidity, light) and will vary just due to noise so that it is difficult to get exactly the same signal twice. Even if you have the sample device and it can be made to produce the signal, it can be bulky, heavy or power consuming and so difficult to have on your desk along with your prototype hardware. Therefore there is often a need for some sort of signal generator which can act as a stand-in for the signal from the sample product during development.

Starting Small

DDS function generator

At one end of the scale you have simple analogue oscillators which can produce sine, square, triangle and pulse waveforms with continuous frequency and amplitude adjustments. Whilst it is not difficult or expensive to build the simplest of these circuits, the home-built version will suffer from various problems such as temperature and time stability, so a bench instrument might be preferred. Recently there has been a surge of digitally synthesized oscillators such as these ebay products based around AD9833 chips, which eliminate the analogue issues of stability. These are handy to have around but as soon as you need a slightly more complex waveform than the simple sine, square, or triangle become inadequate. At this point you realise that you need two or more so that you can use one to modulate the other, or even an arbitrary waveform generator.

Arbitrary Waveform Generators

Tek AFG2352

Arbs are built for the problem of reliably reproducing a particular signal, so they are ideal for this sort of task. I have long wanted to own one because it would make developing and testing these reading-in routines much more scientific and repeatable, not to mention faster. However, when I first encountered them, they were very expensive. A typical Arb from a well known manufacturer would be the Tektronix AFG3252 which retails at over 6000 USD in used condition! It's a great spec though: 2 channel, 240 MHz bandwidth, 2GSa/sec, 128k arb points, 14 bit vertical resolution, 10V into 50 ohms, modulation types AM, FM, PM, FSK, PWM, sweep, burst, USB connectivity. Here's w2aew using one

Cheaper alternatives

Since the rise of brands like Rigol and Siglent in the oscilloscope market, you might expect them to have good value arbs to beat the likes of Tektronix and Keysight. You'd be right, Rigol has the DG800 with a superb arb record length of 2M points at 181 GBP, but it is only single channel. Siglent has the SDG800 at slightly less, 151 GBP, and a dual channel SDG100X at 232 GBP with 16k points for the arb at 150 MSa/sec. I'm sure these are all excellent signal generators, judging from my experience with my Siglent SDS 1104X-E DSO and having seen the Rigol scopes in use. But is there anything in between a couple of DDS oscillators from ebay and paying over 150 GBP for a "proper" arb?

A budget DDS signal generator and Arb

The availability of chips which do most of the work for you has meant that a budget DDS signal generator and arb is now available. In much the same way as building a high speed digital oscilloscope used to be the province of the highly skilled and experienced teams in the established companies like Tektronix, Agilent and Lecroy until chips like AD9288 came only, which allowed for players like Rigol and Siglent, FPGA chips have done the same for the signal generator. You can now find substantially the same sig gen on ebay with various different brands such as KK Moon and JDS but the originator seems to be FeelTech who have progressed through their 24 MHz FY3200S through FY6600 and FY6800 to the current FY6900.

FY6900 signal generator

For 75 GBP delivered, the FY6900 offers something which is close enough to the Tek AFG3252 for the hobbyist/less demanding professional user, even if it does have some shortcomings. It's a two channel, 250 MSa/sec, 14 bits vertical, 8k points of arb waveform, 24Vpp to 5 MHz, 20Vpp to 10MHz, 10Vpp to 20MHz, 5Vpp to 60 MHz, 60 MHz bandwidth with modulations, sweeps and burst functions, with a 2.4" colour screen for waveform preview. The two channels can be offset in phase in 0.001 deg steps or have parameters synced together, there are 34 built in waveforms and 64 arb waveform memories (10 MHz max), and 20 preset memories. On top of all that, there is a 2 kHz VCO input for external modulation, and an independent 0.01 Hz to 100 MHz frequency counter input. Arb waveforms can be created using a PC application and downloaded using USB.

PC software screenshot

Whilst it is great for the price, before purchase you should be aware of various problems because it is a long way from perfect. If you can't live with these problems, you should be looking at spending at least double for the single channel and triple for the dual channel SDG100X. In demanding applications, some have doubts about the Rigol or Siglent products and would be looking at Tek or Keysight, but then you are spending multiple thousands.

Some problems with the FY6900

According to SDG Electronics, the BNC ground connections are connected to mains earth using a signal cable which isn't appropriately mains rated and the Y class capacitor across the transformer goes back to neutral instead of earth.

PSU in FY6900, from SDG Electronics

I measured amplitude errors with both sine and square wave signals which were quite high, and don't seem appropriate given the amplitude resolution of 1mV. At 10 kHz, sine waveforms were +7.2% and square waves +9.0% over a range of 0.1 to 10V. Take the amplitude figure on the screen of the FY6900 as an indicator, not a measurement, and use your scope for measurements.

The DC signal has terrible accuracy, anywhere from +87% to +2.9% over 0.1 to 12V range, but then this isn't really a main use case for a signal generator. Again, it is so far off that the 1mV resolution seems worthless, so don't use the figure on screen of the FY6900 as a measurement.

Signals often have 20mV DC offsets. You can either offset this out using the offset menu item or use AC coupling on the input to the signal consumer to avoid this, but notice that it will show up in FFTs (as a 0 Hz component) unless you take this action.

Since it is only 14 bits, the sine isn't clean enough for distortion measurements in audio but is fine for other general purposes. If you are doing audio, an FFT on a 8 bit vertical resolution scope wouldn't be good enough either. I've run FFTs on 10 kHz and 1 MHz sines.

10 kHz sine at 1V FFT
1 MHz sine at 1V FFT

The square wave goes up to 25 MHz. Here are a set of screenshots taken with 100 MHz compensated probes and 100 MHz DSO (20 MHz bandwidth limiter off) at 1 MHz, 5 MHz, 10 MHz, 20 MHz. This is unloaded, x10 probe only, using a spring connection for ground to the BNC shell at the sig gen end, with the probe point into the BNC center hole, as is needed for proper RF probe technique.

probe with spring ground in ch 2
1 MHz square
5 MHz square
10 MHz square
20 MHz square

Still just about reasonable at 25 MHz.

25 MHz square

I was hoping that the SYNC output would have an edge corresponding to the start of the sweep point when using SWEEP option, ie the triangle modulation wave but it does not work like that. The SYNC output produces pulses at the same frequency as the channel signal. If you want to see the modulation signal, the best option is to use channel 2 to modulate channel 1 using the MOD option with source CH2, which is done internally but you still get the channel 2 modulation signal for the scope.

DDS Signal PC Software 

Finally, we come to the PC software. Whilst I can live with the poor general design, bad fonts, misnaming and spelling errors, I can't live with crashing due to complete lack of input field validation. Any text fields which can't allow a zero value produces a Run-time error '13' Type mismatch if you select the existing text and press Delete (in preparation to entering a new value) as I am in the habit of doing. When you OK the message box, the program crashes and you lose your latest changes.

It is highly frustrating because it is so simple to fix. Just a check for empty string, followed by checking that the string is numeric, before checking if the range is acceptable. If FeelTech open sourced this VB6 application, I could fix these bugs in seconds.

I can't seem to get the Waveform window - File Open file functionality to work without crashing either, even on files it has just saved. However, there is a way to get a defined list of values into the software and across to the arb, and that is using the Text Window tab.

If you have your arb waveform as a list of 8192 values in a plain text file, use the Text Window, click in left hand pane and Control-A to select all, paste in (Control-V) your list of values from your file. Select the Loading Area number you want to use (1 is ARB1 on the sig gen etc) and click Send Data. You get a light blue progress bar in the bottom status bar area of the window and at the end of this process your signal will be emitted. 

An Arb waveform in the generator

 Updated on 14/01/2020 with square wave probed with better RF grounding technique.