Maker Board Spotlight: Raspberry Pi Pico
The name Raspberry Pi is synonymous with single-board computers (SBCs) running Linux. Over the years, they've released various forms of the main Raspberry Pi computer including the smaller compute modules for embedded applications and the tiny Pi Zero, a fully functional Linux computer around the size of a credit card. Now, the Raspberry Pi Foundation has released its smallest board yet, the Pi Pico. It's based on custom silicon, and it comes with a big difference: The RP2040 chip Raspberry has built is not for running Linux. It's a microcontroller (MCU). Much more similar to an Arduino than any previous Raspberry Pi boards, the Pi Pico is a fantastic board for hobby electronics and learning about embedded hardware using tools like MicroPython. Best of all, it only costs $4.
What is the Raspberry Pi Pico?
The Pi Pico is a microcontroller unit (MCU) based on an RP2040 system-on-chip (SoC). As a microcontroller, the Raspberry Pi Pico relies on programs written externally, then compiled and uploaded to the board itself rather than a single-board computer like the Pi 4 that runs an operating system (OS) and applications directly. As such, the Pi Pico is engineered for embedded tasks and to run one app at a time, though that program may have multiple steps.
The RP2040 chip is the first custom silicon from the Raspberry Pi foundation, and it looks to be a very capable chip based on a dual-core Arm Cortex-M0+ processor running at up to 133 MHz. So far, programming libraries exist for MicroPython, CircuitPython, C, and C++, but Arduino IDE support will be coming soon which shoule make coding for the Pi Pico using C and C++ even easier. At this price, it's clear that the Pico is looking to take the place of small microcontrollers in many hobby projects, and knowing the Raspberry Pi community, it is likely to be well documented too.
What Makes the Pi Pico Special
On the surface, the Pi Pico looks similar to other microcontrollers, but there are a few features that stand out. The Pico has 16 channels of pulse width modulated (PWM) output, more than double what most other cheap microcontrollers provide. This makes it perfect for working with motors, dimming lights, anything where you need to give a signal somewhere between nothing and full.
The onboard programmable input/output (PIO) state machines are a great feature, allowing some inputs and outputs to be dealt with separately from the main processor. In short, if you wanted to flash a button to give user feedback or move data out with precise timing, the PIO will let you do it without messing up the timing of your main code. They are a fascinating idea, and one much too long to go into here, but if you are interested, there's a great guide to getting started with PIO on CNX Software.
Raspberry Pi Pico Specs:
- 21 mm × 51 mm form factor
- RP2040 microcontroller chip designed by Raspberry Pi in the UK
- Dual-core Arm Cortex-M0+ processor, flexible clock running up to 133 MHz
- 264KB on-chip SRAM
- 2MB onboard QSPI Flash
- 26 multifunction GPIO pins, including 3 analogue inputs
- 2 × UART, 2 × SPI controllers, 2 × I2C controllers, 16 × PWM channels
- 1 × USB 1.1 controller and PHY, with host and device support
- 8 × Programmable I/O (PIO) state machines for custom peripheral support
- Supported input power 1.8–5.5V DC
- Operating temperature -20°C to +85°C
- Castellated module allows soldering direct to carrier boards
- Drag-and-drop programming using mass storage over USB
- Low-power sleep and dormant modes
- Accurate on-chip clock
What Can You Do With the Raspberry Pi Pico - Raspberry Pi Pico Projects
The Raspberry Pi Pico hasn't been out all that long, but that hasn't stopped folks from creating some incredible projects with it.
Pi Pico Home Automation
The Pi Pico is well suited to the classic beginner weather station project combining a humidity and temperature sensor and LCD screen with a microcontroller. One nice touch of the Pi Pico version is the ability to test each component using the MicroPython REPL before writing any code.
YouTuber Andy Ho demonstrates that the Pico is perfectly capable of working as a smartphone-controlled Home Automation hub by adding a Bluetooth module and relay board.
Robotics with the Pi Pico
One area the Pi Pico will excel is in robotics. The 16 channels of pulse width modulation (PWM) output the Pico can give make it perfect for controlling multiple motors and servos. Less Pounder gives a great getting started guide to using DC motors with the Pi Pico, and his following tutorials on using ultrasonic sensors and setting up a motion sensor with the Pico will get you well on your way to a self-driving sentry robot!
Retro Computing on the Raspberry Pi
The Raspberry Pi Foundation have already showcased the Pico's ability to emulate the BBC Micro computer with a little overclocking, but the Pi Pico might make a great little handheld device too.
A very tiny game of Tetris! (My first test of the Pico) from r/raspberry_pi
Pimoroni is releasing a dedicated handheld device based on the Pi, but YouTuber Jools64 couldn't wait and decided to build their very own tiny Tetris machine using a Pi Pico and a tiny fully color IPS screen. While the Raspberry Pi 4 is great for emulation, the Raspberry Pi Pico is a capable emulation device as well.
The RP2040 as a Synthesizer
This is not Rocket Science, a collective of open hardware hackers and synth builders wasted no time in seeing what the RP2040 chip could do as a synthesizer. Rather than use the Pi Pico board, they incorporated the RP2040 chip into the Goldfish - a hardware digital synthesizer project they've been iterating over for many years.
The process is outlined on the official Raspberry Pi blog. Needless to say, they are impressed with the new chip!
What Programming Languages are Compatible With the Raspberry Pi Pico?
Currently, MicroPython, CircuitPython, C, and C++ are the only officially supported languages. As it stands, CircuitPython and MicroPython are by far the easiest way to get started, as the Thonny IDE works directly with the Pi Pico, though are a number of other IDEs available for Rasberry Pi. Of course, the Arduino IDE is what many people will want, and it will definitely be coming. Hot on the heels of the Pi Pico announcement, Arduino announced they are also putting out a version of the Nano based on the RP2040 chip. With this in mind, it seems likely official support for the chip will hit the Arduino IDE soon. There are also community builds of Rust in development for the Pi Pico, along with RT-Thread and FreeRTOS.
Raspberry Pi Pico-compatible programming languages:
Raspberry Pi Pico vs. Arduino
Since Arduino is such a well-known name in microcontrollers, it's inevitable that most will compare the new Pi Pico to boards like the Arduino Nano. It's not really a fair comparison, as the RP 2040 is a much more powerful chip, and as previously mentioned, Arduino will be releasing their own board on the new chip soon. A far more compelling comparison is to other cheap microcontrollers already available like the ESP32 and STM32. Luckily, Andreas Spiess has you covered:
Another compelling comparison is to the Teensy LC, which uses the same processor architecture, and has a few similar features. In terms of getting started from scratch, Arduino boards are still the best choice due to the widely available documentation and cheap kits for building large amounts of projects. The Pi Pico might be a better evaluation board, but it's not taking over any time soon.
Getting Started with the Raspberry Pi Pico
To get started with the Pi Pico you just need the board itself and a Micro USB cable capable of data transfer. Despite the Raspberry Pi foundation having excellent documentation, the Pi Pico is pretty difficult to get started with on Windows. Luckily, Matt from NotEnoughTECH has created an easy to follow guide for using both MicroPython and C++ on Windows with the Pi Pico.
For those using Linux, the official guide will be a little easier to follow, and of course, since most Raspberry Pis are Linux computers, there is nothing to stop you from using a Raspberry Pi to program your Pi Pico! The Raspberry Pi foundation has released a book on the Pi Pico, taking you from very basic beginner projects to more complex programming using all of the board's features.
Should You Buy the Raspberry Pi Pico - Who is the Raspberry Pi Pico for?
At $4 the Pi Pico is an incredible value. Even if you already use Arduino boards and are familiar with the IDE, it's worth getting a Pico just to learn a little about MicroPython. More experienced users will find the PIO system interesting, and again for $4 it's a no-brainer. Things get a little more complicated when you take into account that Arduino, Adafruit, Sparkfun, and many others are making RP2040 variants. As to which one of these will be the best choice remains to be seen, but for now, if you can get your hands on one, the Pi Pico is an exciting and easy to use board, once you are up and running!
The Raspberry Pi Pico Microcontroller Released - Final Thoughts on Raspberry Silicon
Where it shines is its low price and huge community behind it. Early runs sold out immediately, and people are still waiting for theirs. If you are looking to get into MicroPython, there are about to be more beginner tutorials than you could ever watch in a lifetime. This is a good thing, and whether you are into robotics, home automation, DIY audio, or just want to learn coding and electronics, the Pi Pico takes its rightful place next to Arduino boards as a perfect choice for all levels. The release of the Pi Pico was big news, mostly due to the Raspberry Pi foundation moving away from Linux based computers for the first time. In reality, it's a perfectly capable microcontroller, but not head and shoulders above the rest by any means.
Leave your feedback...