Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Raspberry Pi Pico: Examples, Pinouts, and Specs

Image of Raspberry Pi Pico
Cirkit Designer LogoDesign with Raspberry Pi Pico in Cirkit Designer

Introduction

The Raspberry Pi Pico is a compact, low-cost microcontroller board built around the RP2040 chip. It features dual ARM Cortex-M0+ cores, 264KB of SRAM, and 2MB of onboard flash memory. Designed for versatility, the Pico supports programming in C, C++, MicroPython, and CircuitPython, making it an excellent choice for embedded systems, IoT applications, and rapid prototyping.

Explore Projects Built with Raspberry Pi Pico

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wi-Fi Controlled RGB Lighting with Raspberry Pi Pico W
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico in a practical application
This circuit features a Raspberry Pi Pico W microcontroller connected to an RGB LED through GPIO pins GP17, GP18, and GP19 for controlling the blue, green, and red channels, respectively. A resistor is connected between the 3V3 OUT pin of the Pico and the common cathode of the RGB LED to limit the current. The embedded code suggests the Pico W is configured for Wi-Fi connectivity and MQTT communication to control the LED and possibly other peripherals not shown in the circuit, with additional functionality for sensor monitoring and display output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico-Based Navigation System with Bluetooth and GPS
Image of sat_dish: pwm application: A project utilizing Raspberry Pi Pico in a practical application
This circuit features a Raspberry Pi Pico microcontroller interfaced with multiple peripherals for navigation and control. It includes an HC-05 Bluetooth module for wireless communication, an HMC5883L compass for magnetic heading detection, a GPS NEO 6M module for location tracking, and an SG90 servomotor for actuation. The Pico manages data exchange with the GPS and compass via serial connections, controls the servomotor, and communicates wirelessly through the HC-05 module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico-Based Navigation Assistant with Bluetooth and GPS
Image of sat_dish: compass example: A project utilizing Raspberry Pi Pico in a practical application
This circuit features a Raspberry Pi Pico microcontroller interfaced with an HC-05 Bluetooth module for wireless communication, an HMC5883L compass module for magnetic field measurement, and a GPS NEO 6M module for location tracking. The Pico is configured to communicate with the HC-05 via serial connection (TX/RX), with the compass module via I2C (SCL/SDA), and with the GPS module via serial (TX/RX). Common power (VCC) and ground (GND) lines are shared among all modules, indicating a unified power system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico W-Based Smart Home Automation System with Motion Detection and Environmental Monitoring
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico in a practical application
This circuit features a Raspberry Pi Pico W microcontroller connected to various sensors and actuators, including a DHT11 temperature and humidity sensor, an RCWL-0516 microwave radar motion sensor, a photocell (LDR) with a resistor for light detection, and a two-channel relay controlling a bulb and a fan. The microcontroller runs code to monitor environmental conditions and motion, displaying information on an LCD and allowing remote control via MQTT messages over Wi-Fi. It supports both automatic sensor-based operation and remote app control, with pushbuttons to switch between modes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Raspberry Pi Pico

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico in a practical application
Wi-Fi Controlled RGB Lighting with Raspberry Pi Pico W
This circuit features a Raspberry Pi Pico W microcontroller connected to an RGB LED through GPIO pins GP17, GP18, and GP19 for controlling the blue, green, and red channels, respectively. A resistor is connected between the 3V3 OUT pin of the Pico and the common cathode of the RGB LED to limit the current. The embedded code suggests the Pico W is configured for Wi-Fi connectivity and MQTT communication to control the LED and possibly other peripherals not shown in the circuit, with additional functionality for sensor monitoring and display output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sat_dish: pwm application: A project utilizing Raspberry Pi Pico in a practical application
Raspberry Pi Pico-Based Navigation System with Bluetooth and GPS
This circuit features a Raspberry Pi Pico microcontroller interfaced with multiple peripherals for navigation and control. It includes an HC-05 Bluetooth module for wireless communication, an HMC5883L compass for magnetic heading detection, a GPS NEO 6M module for location tracking, and an SG90 servomotor for actuation. The Pico manages data exchange with the GPS and compass via serial connections, controls the servomotor, and communicates wirelessly through the HC-05 module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of sat_dish: compass example: A project utilizing Raspberry Pi Pico in a practical application
Raspberry Pi Pico-Based Navigation Assistant with Bluetooth and GPS
This circuit features a Raspberry Pi Pico microcontroller interfaced with an HC-05 Bluetooth module for wireless communication, an HMC5883L compass module for magnetic field measurement, and a GPS NEO 6M module for location tracking. The Pico is configured to communicate with the HC-05 via serial connection (TX/RX), with the compass module via I2C (SCL/SDA), and with the GPS module via serial (TX/RX). Common power (VCC) and ground (GND) lines are shared among all modules, indicating a unified power system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico in a practical application
Raspberry Pi Pico W-Based Smart Home Automation System with Motion Detection and Environmental Monitoring
This circuit features a Raspberry Pi Pico W microcontroller connected to various sensors and actuators, including a DHT11 temperature and humidity sensor, an RCWL-0516 microwave radar motion sensor, a photocell (LDR) with a resistor for light detection, and a two-channel relay controlling a bulb and a fan. The microcontroller runs code to monitor environmental conditions and motion, displaying information on an LCD and allowing remote control via MQTT messages over Wi-Fi. It supports both automatic sensor-based operation and remote app control, with pushbuttons to switch between modes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home automation
  • Robotics and motor control
  • Sensor interfacing and data logging
  • Educational projects and learning microcontroller programming
  • Prototyping for embedded systems

