Skip to main content
Who can help to set up a Maxun One solar bike DIY community?

SAM 15x15mm Arduino Zero compatible SAMD21 board

Published: 21 September 2016
Last updated: 14 March 2023

The SAM 15x15 is a very small Arduino development board, with the same powerful controller as the Arduino Zero: the SAMD21G18.
All I/O pins are used: despite the small size, it has more I/O pins than the Arduino Zero or SAMD21 Mini/Dev Breakout: 34 instead of 21. Due to the very small dimensions it will fit easily into all embedded electronic projects, even in microdrones.

Open source Eagle PCB files

I have stopped selling the SAM15x15, it takes too much time. I make the Eagle files for the PCB public on GitHub, with this you can make the PCB yourself: https://github.com/avandalen/SAM-15x15

But you do not need the SAM 15x15 board at all, it is much more convenient to simply place the SAMD21 directly on a PCB.

The smallest Arduino compatible SAMD21 board: 15x15 mm, 34 I/O pinsThe smallest Arduino compatible SAMD21 board: 15x15 mm, 34 I/O pins

*) The default, non-reduced, dimensions are 28 x 28mm.

The SAMD21 is a fast microcontroller that in 2015 was added to the list of controllers that can be been programmed in c++ by the Arduino software.

Better alternatives for the SAMD21

Note that STM delivers more powerful microcontrollers at a lower price than Atmel's SAMD21. The Blue-Pill Board cost just a few Euros, which includes an Arm Cortex-M3 72MHz processor, the STM32F103C8T6: https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.

Blue Pill board with the 72MHz Arm Cortex-M3 STM32F103C8T6Blue Pill board with the 72MHz Arm Cortex-M3 STM32F103C8T6

Compatible with the Arduino Zero

The SAM 15x15 is in fact an Arduino Zero in another shape and is fully compatible with the Arduino Zero.
For all documentation, you need to go to the Arduino zero. You can also use the Arduino Zero forum.
Just like the Arduino Zero, you don't necessarily need special libraries.

SAMD21G18 board for saleSAM 15x15 bottom side

The optional male USB 2.0 motherboard cable is available at eBay.
USB pin headerUSB pin header

USB motherboard cableUSB motherboard cable

SAM 15x15 main advantages

  • It has much more I/O pins than other comparable SAMD21G boards, 34 instead of 21. All pins are supported by the Arduino IDE.
  • It can be reduced in size as desired to 22x22mm or 15x15mm.

For hobbyists, the drawback of the SAMD21 is that it is only available in SMD. When blown up, it is pretty tough to replace it because no IC socket can be used. This can be solved with the SAM 15x15 board, which transforms the SAMD21G into a pin version.

The SAMD21G has gotten pins nowThe SAMD21G has gotten pins now The smallest SAMD21G board, 34 I/O pins, Arduino compatible, 15mm x 15mmThe smallest SAMD21G board, 34 I/O pins, 15mm x 15mm

Video

This video shows the 34 I/O pins and the 24 PWM pins:

(I will make a new video, 2 LEDs are defect.)

Questions

If you have any questions, please post them on forum.arduino.cc.

Straightforward pinout

The PCB pinout is straightforward because it is more or less the same as that of the SAMD21G chip itself. The pin names are not jumbled together but are arranged logically, as we can see below: d[0]  ... d[33]. The light gray columns are the corresponding pins of the Arduino Zero, you can see that the SAM 15x15 has a lot more pins. The pins have also more functionality; for example, pin 9 / d[6] can be used, in contrast to the Arduino Zero, as an analog input too.
Note, each pin has two names, for example 23 is the same as d[12]. The names d[xx] are preferred, therefore the columns "No." and "Arduino Zero" are grayed out.

SAMD21 development board 15x15mm (Arduino compatible)SAMD21 development board 15x15mm (Arduino compatible)

Quick start

The Arduino platform makes programming microcontrollers as easy as possible, I also like this with the SAMD21, read the quick start guide.
See here for the installation procedure.

Couldn't find a Board on the selected port

