Seeed’s XIAO RP2040 is a small board. It looks too small to be useful, but the appearance can be deceptive. This is not Seeed’s first XIAO board. Previously, there was an Arm Cortex M0+, Seeeduino XIAO, running on a 48 MHz power supply model. It looks the same as the XIAO RP2040, and the price is the same, both at $5.40. XIAO is an impressive motherboard, but XIAO RP2040 brings the RP2040 SoC to the desktop, so we have a more powerful microcontroller with no additional cost. We tested the XIAO RP2040 to see if it is worth your $5; spoiler, yes.
XIAO RP2040 hardware specifications
|CPU||Dual-core ARM Cortex M0+ processor up to 133MHz|
|Universal input and output interface||3.3V logic level|
|11 digital IO|
|4 analog IO|
|11 pulse width modulation|
|I2C, SPI, UART|
|strength||5V via USB-C|
|aspect||0.8 x 0.7 inches (20 x 17.5 mm)|
XIAO RP2040 is driven by RP2040, which is Raspberry Pi’s own chip released in January 2021. XIAO RP2040 has the same RAM and storage specifications as RP2040 Raspberry Pico, So it differs from Pico in its size. It is significantly smaller than Pico. The size is only 0.8 x 0.7 inches (20 x 17.5 mm). Compared with the larger 2 x 0.8 inches (51 x 21 mm) size of the Raspberry Pi Pico, we can see a lot of space savings. Therefore, we only see 11 GPIO pins, all of which can be used digitally (on/off) or with pulse width modulation (PWM) that is commonly used to control motor speed and LED brightness.
Four of the pins (A0 to A3) are analog inputs and can be used for analog electronic devices such as potentiometers. Other GPIO pins also take on additional tasks such as UART, SPI, and I2C, allowing us to connect electronic devices using these protocols. The pin selection is carefully planned to ensure that we have everything we need for most projects. GPIO can be used with typical 2.54mm pin headers, or it can be surface-mounted soldered through the peripheral toothed edges.
The duet of XIAO RP2040 is QT PY RP2040 from Adafruit, They all have the same footprint and pin layout, which can easily be mistaken at a glance. The only difference is that XIAO RP2040 does not have a Stemma QT connector. The missing connector can be found on many Adafruit boards, and it provides a quick way to connect additional boards via the I2C bus.
The lack of a connector does not mean that we cannot connect I2C or Adafruit add-ons. Pins P6 and P7 are I2C, SDA and SCL respectively. We can connect I2C devices to these pins as long as we use a resistor between the 3.3V pin and SDA and SCL with a value between 2.2 and 10K ohms. . These resistors pull the SDA and SCL pins high to ensure that our connection is stable. We test the I2C bus by connecting the Adafruit MPR121 capacitive touch sensor, and using the latest version of CircuitPython 7.0, we can easily prepare the input and display output in the REPL. Please note that many examples based on CircuitPython I2C use board.SDA and board.SCL as pin references. For XIAO RP2040, these need to be changed to board.GP6 and board.GP7.
Next on our list is MicroPython support. We flashed the latest version of MicroPython for Raspberry Pi Pico, and then loaded Thonny. We followed some examples from Seeed, and everything feels like this. There are no accidents or traps in the hardware. The only problem we found was the documentation; you really need to pay special attention to the key to the pin number. After a short head scratching, we resolved the error and everything worked as expected, including the onboard WS2812 NeoPixel LED.
Moving on, we want to test the NeoPixel library of CircuitPython with the onboard WS2812 LED. This is where we noticed a special problem. We have the correct pin number, but anyway, CircuitPython’s NeoPixel library is not communicating with the LED. We connected an external NeoPixels string and changed the pin references in our code, and so on! We have a series of NeoPixels for custom light shows, and the results are very good. The problem with CircuitPython and the onboard RGB LED is not a big problem. In fact, many people will never encounter this problem. If you want to add some RGB lighting to your project in an inexpensive way, XIAO RP2040 is a viable solution.
If Arduino is your programming language of choice, you will be happy to know that XIAO RP2040 can be used with Arduino IDE. We used the Arduino Mbed OS RP2040 Boards library to test 1.8.15 and soon prepared a sample project. Every time you want to flash a new project to XIAO RP2040, you need to put the development board in bootloader mode, press and hold the boot button, and then click the reset button. If you forget, then there will be an error in the Arduino IDE.
If you need a small RP2040 power supply board, then for $5, Seeed’s XIAO RP2040 is the right board for you. It is pin compatible with Adafruit’s QT PY RP2040, but the price is only half. Of course, we lost the Stemma QT connector on the QT PY RP2040, and we reduced it from 8MB to 2MB, but unless you need to place a lot of code or connect Stemma QT devices, you can do without these things. This is an impressive, cost-effective and easy-to-embed small board that deserves a place in your drill box.