Close

Tangent #0: Arbitrary Waveform Generator

A project log for The Rise and Fall of Pulses

A project in which I try to go faster and faster

ted-yapoTed Yapo 01/02/2019 at 00:410 Comments

While considering my next move, I thought it would be useful to have a simple multi-channel arbitrary waveform generator. The first thing to come to mind was the FL2k USB-to-VGA dongle and osmo-fl2k software library. I put together a python module for defining and digitizing some interesting waveforms which can be output through the adapter. The example code in GitHub generates the following waveforms:

There's no filtering on the output of the FL2k dongle (yet), so the waveforms look a little rough. There's some OK documentation of how to use the code on the GitHub page. As shown above, you can define sine waves, Gaussian edges and pulses with defined edge rates, and square-sided pulses. You can also define linear edges (ramps) and exponential (RC) edges. You can define the rise and fall times and the high and low measurement points (default 10% and 90%), as well as the edge threshold (default 50%).  The rise times and pulse widths measured on the scope are very close (modulo noise) to those defined in the code.

You choose the sample rate, and the code allows you to preview the output.

The outputs from the FL2k aren't very fast, in this case only using 100 MS/s (my laptop will do 150 MS/s maximum with this hardware). But, I think I need a source of some lower signals for initial testing before I move to shorter timescales.

Discussions