Uploading sketches to the Arduino Zero (and other related boards such as the SAM15x15) through the native port may fail sometimes. See the article here for solutions. As you can read in the article, by double tapping the reset button, the Arduino board will wait for communication. You can connect an optional reset button between the pins 34 (reset) and 36 (GND).

Three embodiments

The SAM 15x15 has three embodiments combined into one PCB. Note that the board is only delivered in the large size of 28x28mm, you have to resize it yourself:

SAM 15x15 three embodimentsSAM 15x15 three embodiments

You can easily reduce the board size with a bench grinder.

Bench grinderBench grinder

28 x 28mm This board fits on a standard breadboard; it has 40 pins with 2.54mm pitch.

22 x 22mm This board is a smaller version of the 28 x 28mm board; it has 28 pins instead of 40.

15 x 15mm This board has 40 pins with 1.27mm pitch. Use 1.27mm headers. Due to the very small dimensions it will fit easily into all embedded electronic projects. Note that there are 1.27mm breadboards too.

The smallest SAM 15x15 board with 1.27mm headersThe smallest SAM 15x15 board with 1.27mm headers

The 1.27mm headers do not contain the 4 pins on the corners, if you need these, you can use these receptacles.

Eagle library symbol

You can download the Eagle library symbol to drop to your design HERE.

SAM15x15 Eagle library symbol

Sam 15x15 footprintSam 15x15 footprint

SAM 15x15 features

The SAM 15x15 is actually an Arduino Zero without the debugger EDBG. So you can use all the documentation of the Arduino Zero except the EDBG part.

  • Controller: Atmel ATSAMD21G18, 32-bit, 48MHz, ARM Cortex-M0+
  • Digital I/O pins: 34
  • PWM outputs: 24 (PWM DAC)
  • Analog inputs (ADC): 14
  • ADC resolution: 12-bit
  • One 10-bit DAC
  • Flash memory: 256 kbyte
  • SRAM: 32 kbyte
  • EEPROM: 32 kbyte (emulated in Flash)
  • Preprogrammed Arduino Zero bootloader
  • Programming and debugging through the integrated USB port

The SAM 15x15 board contains also:

  • One free LED
  • Combined RX/TX LED
  • Voltage regulator 3.3V for the USB powering
  • Power supply reverse polarity protection
  • High voltage protection for the USB

Comparison to other Arduino boards

  SAM 15x15 Arduino Zero Arduino Uno
Microcontroller ATSAMD21G18A ATSAMD21G18A ATmega328P
Digital I/O Pins digitalWrite digitalRead 34 20 14
Analog Output Pins (PWM) analogWrite 24 10 6
Analog Input Pins (ADC) analogRead 14 6 6
ADC resolution 12-bit 12-bit 10-bit
10-bit DACs 1 1 0
Flash Memory 256KB 256KB 32KB
SRAM 32KB 32KB 2KB
EEPROM 32KB (emulated in Flash) 32KB (emulated in Flash) 1KB
CPU Speed 48MHz 48MHz 16MHz


The SAM 15x15 size comparedThe SAM 15x15 size compared

SAM 15x15 DIL40 vs. SAMD21 Mini BreakoutSAM 15x15 DIL40 vs. SAMD21 Mini Breakout

Drone with small Arduino compatible SAMD21G board

There are as much as possible functions crammed into the tiny area. It can be easily built into small drones.

Cheerson CX 10WD mini RC quadcopter 1Cheerson CX 10WD mini RC quadcopter 1

SAMD21 Arduino Zero software compatible development board circuit

Download the pdf file HERE.

Mini SAMD21 development board (Arduino compatible)Mini SAMD21 development board (Arduino compatible)

Power supply

Pin 4 is the 3.3V for the analog and digital power supply; in order to allow this combination, the analog part is filtered by L1 and C3. There are two separate grounds for analog and digital, use these appropriately.
If the SAM 15x15 is powered through the USB and also through pin 4, two voltage regulators will be in parallel. However, this is a common practise.

USB connector

