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

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

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

Introduction

The Raspberry Pi Pico 2 W is a compact and versatile microcontroller board developed by Raspberry Pi. It features a dual-core ARM Cortex-M0+ processor, 2MB of onboard flash memory, and built-in Wi-Fi connectivity. This board is designed for a wide range of applications, including Internet of Things (IoT) projects, embedded systems, and general-purpose microcontroller tasks. Its small form factor, low power consumption, and wireless capabilities make it an excellent choice for both hobbyists and professionals.

Explore Projects Built with Raspberry Pi Pico 2 W

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
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 2 W 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
Wi-Fi Controlled RGB Lighting with Raspberry Pi Pico W
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico 2 W 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
Dual Raspberry Pi Pico W Communication System
Image of html led: A project utilizing Raspberry Pi Pico 2 W in a practical application
This circuit consists of two Raspberry Pi Pico W microcontrollers interconnected via their pin 1 and pin 2. Both microcontrollers are programmed with basic setup and loop functions, but no specific functionality is defined in the provided code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi Pico W RGB LED Controller with Resistors
Image of RGB LED: A project utilizing Raspberry Pi Pico 2 W in a practical application
This circuit uses a Raspberry Pi Pico W to control an RGB LED through three 220-ohm resistors connected to its GPIO pins. The Pico W provides 3.3V power to the common anode of the RGB LED, allowing for color control via the GPIO pins GP13, GP14, and GP15.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Raspberry Pi Pico 2 W

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 2 W 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
Image of Smart Home Automation 1: A project utilizing Raspberry Pi Pico 2 W 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 html led: A project utilizing Raspberry Pi Pico 2 W in a practical application
Dual Raspberry Pi Pico W Communication System
This circuit consists of two Raspberry Pi Pico W microcontrollers interconnected via their pin 1 and pin 2. Both microcontrollers are programmed with basic setup and loop functions, but no specific functionality is defined in the provided code.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RGB LED: A project utilizing Raspberry Pi Pico 2 W in a practical application
Raspberry Pi Pico W RGB LED Controller with Resistors
This circuit uses a Raspberry Pi Pico W to control an RGB LED through three 220-ohm resistors connected to its GPIO pins. The Pico W provides 3.3V power to the common anode of the RGB LED, allowing for color control via the GPIO pins GP13, GP14, and GP15.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home automation
  • Wireless sensor networks
  • Robotics and motor control
  • Data logging and environmental monitoring
  • Prototyping and educational projects
  • Low-power embedded systems

Technical Specifications

The Raspberry Pi Pico 2 W is built around the RP2040 microcontroller and includes additional features for wireless connectivity. Below are the key technical details:

Key Specifications

Feature Specification
Microcontroller RP2040 (Dual-core ARM Cortex-M0+)
Clock Speed Up to 133 MHz
Flash Memory 2MB QSPI Flash
RAM 264KB SRAM
Wireless Connectivity 2.4 GHz Wi-Fi (802.11 b/g/n)
GPIO Pins 26 (3.3V logic level)
Communication Interfaces UART, SPI, I2C, PWM, ADC
USB Micro-USB (USB 1.1, Device and Host support)
Operating Voltage 3.3V (regulated from 5V input via USB or VSYS)
Power Supply 1.8V to 5.5V (via VSYS pin or USB)
Dimensions 51.3mm x 21mm

Pin Configuration and Descriptions

The Raspberry Pi Pico 2 W has a total of 40 pins, including power, ground, and GPIO pins. Below is the pinout description:

Power and Ground Pins

Pin Number Name Description
36 3V3 3.3V output from onboard regulator
39 GND Ground
40 VSYS Input voltage (1.8V to 5.5V)

GPIO Pins

Pin Number GPIO Alternate Functions
1 GPIO0 UART0 TX, I2C0 SDA, SPI0 RX
2 GPIO1 UART0 RX, I2C0 SCL, SPI0 CSn
3 GPIO2 PWM, I2C1 SDA, SPI0 SCK
4 GPIO3 PWM, I2C1 SCL, SPI0 TX
... ... ... (Refer to the official datasheet for full details)

Usage Instructions

How to Use the Raspberry Pi Pico 2 W in a Circuit

  1. Powering the Board:

    • Connect the board to a 5V USB power source via the Micro-USB port.
    • Alternatively, supply 1.8V to 5.5V to the VSYS pin for external power.
  2. Programming the Board:

    • The Pico 2 W can be programmed using MicroPython, C/C++, or CircuitPython.
    • To upload code, hold the BOOTSEL button while connecting the board to your computer via USB.
    • The board will appear as a mass storage device. Drag and drop the firmware file to flash it.
  3. Using GPIO Pins:

    • Connect peripherals (e.g., sensors, LEDs) to the GPIO pins.
    • Ensure that the GPIO pins operate at 3.3V logic levels to avoid damage.
  4. Wi-Fi Connectivity:

    • Use the built-in Wi-Fi module for wireless communication.
    • Libraries such as network in MicroPython or lwIP in C/C++ can be used to configure and manage Wi-Fi connections.

Example: Blinking an LED with MicroPython

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


Import the Pin and Timer classes from the machine module

from machine import Pin, Timer

Configure GPIO25 as an output pin

led = Pin(25, Pin.OUT)

Define a function to toggle the LED state

def toggle_led(timer): led.toggle() # Toggle the LED on/off

Create a timer to call the toggle_led function every 500ms

timer = Timer() timer.init(freq=2, mode=Timer.PERIODIC, callback=toggle_led)


Important Considerations and Best Practices

  • Voltage Levels: Ensure all connected devices operate at 3.3V logic levels. Use level shifters if interfacing with 5V devices.
  • Wi-Fi Antenna: Avoid placing metal objects near the onboard antenna to maintain strong wireless performance.
  • Power Supply: Use a stable power source to prevent unexpected resets or performance issues.
  • Firmware Updates: Regularly check for firmware updates to ensure compatibility and access new features.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the computer:

    • Ensure the BOOTSEL button is held down while connecting the board via USB.
    • Check the USB cable for data transfer capability (some cables are power-only).
  2. Wi-Fi connection fails:

    • Verify the SSID and password are correct.
    • Ensure the Wi-Fi network operates on the 2.4 GHz band (not 5 GHz).
  3. GPIO pins not working as expected:

    • Confirm the pin mode (input/output) is correctly configured in the code.
    • Check for short circuits or incorrect wiring.
  4. The board resets unexpectedly:

    • Ensure the power supply is stable and within the recommended voltage range.
    • Avoid drawing excessive current from the GPIO pins.

FAQs

  • Can I use the Raspberry Pi Pico 2 W with Arduino IDE?
    No, the Pico 2 W is not natively supported by the Arduino IDE. Use MicroPython or C/C++ SDK instead.

  • What is the maximum Wi-Fi range?
    The range depends on environmental factors but typically extends up to 30 meters indoors.

  • Can I use the Pico 2 W for battery-powered projects?
    Yes, the board supports a wide input voltage range (1.8V to 5.5V), making it suitable for battery operation.

  • Is the Pico 2 W compatible with the original Raspberry Pi Pico?
    Yes, the Pico 2 W is pin-compatible with the original Pico, with the added benefit of Wi-Fi connectivity.