Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To sample an analog signal on the original Raspberry Pi Pico, configure its RP2040 ADC for an input and sample interval, then use DMA to capture a block of readings into memory. Center and optionally window that block before transforming it with an FFT. For a buffer of N samples taken at actual rate Fs, FFT bin k represents k × Fs/N hertz. The ADC’s 500 kS/s maximum is a hardware conversion specification, not a guarantee of application-level capture quality.

What the Pico can sample

The original Raspberry Pi Pico is built around the RP2040, which has one ADC and an input multiplexer. Four external analog inputs map to GPIO26–GPIO29; ADC input 4 connects to the internal temperature sensor. Because the inputs share one converter, the Pico selects channels rather than sampling multiple external channels simultaneously. See Raspberry Pi’s Pico datasheet and Pico microcontroller boards documentation.

Raspberry Pi specifies 12-bit conversions and a maximum ADC conversion rate of 500 kS/s using an independent 48 MHz clock. The Pico SDK documents a 96-cycle conversion time and clamps a requested sampling interval if it is shorter than that conversion time. These are ADC capabilities and timing constraints, not proof that a particular program, signal source, or analog circuit will achieve equivalent measurement quality. Details are in the ADC hardware API documentation.

Capture a block of samples with DMA

For a finite sample block, Raspberry Pi’s official ADC DMA capture example is a practical starting point. It uses DMA to transfer readings from the ADC FIFO into a memory buffer, allowing the CPU to do other work during acquisition. The ADC FIFO can overflow if results arrive while it is full, so configure the transfer and buffer deliberately and make sure the rest of the application does not delay capture handling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Raspberry Pi Pico
  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz
  • 264KB of SRAM, and 2MB of on-board Flash memory
  • Castellated module allows soldering direct to carrier boards
  • 26 × multi-function GPIO pins
  1. Choose and configure the input. Initialize the ADC and select the GPIO channel connected to the signal, following the SDK’s ADC API and the board documentation.
  2. Set the sampling interval. Configure the ADC clock divider or interval for the intended sample rate. Account for the conversion-time limit; do not assume that requesting an interval faster than the ADC can convert will produce that rate.
  3. Prepare the buffer and DMA transfer. Allocate room for N samples, configure DMA to read the ADC FIFO, and set the transfer count. Available SRAM, capture length, and other application memory needs constrain the block size.
  4. Start acquisition and wait for completion. Start the DMA transfer and ADC sampling as shown in the official example. Ensure the transfer completes before accessing the captured block; then stop or re-arm acquisition as appropriate for the application.
  5. Prepare and transform the data. Convert raw readings into values suitable for the FFT, remove the signal’s DC offset when appropriate, and apply a window if needed. Run the transform only after the capture buffer is complete.
  6. Interpret the result. Map each FFT bin using the actual sample rate and buffer length, and apply the FFT library’s scaling conventions before reporting amplitude.

The Pico SDK’s introduction and API documentation provide the broader C/C++ context. Arm’s CMSIS-DSP examples include FFT and frequency-bin examples that can guide the transform and bin interpretation.

Choose DMA or polling for the capture

Approach Timing and CPU Implementation and buffer considerations
Foreground polling The CPU repeatedly checks or reads conversions, so other work can interfere with consistent servicing. Simpler for a basic experiment, but the program must keep up with conversions and handle readings without allowing the FIFO to overflow.
DMA block capture DMA transfers ADC FIFO readings to memory without requiring the CPU to copy each sample. Requires DMA and transfer setup plus a suitably sized buffer. The official example demonstrates the capture path.

These are implementation trade-offs, not a benchmark: Raspberry Pi’s example establishes how to capture with DMA, but the cited material does not quantify comparative performance for a particular Pico application.

Rank #2
2Pcs Raspberry Pi Pico Development Board, Raspberry Pi RP2040 Dual-core ARM Cortex M0+ Processor, Running Up to 133 MHz, Support C/C++/Python, 2MB Quad SPI Flash Integrated with SPI/I2C/UART Interface
  • The Raspberry Pi Pico is a beginner-friendly microcontroller board that uses MicroPython to give you a taste of the Internet of Things and microcontrollers. The RP2040 is a well-designed microprocessor that can be utilized in almost any Internet of Things project. It has enough power to complete the task quickly.
  • 【Raspberry Pi RP2040 Microcontroller】Raspberry Pi Pico features Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz. With 264KB of SRAM, and 2MB of on-board Flash memory.Supports up to 16 MB of off chip flash memory via a dedicated QSPI bus
  • 【Multiple Software Support】Pico has rich and complete software support, it comes with a complete Rasberry Pi official C/C++ SDK, Micropython SDK.The programming and burning of Pico need to be carried out on the computer. Supported operating systems and computers include:Raspberry Pie with Raspberry Pi OS,Other platforms equipped with Debian based Linux system Computer with MacOS, Computers with Windows, etc.
  • 【Rich Hardware Interface】Raspberry Pi Pico has 30 GPIO pins, 4 pins for analog signal input and 26 × multi-function GPIO pins, 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels.USB 1.1 supported by host and device, The installation mode can be flexibly selected by users to facilitate welding with other development boards.
  • 【Build Project in Tiny Size】Only 2.1cm*5.1cm ( as small as your thumb). Pico has been designed to use either soldered 0.1" pin-headers or can be used as a surface-mountable 'module'.

