Seeed’s XIAO RP2040 is a gradient board. It seems too small to be useful, but looks can be deceiving. This isn’t Seeed’s first XIAO board, rather there was an Arm Cortex M0+ with a 48MHz powered model, Seeeduino XIAO that looks identical to the XIAO RP2040 and is also priced identically at $5.40. The XIAO was an impressive board, but the XIAO RP2040 brings the RP2040 SoC to the table and with it we have a much more powerful microcontroller, for zero extra money. We put the XIAO RP2040 to the test to see if it’s worth your $5; spoilers, that’s it.
Hardware Specifications XIAO RP2040
|Processor||Dual-core ARM Cortex M0+ processor up to 133MHz|
|GPIO||3.3V logic level|
|11 x digital IO|
|4 x analog IO|
|11 x PWM|
|I2C, SPI, UART|
|Flow||5V over USB-C|
|Dimensions||0.8 x 0.7 in (20 x 17.5 mm)|
The XIAO RP2040 is powered by the RP2040, Raspberry Pi’s proprietary silicon released in January 2021. XIAO RP2040 has the same RAM and storage specifications as the Raspberry Pi Pico, so what makes it different from the Pico is its size. It is noticeably smaller than a Pico. Measuring just 0.8 x 0.7 in (20 x 17.5 mm), compared to the larger 2 x 0.8 in (51 x 21 mm) footprint of the Raspberry Pi Pico, we can see a big space saver . As such we see only 11 GPIO pins, all of which can be used digitally (on/off) or used with Pulse Width Modulation (PWM) which is widely used to control motor speeds and LED brightness.
Four of the pins (A0 to A3) are analog inputs that can be used with analog electronics such as potentiometers. The other GPIO pins also have additional tasks as UART, SPI and I2C allowing us to connect electronics using these protocols. The selection of pins has been carefully curated to ensure we have everything we need for most projects. The GPIO can be used with typical 2.54mm pin headers or can be surface soldered thanks to the knurled edges around the perimeter.
The doppelganger of the XIAO RP2040 is: Adafruit’s QT PY RP2040, they both have the same footprint and pin layout and can be easily confused at a glance. The only difference is that the XIAO RP2040 does not have a Stemma QT connector. The missing connector is found on many Adafruit cards and provides a quick and easy way to connect expansion cards over the I2C bus.
The lack of a connector does not mean that we cannot connect an I2C or Adafruit add-on. Pins P6 and P7 are I2C, SDA and SCL respectively, and we can connect I2C devices to those pins as long as we use resistors between 2.2 and 10K Ohms in value between the 3.3V pin and SDA and SCL. These resistors pull the SDA and SCL pins high, making our connection stable. We tested the I2C bus by connecting an Adafruit MPR121 capacitive touch sensor, and using the latest release of CircuitPython 7.0 we were able to easily prepare input and display output in the REPL. Note that many CircuitPython I2C based examples use board.SDA and board.SCL as pin references. These should be changed to board.GP6 and board.GP7 for the XIAO RP2040.
Next on our checklist was MicroPython support. We flashed the latest version of MicroPython for the Raspberry Pi Pico and then loaded Thonny. We followed a few examples from Seeed and everything felt as it should be. There were no surprises or pitfalls with the hardware. The only problem we found was with the documentation; you really have to pay close attention to the pin code. After scratching our heads for a while, we fixed our error and everything worked as expected, including the built-in WS2812 NeoPixel LED.
Moving on, we wanted to test CircuitPython’s NeoPixel library with the built-in WS2812 LED, and here we noticed a quirky problem. We had the correct PIN, but no matter what, CircuitPython’s NeoPixel library was not communicating with the LED. We connected an external array from NeoPixels and changed the pin reference in our code, et voilà! We had a series of NeoPixels with a custom light show and it worked beautifully. The issue with CircuitPython and the built-in RGB LED is not a deal breaker. In fact, many will never encounter this problem. If you want to add RGB lighting to a project in a cheap way, the XIAO RP2040 is a viable solution.
If the Arduino is your programming language of choice, you’ll be happy to know that the XIAO RP2040 works with the Arduino IDE. We tested with 1.8.15, using the Arduino Mbed OS RP2040 Boards library, and quickly had a sample project ready to go. Every time you want to flash a new project to the XIAO RP2040, you need to put the board in Bootloader mode, press and hold the Boot button and then tap the Reset button. If you forget, the Arduino IDE will throw an error.
If you need a small RP2040 board, the XIAO RP2040 from Seeed for $5 is the board for you. It’s pin compatible with Adafruit’s QT PY RP2040, but at half the price. Sure, we’ll lose the Stemma QT connector on the QT PY RP2040 and we’ll go from 8MB to 2MB, but unless you need to enter a lot of code or connect Stemma QT devices, you can live without those things. This is an impressive, cost effective and easy to build board that deserves a place in your bitbox.