Skip to content

Simple graphing sketches to graph an analog signal, with a ili9341 or ili9488 display

Notifications You must be signed in to change notification settings

gcrcien/ESP32_Audio_FFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š ESP32 Real-Time FFT + Waterfall Visualizer This project implements a real-time frequency spectrum analyzer using FFT (Fast Fourier Transform) and a waterfall display on an ESP32 with an ILI9341 TFT screen. It captures audio or analog signals through the internal ADC, performs spectral analysis, and visualizes the result graphically.

πŸ”§ Requirements ESP32

ILI9341 TFT display

Arduino libraries:

arduinoFFT

Adafruit_ILI9341

Adafruit_GFX

πŸ“ Specifications Sampling rate: 512 samples at 44 kHz

FFT resolution: 512-point FFT (covers up to 22 kHz)

Display outputs:

Real-time FFT bar graph

Waterfall (scrolling color-based frequency map)

Color mapping: blue β†’ cyan β†’ yellow β†’ red, based on signal intensity

Adjustable gain: via fftGain_dB

Optional noise subtraction (simple spectral background filtering)

ADC sampling via analogRead(), synchronized with micros() timer

πŸ“Œ Default Pinout Signal ESP32 Pin Description ADC_IN GPIO35 Analog input (ADC1_CH8) DAC_OUT GPIO25 DAC output (optional use) TFT_CS GPIO15 Chip Select for TFT TFT_DC GPIO2 Data/Command for TFT TFT_RST GPIO4 TFT Reset

πŸ–₯️ Display Interface FFT view: vertical green bars representing signal magnitude

Waterfall view: scrolling spectral heatmap with colors for intensity

Colors are calculated with the intensityToColor() function for a smooth gradient. fft_1

πŸ” Key Functions captureSamples() β€” Samples analog data at precise intervals

drawFFTLine() β€” Draws vertical spectrum bars on screen

drawWaterfallLine() β€” Draws and scrolls new waterfall lines

intensityToColor() β€” Maps signal intensity to RGB color

smoothMagnitude() β€” Applies simple smoothing to FFT bins

πŸ§ͺ Options & Features Set useNoiseSubtraction = true to enable simple background noise filtering.

Adjust fftGain_dB to scale the FFT intensity (useful for visual tuning).

πŸ“· Demo (Insert a GIF or image of the waterfall + FFT display here)

πŸ“ Related Projects If you have other similar versions (e.g., DMA-accelerated, I2S ADC, ILI9488 support), you can reuse this structure and update:

Sampling method (analogRead() vs I2S)

Screen resolution and type

FFT size or frequency range

About

Simple graphing sketches to graph an analog signal, with a ili9341 or ili9488 display

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages