Preprint / Version 1

Comparing Ways of Producing an Audio Signal with Electronics


  • Sophia Dong Polygence



Fourier transform, Shannon sampling theorem, PIC microcontroller


This study presents two comprehensive explorative efforts at the practical aspects involved in using basic principles of Fourier transform and Shannon sampling theorem to implement audio signals via digital synthesis and basic controlling on a MCU. This project aims to serve as a technical report for beginners, allowing individuals to get a head start on learning about circuits. While not centered on groundbreaking discoveries, the research focuses on providing a detailed, step-by-step account of the construction process. The project encompasses the selection and integration of electronic components, particularly of the PIC microcontroller series; using the C language in the MPLAB IDE XC8 and STM Cube IDE softwares to program working software for the PIC microcontroller to generate a sound. Emphasizing hands-on experience, the study offers valuable insights into the technical intricacies of electronic instrument assembly and production. Additionally, the research emphasizes the creative potential inherent in DIY instrument making, fostering a sense of innovation and exploration within the maker community, especially among those who are relatively new to the realm of electronics. By documenting the construction process, sharing the knowledge gained, and breaking down the work into easily digestible pieces for an unfamiliar audience, this research contributes to the collective expertise of hobbyists, electronics enthusiasts and aspiring instrument makers, encouraging further experimentation and innovation in the realm of electronic musical instruments.


Audio and waveform generation using the DAC in STM32 products [Brochure]. (2020). STMicroelectronics.

ControllersTech. (n.d.). WavePlayer using STM32 Discovery. ControllersTech. Retrieved December 9, 2023, from

ControllersTech. (2021, January 17). WAVEPLAYER using STM32 || I2S AUDIO || CS43L22 || F4 DISCOVERY [Video]. YouTube.

Dogan, D. (2014). Generating Pulse-Width Modulation Waveform. In Designing Embedded Systems with 32-Bit PIC Microcontrollers and MikroC: Chapter 8 - Advanced PIC32 Projects (pp. 359-442). Elsevier Ltd.,to%20power%20control%20and%20conversion.

J. J. Wikner. (2014, February 9). Note on the Power-Speed-Resolution trade-off for a DAC.

McAllister, M. (2023, June 1). Digital Audio Basics: Aliasing Explained.,other%20artifacts%20into%20the%20recording

PIC16F87/88 Data Sheet 18/20/28-Pin Enhanced Flash Microcontrollers with nanoWatt Technology [Pamphlet]. (2005). Microchip Technology Inc.

PIC16F88_organ_tone [Table]. (n.d.).

Wach, Matt. (2022). Milling Printed Circuit Boards (PCBs) on a Cheap CNC Machine.

STM32F405/415, STM32F407/417, STM32F427/437 and STM32F429/439 advanced ArmĀ®-based 32-bit MCUs [Brochure]. (2021). STMicroelectronics.

STM32F4DISCOVERY [Pamphlet]. (2012). chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/

MECHATRONICS. (2015, December 9). Tutorial 8 Interrupt Programming and its simulation using Proteus for PIC microcontroller [Video]. YouTube.

Additional Files