Technical Specifications

Key Technical Details

  • Microcontroller: RP2040 (dual ARM Cortex-M0+ cores, up to 133MHz)
  • Memory: 264KB SRAM, 2MB onboard QSPI flash
  • GPIO Pins: 26 multi-function pins (3.3V logic level)
  • Interfaces: I2C, SPI, UART, PWM, ADC (3 channels), USB 1.1
  • Power Supply: 1.8V to 5.5V (via micro-USB or VSYS pin)
  • Operating Temperature: -20°C to +85°C
  • Dimensions: 51mm x 21mm

Pin Configuration and Descriptions

The Raspberry Pi Pico has 40 pins, including power, ground, and GPIO pins. Below is a summary of the pin configuration:

Pin Number Pin Name Description
1 GP0 GPIO0, UART0 TX, I2C0 SDA, SPI0 RX
2 GP1 GPIO1, UART0 RX, I2C0 SCL, SPI0 CSn
3 GND Ground
4 GP2 GPIO2, UART1 TX, I2C1 SDA, SPI0 SCK
5 GP3 GPIO3, UART1 RX, I2C1 SCL, SPI0 TX
36 3V3 3.3V Power Output
39 VSYS Power input (1.8V to 5.5V)
40 GND Ground

For a complete pinout diagram, refer to the official Raspberry Pi Pico documentation.

Usage Instructions

How to Use the Raspberry Pi Pico in a Circuit

  1. Powering the Pico:
    • Use a micro-USB cable to power the Pico via the USB port.
    • Alternatively, supply 1.8V to 5.5V to the VSYS pin for external power sources.
  2. Connecting GPIO Pins:
    • GPIO pins operate at 3.3V logic levels. Use level shifters if interfacing with 5V devices.
    • Configure pins as input, output, or alternate functions (e.g., I2C, SPI) in your code.
  3. Programming the Pico:
    • Connect the Pico to your computer via USB.
    • Hold the BOOTSEL button while plugging in the USB cable to enter USB mass storage mode.
    • Drag and drop the firmware file (e.g., MicroPython UF2) onto the Pico's storage.

Important Considerations and Best Practices

  • Avoid exceeding the 3.3V logic level on GPIO pins to prevent damage.
  • Use decoupling capacitors when connecting sensors or modules to reduce noise.
  • For power-hungry peripherals, ensure the power supply can handle the additional current.

Example: Blinking an LED with MicroPython

Below is an example of how to blink an LED connected to GPIO25 using MicroPython:


Import the machine module to control hardware and the time module for delays

import machine import time

Configure GPIO25 (onboard LED) as an output pin

led = machine.Pin(25, machine.Pin.OUT)

Blink the LED in an infinite loop

while True: led.value(1) # Turn the LED on time.sleep(1) # Wait for 1 second led.value(0) # Turn the LED off time.sleep(1) # Wait for 1 second


Example: Reading an Analog Sensor

The following example demonstrates how to read an analog sensor connected to GPIO26 (ADC0):


Import the machine module to access ADC and the time module for delays

import machine import time

Configure GPIO26 as an ADC input

adc = machine.ADC(26)

Read and print the ADC value in an infinite loop

while True: value = adc.read_u16() # Read 16-bit ADC value (0-65535) print("ADC Value:", value) # Print the value to the console time.sleep(0.5) # Wait for 0.5 seconds


Troubleshooting and FAQs

Common Issues and Solutions

  1. Pico Not Detected by Computer:

    • Ensure the BOOTSEL button is held down while connecting the Pico to the computer.
    • Check the USB cable (some cables are power-only and do not support data transfer).
    • Verify that the Pico is receiving power (check the onboard LED).
  2. GPIO Pin Not Responding:

    • Confirm the pin is correctly configured in your code (input, output, or alternate function).
    • Check for loose connections or incorrect wiring.
    • Ensure the voltage levels are within the 3.3V range.
  3. Program Not Running After Power Cycle:

    • Ensure the program is saved to the Pico's flash memory.
    • If using MicroPython, ensure the script is named main.py to run automatically on boot.

FAQs

  • Can I use the Pico with Arduino IDE?
    Yes, the Raspberry Pi Pico is compatible with the Arduino IDE. Install the RP2040 board package to get started.

  • What is the maximum current output of the 3.3V pin?
    The 3.3V pin can supply up to 300mA, depending on the input power source.

  • Can I use the Pico for battery-powered projects?
    Yes, the Pico can be powered via the VSYS pin using a battery (e.g., LiPo or AA batteries). Ensure the voltage is within the 1.8V to 5.5V range.

  • How do I reset the Pico to factory settings?
    Reflash the original firmware by entering USB mass storage mode and copying the appropriate UF2 file to the Pico.

By following this documentation, you can effectively use the Raspberry Pi Pico for a wide range of projects and applications.