Arduino with SAMD21 – which board to use?

Reading time: 2 min.

In today’s post, we present the advantages of various boards that can be used as microcontrollers.

If you’re wondering which board to choose, you’ve come to the right place!

What is SAMD21?

The ATSAMD21 from Atmel is a low power, high performance flash microcontroller based on the ARM® Cortex®-M0+ microchip. Let’s see what it offers:

  • 256KB Flash and 32KB SRAM
  • 48MHz Operating Frequency6 communication modules (SERCOM) that can be configured as UART/USART, SPI or I2C, 3x 16-bit timer/counter, 32-bit Real-Time Clock and calendar, 20 x PWM channels, 1x 14-channel 12-bit ADC, 1x 10-bit DAC
  • Up to 120 touch channels supported
  • Full-speed USB device and embedded host 1.62V to 3.63V power supply

A look at the above shows that Atmel’s microcontroller is particularly powerful, especially compared to the older 8-bit/16MHz microcontrollers from Arduino. If such an improvement is not convincing for you, let us analyse these features in detail!

What makes SAMD21 so special?


 width=

Increased speed and more space

If you feel that Arduino UNO imposes data storage restrictions on you or that the microcontroller’s operating speed is simply not sufficient, SAMD21 comes to help you! You get 256KB of flash memory (instead of only 32KB) to store your sketch. Also, additional flash memory means that you can store larger blocks of data on your microcontroller. 32KB SRAM is also a solution to the so-called stack overflows that occur when the stack size exceeds the amount of memory reserved for it.

Integrated USB controller

It can be used as both a USB device and a USB host. In the first case, it can e.g. a keyboard, mouse or joystick and serve as a communication device that you can connect to a computer and communicate with it via a serial interface.

Configuration of the interface

That’s what makes SAMD truly unique. The microcontroller has 6 configurable serial interfaces that can be used as I2C master/slave, SPI master/slave or UART. This flexibility allows you to choose which pin to assign to which task.

Sensitive voltage measurement

SAMD21 offers 14 ADC pins with 12-bit resolution (while e.g. ATmega328p only provides 10-bit resolution), which means that each bit between 0 and 4095 represents 0.806 mV, while CPU is supplied with 3.3 V, which in turn translates into a more sensitive voltage measurement.

On-board RTC (real time clock)

If you need very precise timing or a PID loop then a real time clock will definitely come in handy. SAMD21 has an RTC with a crystal oscillator, and it can still maintain the clock speed of the processor at 48 MHz.

Which SAMD21 Arduino Board to choose?

Now that we know the specification and performance of the SAMD21 microcontroller, we need to consider the choice of a specific Arduino compatible board. Below we have compared some of the best SAMD21 and Arduino compatible boards. We have grouped them according to their different characteristics that determine their usefulness.

The best to start with – Arduino Zero

Even if Arduino Uno remains a fairly reasonable choice for beginners, it is worth looking at the Arduino Zero from the MKR series when it comes to SAMD21 controllers. This is the best choice for those looking for their first board to start programming and playing with IoT (Internet of Things).


 width=

Arduino Zero is a simple yet powerful 32-bit extension to the Uno platform. It allows you to create various projects under the banner of IoT devices, including such gadgets as interactive clothing, home automation and robotics. It has an Atmel SAMD21 MCU with 32-bit ARM Cortex M0+ core, which makes it an excellent choice for learning 32-bit applications. With the Atmel Embedded Debugger (EDBG), Arduino Zero provides a complete debugging interface without the need for additional hardware. It operates at a voltage of 3.3 V – remember that a higher voltage can damage it. The board provides you with 20 digital I/O pins, 18 PWM pins, 7 analog pins, 256 KB flash memory and 32 KB SRAM memory.

When size matters: Seeeduino XIAO

No more hassle with dimensions for Arduino projects with limited space – the Seeeduino XIAO fits almost anywhere. Its dimensions are only 23.5 x 17.5 mm and it is the smallest Arduino-compatible board from the Seeeduino family. The microcontroller is equipped with a SAMD21 chip with a rich interface.


 width=

Despite its small size, Seeeduino XIAO not only has a powerful processor, but also has 14 GPIO pins that can be used as 11 analog pins, 11 digital pins, I2C interface, UART interface and SPI interface. In addition, the pins from A1 / D1 to A10 / D10 have a PWM function, while pin A0 / D0 has a DAC function that provides you with a real analog signal – which means that 14 GPIO pins can realize even more pins and I/O interfaces. The board has an USB type C interface for power supply and code download, and power pads on the back to support the battery. Seeeduino has also added an LED for the user to make coding easier. XIAO also has a 32.768 KHz crystal oscillator to stabilize the clock. The board is fully compatible with the Arduino IDE, allowing you to use the extensive Arduino library for your projects.

The best performance at low cost – Wio Lite MG126 – ATSAMD21 Bluetooth


 width=

Now let’s focus on a board that offers an excellent price/performance ratio – the Seeedstudio Wio Lite MG126 – ATSAMD21 Bluetooth board from the Wio series. It has the MG126 chip, thanks to which it supports Bluetooth communication. The module is equipped with the ATMega SAMD21 ARM Cortex M0 controller, thanks to which the board is compatible with Arduino Zero. Power is supplied through the USB type C port with a voltage of 5V. The outputs of the board work with a voltage of 3.3 V, and it is programmed in the Arduino IDE environment. The manufacturer has prepared a ready library – W600 with sample codes. Seeedstudio’s Wio Lite board will be effective for example as an element of a home automation system – all the information collected by the sensors can be easily checked in the cloud.

Psst! Remember that the choice we made above is only a suggestion! To tell you the truth, we have a wide range of amazing Arduino- compatible modules. This category makes up a large part of our store, so we encourage you to compare the different options yourself and contact us if you have any questions.

 width=
 width=

Arduino compatible boards


CHECK IN

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Share:

Picture of Maciej Chmiel

Maciej Chmiel

Specialist for Arduino and widely understood electronics. Multitasking, on duty for everything - there’s nothing impossible for him and task realization time is almost instant. After work, he loves cartoons with Perry the Platypus. His priceless memes inspire the creative department.

See more:

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.