Summary of ARBITRARY WAVE GENERATOR FOR THE RASPBERRY PI PICO
Once upon a time, if you wanted to generate some waveforms, you needed to buy an expensive off-the-shelf function generator or whip up a big pile of analog electronics. Not so today, when you can grab a fast microcontroller off the shelf and have it squirt out whatever fancy waves you might desire. That’s just what [rgco] did to build this nifty arbitrary wave generator. The build improves on prior work by [rgco] with the Arduino Uno, with which they built a device that could output at 381 kilosamples per second, with each sample update taking 42 instruction cycles. Thanks to the Pi Pico’s faster clock speed and certain performance optimizations, they were able to up that to a mighty 125 megasamples per second, using the DMA and PIO subsystems to output a new sample every single clock cycle. The result is a cheap function generator you can build with a Pi Pico and a handful of resistors, which will probably cost you the grand total of $12. It readily outperforms, at least in regards of speed, devices based on the AD9833 function generator chip, which only runs at 25 megasamples. Plus, that chip can only output sines, triangles, and squares! Even a passable function generator can be a useful tool to have in the workshop, as we’ve seen before. Video after the break. Source: ARBITRARY WAVE GENERATOR FOR THE RASPERRY PI PICO
Parts used in the Arbitrary Wave Generator for the Raspberry Pi Pico:
- Raspberry Pi Pico
- Resistors (handful for DAC resistor ladder)
- Wires/jumper cables
- Breadboard or PCB
- USB cable for power and programming
- Optional oscilloscope for output verification
Once upon a time, if you wanted to generate some waveforms, you needed to buy an expensive off-the-shelf function generator or whip up a big pile of analog electronics. Not so today, when you can grab a fast microcontroller off the shelf and have it squirt out whatever fancy waves you might desire. That’s just what [rgco] did to build this nifty arbitrary wave generator.

The build improves on prior work by [rgco] with the Arduino Uno, with which they built a device that could output at 381 kilosamples per second, with each sample update taking 42 instruction cycles. Thanks to the Pi Pico’s faster clock speed and certain performance optimizations, they were able to up that to a mighty 125 megasamples per second, using the DMA and PIO subsystems to output a new sample every single clock cycle.
The result is a cheap function generator you can build with a Pi Pico and a handful of resistors, which will probably cost you the grand total of $12. It readily outperforms, at least in regards of speed, devices based on the AD9833 function generator chip, which only runs at 25 megasamples. Plus, that chip can only output sines, triangles, and squares!
Even a passable function generator can be a useful tool to have in the workshop, as we’ve seen before. Video after the break.
Source: ARBITRARY WAVE GENERATOR FOR THE RASPBERRY PI PICO
- What microcontroller was used to achieve 125 megasamples per second?
The Raspberry Pi Pico was used to achieve 125 megasamples per second. - How was a new sample output every clock cycle?
By using the Pico's DMA and PIO subsystems to output a new sample every single clock cycle. - How does this build compare to the AD9833 chip in sample rate?
This Pico-based build reaches 125 megasamples per second versus the AD9833's 25 megasamples per second. - What waveforms can the Pico arbitrary wave generator produce compared to AD9833?
The Pico-based generator can output arbitrary waveforms, while the AD9833 is limited to sines, triangles, and squares. - What prior platform did rgco use for an earlier version?
rgco previously used an Arduino Uno for an earlier version that output at 381 kilosamples per second. - Approximately how much does the Pico-based function generator cost to build?
The article estimates the build will cost about $12 for the Pico and a handful of resistors. - What components are necessary for the DAC in this project?
A resistor ladder made from a handful of resistors is used as the DAC. - Is a function generator useful in a workshop according to the article?
Yes, the article states that even a passable function generator can be a useful tool in the workshop.
