r/electronics • u/S4vDs • 12h ago
Project AWG
Hello everyone,
Six months ago I set upon the journey of making my own AWG, with frequencies of up to 1MHz.
6 months later I present you my very own awg.
I set out to build my own function generator after finding commercial units both too expensive and more general-purpose than I needed, and it looked like a good excuse to work through analog synthesis, filtering, and mixed-signal PCB design end to end.
The sine path is an 8-bit R-2R ladder driven by a Raspberry Pi Pico W (overclocked to 225MHz) generating samples via a DDS phase accumulator; the square wave comes from the same chip’s PIO hardware. I started off with a breadboard and tried sallen key filters for noise but they amplified the noise aswell. I also tried discrete components for the sauare wave before replacing it outright with a TC4427 gate driver.
The sine chain settled on a 5th-order doubly-terminated LC Butterworth reconstruction filter, replacing an earlier cascaded-RC design that was capping amplitude, followed by LM318 gain and buffer stages. Three PCBs went out; two came back dead. V1.0 was completely non-functional because a BOM matcher substituted 2.21Ω resistors for 2.21kΩ across the entire R-2R ladder. V1.1 moved to an all-SMD board with the LC Butterworth filter but came up dead silent; testing the square path first (it worked) narrowed the fault to the sine chain, which traced to a KiCad-to-Altium migration that had silently shorted two LM318 input pins onto one net. V1.2 fixed that short, soldered the Pico directly to the board in place of a socket, and came up working: sine characterised from 0Hz to 1MHz and square to 2MHz, with AM, FM, and noise modes added on top in firmware, all controllable from a Python desktop UI over USB.
Looking at it now, a redesign with some improvements (better op-amps and also fewer) would be better but I also want to work on other stuff, so for now this is it.
To be clear, I made every schematic and protoype and thought up everything myself. As such this may not be the best way to do this. My main goal, was experience after all.