Seeeduino XIAO - The Cheap, Fast, Mini Go-to Arduino Board!
Out of curiosity, I picked up a few Seeeduino XIAOs (#ad) from Seeed Studio recently. They had been sitting at the top of the pile in my bin of boards untouched as I was in the middle of working on some other projects. My go-to board usually is the Arduino Pro Mini (#ad), which is available at a similar price point. Look out for an upcoming post where I’ll do a sum-up of the Arduino Pro Mini.
The package of XIAOs had been sitting there on top of the pile for quite some time, seemingly teasing me with the seal-tab still unbroken. I finally decided to hook one up to an existing project and give it a test run. And boy, do I like them!
In all honesty, there isn’t a TON special about the XIAO. At its heart is a Microchip SAMD21 MCU, and you do get much of what you’d expect from the SAM21 feature set. What piqued my interest in this particular SAMD21 board were 2 things: price point and compact footprint. What remained to be seen was given cheap and small, how much of the power of the SAMD21 MCU could still be delivered.
Price point⌗
Above: The 3-pack
With free shipping, the XIAOs work out to $8 each when you purchase a package of 3 boards on Amazon (#ad). This puts the XIAO in the range of the cheapest general purpose Arduino-compatible microcontrollers out there. Note that for the version at this price, you will have to solder the provided header pins to the board yourself.
By comparison, the Arduino Pro Mini, originally developed by SparkFun, can be found for $5.60 each when purchased in a package of 3 on Amazon (#ad), and the Adafruit Trinket M0 is priced at $8.95 each on the Adafruit web site.
At $8 each, you do get quite the bang for your buck with the Seeeduino XIAO! Read on to see why.
The Seeed Studio website has the XIAOs individually priced at $5.40 + shipping. For smaller quantities, the price works out a little better on Amazon with free shipping.
Compact size⌗
At 20mm x 17.5mm, the XIAO is a little smaller than your thumb. It is breadboard friendly with a 14-pin DIP configuration and castellated connectors. The castellated connectors allow you to solder the XIAO directly as a component onto another PCB. Keep in mind that depending on the version purchased, the headers may need to be soldered on in order for it to be plugged into a breadboard.
The tiny size is great for wearables, portable projects or any project where size or weight is a concern.
The XIAO only breaks out a portion of the available pins of the SAMD21 chip, but I find it to be a great balance between size and features.
Arduino or CircuitPython, it’s your choice!⌗
The XIAO can be programmed either with C++ in the Arduino platform or with CircuitPython. My personal preference is C++ in Arduino, but if you prefer CircuitPython, instructions for setting that up can be found on Seeed’s wiki.
For Arduino, simply open your preferences and add
https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
to the list of Addtional Board Manager URLs
.
The list of Seeed boards will then be available to select from for your sketch.
Built-in LEDs⌗
There are 4 LEDs on the XIAO, but really only one is available for general use. Like on many Arduino microcontrollers, the LED_BUILTIN
is defined as IO pin 13
. The other LEDs are not really directly addressable: one is for power, and the other 2 are for showing TX and RX activity for serial communications.
The built-in LED doesn’t take up any of the available IO pins broken out on the XIAO, so if you want to blink an LED for confirmation or for debugging purposes, you don’t have to dedicate one of the available 11 I/O pins for that by using the built-in.
I/O⌗
This is where the XIAO shines. Despite it’s small form factor and limited number of I/O pins, what is made available from the SAMD21 is pretty impressive for a device with only 14 pins broken out.
- 11 of the pins are configurable for digital I/O.
- 11 of the pins are configurable for analog input.
- 10 of the pins are configurable for PWM output.
- 7 of the pins are configurable for capacitive touch input.
- 1 of the pins is configurable for analog output.
Serial Communications⌗
I/O breakout is just part of the fun! The XIAO also breaks out a full complement of serial communications protocols on the 14 pins.
- 2 pins are configurable for UART.
- 2 pins are configurable for I2C.
- 3 pins are configurable for SPI.
All of the pins for the 3 protocols are mutually exclusive, so in theory, you could have all 3 communiciations protocols running at the same time.
Worth mentioning is that because the SAMD21 chip has built-in USB port and USB Serial, you don’t have to dedicate the UART for Serial monitoring on the computer. Serial
is mapped to the USB Serial device for serial monitoring and Serial1
is mapped to the UART for you to use to communicate with any another UART device.
USB ABC 123 XYZ⌗
The XIAO’s usb connector is of the USB-C type. Not an issue for many people, but for some, it might require a USB-A to USB-C cable (#ad) in order to connect to a computer.
Slight glitch with Mac OS X⌗
I had some recurring issues with the Arduino IDE failing to download programs in Mac OS X. The flashing process would start, take a long time attempting to download, and then fail. The Seeeduino XIAO would then stop showing up as a valid port. A hard reset by shorting the reset pads on the face of the circuit board usually fixed this. Sometimes, I would need to short it twice in succession, putting it in bootloader mode, and then shorting it twice again to put it back to normal.
It seemed to have something to do with automatically mounting the device on Mac OS X after flashing, as it seemed to coincide with a “DISK NOT EJECTED PROPERLY” notification on the Mac. I looks like something goes wrong with the mounting and then the XIAO somehow gets “stuck.” Some searching led me to this help article. Forcing the Mac OS to not automatically mount the XIAO as a drive solved the issue for me.
If this happens to you, simply add this line to your /etc/fstab
file to prevent the XIAO from auto-mounting. You may need to create the file if it doesn’t exist.
UUID=CAA11D49-5022-35CD-98AD-0B82E7E05881 none msdos rw,noauto
Apparently, the UUID is the same for all XIAOs, so adding this entry should stop automounting any XIAO.
Sum-up⌗
Pros:⌗
- Under $10!
- 11 Digital/Analog IO ports
- Support ull range of communications protocols: I2c, SPI, UART
- Built in USB and USB Serial
- Powerful SAMD21 microcontroller
- Arduino support
- CircuitPython support
Cons:⌗
- Does not use all the capabilities of SAMD21
- Gotcha with auto-mounting on MacOS
- Although the XIAO can be powered with a 5v supply, maximum logic level voltage is 3.3v
The Takeaway⌗
The takeaway is that the Seeeduino XIAO (#ad) is an extremely capable microcontroller at an extremely attractive price. You get good bang for the buck for a sub $10 Arduino compatible board. It is in rotation as my “go-to” board when I need to quickly prototype something, as well as a board that I consider for projects where space is tight and won’t need more than 11 I/O pins.
Last word on super-small on the super-cheap⌗
For super-small “Arduinos” on the super-cheap, consider using just the bare microchips. Chips like the ATTiny13A and ATTiny85 are 8-pin chips can be purchased in bulk for under $1 each. See the upcoming sum-up of working with the ATTiny chips.
In case you missed it⌗
Seeeduino XIAO (#ad)
Arduino Pro Mini (#ad)
Level up!⌗
Speaking of soldering headers, if you’re ready to bring your soldering skills to the next level, upgrade from your old pen-style soldering iron to a soldering station. Not only do you get better temperature control so you’re using the right temperature for the task, the handle is better designed to be balanced for delicate work. The tips are generally of higher quality with a soldering station as well, so the quality of your work will be better all around. Here are some great choices from Weller:
Support me with a dumpling.⌗
If you’ve enjoyed this post, please support me with a dumpling :)
Lastly⌗
As an Amazon Associate I earn from qualifying purchases. Your support helps me to continue to write useful and meaningful content!