Set the FFT frequency scale correctly

For a uniformly sampled buffer containing N points at actual sample rate Fs, bin k corresponds to frequency k × Fs/N. The spacing between adjacent bins is Fs/N. For example, a longer capture at the same sample rate gives closer bin spacing, while changing the sample rate changes the frequency represented by every bin.

Use the rate the capture actually achieved, not merely the rate requested in configuration. An inaccurate rate makes the reported frequencies inaccurate even if the FFT calculation itself is correct. The sample rate, buffer length, and bin index together determine the frequency axis; the ADC’s maximum specification alone does not.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
With Pre-Soldered Header Raspberry Pi Pico Microcontroller Development Board Based on Raspberry Pi RP2040 Chip,Dual-Core ARM Cortex M0+ Processor
  • with pre-soldered header Raspberry Pi Pico. RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz. 264KB of SRAM, and 2MB of on-board Flash memory.
  • Castellated module allows soldering direct to carrier boards. USB 1.1 with device and host support. Low-power sleep and dormant modes. Drag-and-drop programming using mass storage over USB. 26 × multi-function GPIO pins.
  • 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels.Accurate clock and timer on-chip.Temperature sensor.
  • Accelerated floating-point libraries on-chip.8 × Programmable I/O (PIO) state machines for custom peripheral support

Center, window, and scale the samples

ADC samples include the signal’s baseline as well as its changing component. For frequency analysis, remove the block’s DC component when appropriate so that a baseline offset does not dominate the zero-frequency bin. A window can reduce spectral leakage caused when the captured block does not contain an integer number of cycles, but window choice also affects amplitude and bandwidth characteristics.

When reporting peak amplitudes, state the selected window and account for the FFT implementation’s scaling convention. A raw FFT magnitude is not automatically a calibrated voltage or a directly comparable amplitude. CMSIS-DSP documents FFT usage and frequency-bin examples in its examples; follow the specific transform’s input, output, and scaling requirements.

Rank #4
Sale
KEYESTUDIO Raspberry Pi Pico Basic Starter Kit with Headers Micro USB Cable, Pico RP2040 Microcontroller, Flexible 26 Multifunction GPIO Pins, Temperature Sensor, Programmable in C & MicroPython
  • New Flexible Microcontroller Board --- Raspberry Pi Pico is a tiny, fast, and versatile board. It's based on RP2040 chip, which features a dual-core Arm Cortex-M0+ processor with 264KB internal RAM and support for up to 16MB of off-chip Flash, flexible clock running up to 133 MHz.
  • Multi-Function GPIO Pins---It has 26 multifunction GPIO pins, including 3 analogue inputs, 2 × UART, 2 × SPI controllers, 2 × I2C controllers, 16 × PWM channels.
  • Rich Peripheral Set---A wide range of flexible I/O options includes I2C, SPI, and — uniquely —8 × Programmable I/O (PIO) state machines for custom peripheral support.
  • Multiple Software Support---Raspberry Pi Pico has rich and complete software support and community resources. Programmable in C and MicroPython. Drag-and-drop programming using mass storage over USB.
  • Low-power sleep and dormant modes; Accurate on-chip clock; Temperature sensor; Accelerated integer and floating-point libraries on-chip
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the analog input and measurement limits

The ADC’s bit depth and maximum conversion rate do not establish the noise floor, effective accuracy, or suitability of a complete measurement chain. Check the electrical limits for the specific Pico board revision and the requirements of the signal source before connecting it. Depending on the source and desired measurement, the input may need attenuation, biasing, buffering, or filtering. The cited official documentation does not certify a particular front end or waveform accuracy, so choose conditioning based on the circuit and signal rather than assuming a direct connection is always appropriate.

The original Pico has 264 kB SRAM and 2 MB onboard flash, according to the Pico datasheet. SRAM is where a captured sample buffer and working data must fit, so account for other memory use when choosing a block length. Pico and Pico H differ in whether headers are pre-soldered; that affects wiring convenience, not the core sampling method. Raspberry Pi documents the variants in its Pico hardware documentation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Freenove Raspberry Pi Pico Board Pre-Soldered Header, Dual-core Arm Cortex-M0+ Microcontroller, Development Board, Python C Java Code, Tutorial Example Projects
  • Raspberry Pi Pico: A tiny, fast, and versatile board built using dual-core Arm Cortex-M0+ processor (Comes with pinout card and stickers)
  • Detailed Tutorial: Provides step-by-step guide with MicroPython, C and Processing (Java) Code (The download link can be found on the product box) (No paper tutorial)
  • Example Projects: Each project has schematics, wiring diagrams, complete code and detailed explanations (Need extra items)
  • Easy to Use: Just connect the board to your computer (installed IDE) with the USB cable to program it
  • Get Support: Our technical support team is always ready to answer your questions

Choose an FFT implementation

A library such as CMSIS-DSP provides documented FFT examples and frequency-bin guidance. A custom transform may be an option for a narrowly defined use case, but the relevant trade-offs include supported lengths, memory use, numeric format, speed, and ongoing maintenance. The cited sources do not provide a benchmark comparing CMSIS-DSP with a custom FFT on a specific Pico configuration, so select based on the application’s requirements and verify the implementation’s scaling and buffer needs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.