A micro USB connector can't be used because of lack of space. Therefore, a 4 pin header is used, which fits on a low-cost male USB motherboard cable. The header 5 has pins in instead of 4, so the extra GND is unused:

USB 4 pin headerUSB 4 pin header

You can buy a cheap male USB 2.0 to 5-pin motherboard cable at eBay. I've shortened the 5-pin connector to 4-pin. The board is protected against reversed connection by diode D3. The 4-pin USB header is not soldered and delivered separately, so that you can mount it as you like or leave it away.

Documents to read for nerds

Furthermore, I have made some articles which you can read too. 
These articles are not needed to use the SAM15x15.

  1. Arduino Zero for dummies avdweb.nl (skip the EDBG part)
  2. SAMD21 for dummies avdweb.nl
  3. Arduino Zero Overview arduino.cc

Libraries

In order to fully utilize the power of the SAMD21, I developed a number of new libraries, which can also be used for the Arduino Zero.
Note, that these libraries are not for the SAM15x15 but for the SAMD21 in general:

Production test board

This board is used for production, all pins will be tested one by one:

Arduino SAMD bootloader program and test board for the SAM15x15Arduino SAMD bootloader program and test board for the SAM15x15

YouTube LED program example

void setup() 
{ blinkLed(3, 3);
  digitalWriteAll(0); // all LEDs on  
  delay(2000);
  digitalWriteAll(1); 
}
void loop()
{ PWMcyclus(); 
  PWMcyclus();
  analogRead(14); // attention! patch, turn off 10bit DAC 
  runningLight(); 
}
void digitalWriteAll(bool b)
{ for(int i=0; i<pinCount; i++) 
  { pinMode(d[i], OUTPUT);
    digitalWrite(d[i], b); 
  }
}
void runningLight()
{ for(int i=0; i<pinCount; i++)  
  { pinMode(d[i], INPUT); // patch Arduino error
    pinMode(d[i], OUTPUT);
    digitalWrite(d[i], 0); // led on
    delayMicroseconds(57100);
  }
  digitalWriteAll(1); 
}
void ledsPWM(int level)
{ for(int i=0; i<pinCount; i++) analogWrite(d[i], level);
  analogWrite(14, level-160); // 10 bit DAC with 8 bit resolution
  delayMicroseconds(8560);
}
void PWMcyclus()
{ int level=255;
  for(; level>200; level--) ledsPWM(level);
  for(; level<255; level++) ledsPWM(level);
}
void blinkLed(byte pin, int n)
{ pinMode(pin, OUTPUT); 
  for(byte i=0; i<n; i++)
  { digitalWrite(pin, 1);       
    delay(300);                 
    digitalWrite(pin, 0);   
    delay(300);
  }
}

Running light production test program

The SAM 15x15 program memory is not empty but contains this running light sketch, which is used for the production test:

void setup() 
{ blinkLed();
}
void loop()
{ //runningLight(); // comment out after test
}
void digitalWriteAll(bool b)
{ for(int i=0; i<pinCount; i++) 
  { pinMode(d[i], OUTPUT);
    digitalWrite(d[i], b); 
  }
}
void runningLight()
{ for(int i=0; i<pinCount; i++)  
  { digitalWriteAll(1); // all Leds off
    pinMode(d[i], INPUT); // patch Arduino error for DP32
    pinMode(d[i], OUTPUT);
    digitalWrite(d[i], 0); // Led on
    delay(200);
  }
}
void blinkLed()
{ bool b=1; // =0 mandatory 
  pinMode(d[9], OUTPUT);  
  for(byte i=0; i<8; i++) // blink 4 times
  { digitalWrite(d[9], !b);        
    delay(300);         
    b=!b;        
  }
}

Note

  • The test program sketch is installed so that the outputs change between 0 and 3.3V after opening the serial port. Delete the test program first, if necessary.
  • Since 25-12-2017, there is a new schematic and new package for the boards manager. See how to do reinstallation HERE.

FlashStorage library

Cristian Maglie has built a library for the non-volatile flash memory of the SAMD21, see HERE

Other articles from SAMD21