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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.