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

The SAM 15x15 is an Arduino development board of 28x28mm, with the same powerful controller as the Arduino Zero: the SAMD21G18. 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.

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.

I sell on Tindie

Documents to read

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.
Furthermore, I have made some articles which you can read too:

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

SAM 15x15 DIL40 adapter

To use the square SAM 15x15 on a standard double-strip breadboard, I made the SAM 15x15 DIL40 adapter.
See the article HERE.

SAM 15x15 DIL40 on a breadboard
SAM 15x15 DIL40 on a breadboard

New Timer library, fast PWM-DAC and fast ADC library for the SAMD21

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:

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 now
The SAMD21G has gotten pins now
The smallest SAMD21G board, 34 I/O pins, Arduino compatible, 15mm x 15mm
The smallest SAMD21G board, 34 I/O pins, 15mm x 15mm

For sale: SAMD21G18 Arduino compatible development board 15x15mm

A certified factory has made SAM 15x15 boards for me. Before the boards are shipped they are tested completely by myself. The default, non-reduced, dimensions are 28 x 28mm.
To order, contact me personally. You will also support my website financially this way. 
The price is $19.95 and the shipping is $3.95 for all countries worldwide.
The 4-pin USB pin header is included.
The optional male USB 2.0 motherboard cable costs $3.00. I have a number of cables in stock. Available at eBay too.

SAMD21G18 board for sale
SAMD21G18 board for sale

SAM 15x15 bottom side
SAM 15x15 bottom side

USB pin header
USB pin header

USB motherboard cable
USB motherboard cable


Video

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

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

Straightforward pinout

The PCB pinout is straightforward because it is more or less the same as that of the SAMD21G chip itself. The pins of the SAMD21G are not jumbled together but are arranged logically, as we can see below. 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.

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 embodiments
SAM 15x15 three embodiments

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

Bench grinder
Bench 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 headers
The 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.

Questions

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

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 compared
The SAM 15x15 size compared

SAM 15x15 DIL40 vs. SAMD21 Mini Breakout
SAM 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 1
Cheerson 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 header
USB 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.

Production test board

This board is used for production, it burns the bootloader into the SAMD21 and all pins are tested by LEDs one by one:

Arduino SAMD bootloader program and test board for the SAM15x15
Arduino 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;        
  }
}

FlashStorage library

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

 

 

Do you have any comments? Please let me know.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.