Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SparkFun SAMD21 Dev Breakout: Examples, Pinouts, and Specs

Image of SparkFun SAMD21 Dev Breakout
Cirkit Designer LogoDesign with SparkFun SAMD21 Dev Breakout in Cirkit Designer

Introduction

The SparkFun SAMD21 Dev Breakout is a versatile development board that harnesses the power of the Microchip ATSAMD21G18, an ARM Cortex-M0+ microcontroller. This board is an excellent choice for makers and hobbyists looking to step up from platforms like the Arduino Uno, as it provides a significant boost in performance and memory while maintaining a familiar programming environment through the Arduino IDE. Common applications include IoT devices, wearables, and complex control systems.

Explore Projects Built with SparkFun SAMD21 Dev Breakout

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
Image of godmode: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Multi-Sensor Interface with GSM and Display
Image of NAAZ: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
This circuit features an ESP32 Devkit V1 microcontroller as its central processing unit, interfacing with a variety of sensors and modules for monitoring and communication purposes. It includes an LCD I2C display for user interface, a SIM800L module for GSM communication, and sensors like the Adafruit L3GD20H gyro, Adafruit ADXL377 accelerometer, DS18B20 temperature sensor, and a pulse sensor for environmental and physiological data collection. The circuit also controls a red and a green LED, each with a current-limiting resistor, and a buzzer for audio feedback, all of which are likely used for status indication or alerts.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560-Based Real-Time Clock and Data Logging System with OLED Display
Image of projectwiring: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
This circuit features an Arduino Mega 2560 microcontroller interfaced with an OLED display, a DS1307 RTC module, a microSD card breakout, a pushbutton, and a blue LED. The Arduino handles data logging to the microSD card, displays information on the OLED, and reads real-time data from the RTC module, while the pushbutton and LED provide user interaction and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
STM32 and Arduino Pro Mini Based Wireless Data Logger with OLED Display
Image of R8 Controller: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
This circuit integrates multiple microcontrollers (Maple Mini STM32F1, nRF52840 ProMicro, and Arduino Pro Mini) to interface with various peripherals including an SSD1306 OLED display, an SD card module, and a Si4463 RF module. The circuit is designed for data acquisition, storage, and wireless communication, with power supplied through a USB Serial TTL module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SparkFun SAMD21 Dev Breakout

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of godmode: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of NAAZ: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
ESP32-Based Multi-Sensor Interface with GSM and Display
This circuit features an ESP32 Devkit V1 microcontroller as its central processing unit, interfacing with a variety of sensors and modules for monitoring and communication purposes. It includes an LCD I2C display for user interface, a SIM800L module for GSM communication, and sensors like the Adafruit L3GD20H gyro, Adafruit ADXL377 accelerometer, DS18B20 temperature sensor, and a pulse sensor for environmental and physiological data collection. The circuit also controls a red and a green LED, each with a current-limiting resistor, and a buzzer for audio feedback, all of which are likely used for status indication or alerts.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of projectwiring: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
Arduino Mega 2560-Based Real-Time Clock and Data Logging System with OLED Display
This circuit features an Arduino Mega 2560 microcontroller interfaced with an OLED display, a DS1307 RTC module, a microSD card breakout, a pushbutton, and a blue LED. The Arduino handles data logging to the microSD card, displays information on the OLED, and reads real-time data from the RTC module, while the pushbutton and LED provide user interaction and status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of R8 Controller: A project utilizing SparkFun SAMD21 Dev Breakout in a practical application
STM32 and Arduino Pro Mini Based Wireless Data Logger with OLED Display
This circuit integrates multiple microcontrollers (Maple Mini STM32F1, nRF52840 ProMicro, and Arduino Pro Mini) to interface with various peripherals including an SSD1306 OLED display, an SD card module, and a Si4463 RF module. The circuit is designed for data acquisition, storage, and wireless communication, with power supplied through a USB Serial TTL module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Features

  • Microcontroller: ATSAMD21G18, 32-bit ARM Cortex-M0+
  • Operating Voltage: 3.3V
  • Input Voltage: 5V (via USB) or 7-15V (via VIN)
  • Digital I/O Pins: 20
  • Analog Input Pins: 6
  • PWM Output: 10
  • UARTs: 1
  • SPI Interfaces: 1
  • I2C Interfaces: 1
  • Flash Memory: 256KB
  • SRAM: 32KB
  • Clock Speed: 48MHz

Pin Configuration

Pin Number Function Description
1 VIN Input voltage to the board
2 GND Ground
3-8 Digital Pins Digital input/output, PWM capable
9 RESET Reset pin, active low
10-15 Analog Pins Analog input
16-17 I2C (SDA, SCL) I2C data and clock lines
18-19 SPI (MISO, MOSI, SCK) SPI communication lines
20 UART (RX, TX) UART communication lines

Usage Instructions

Setting Up the Development Environment

  1. Install the Arduino IDE from the official Arduino website.
  2. Open the Arduino IDE, go to File > Preferences, and add the following URL to the "Additional Boards Manager URLs" field:
    https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
    
  3. Go to Tools > Board > Boards Manager, search for "SAMD", and install the "Arduino SAMD Boards" package.
  4. Select the SparkFun SAMD21 Dev Breakout from Tools > Board.

Connecting to a Circuit

  • Ensure that the board is powered correctly through the USB or VIN pin.
  • Connect digital and analog pins as required for your application, respecting the voltage and current limitations.
  • Use the RESET pin to reset the microcontroller if necessary.

Programming the Board

  • Connect the board to your computer using a micro USB cable.
  • Select the correct port from Tools > Port.
  • Write your sketch and upload it to the board using the Upload button.

Best Practices

  • Always disconnect the board from power sources before making or altering connections.
  • Use a current limiting resistor with LEDs and other sensitive components.
  • Avoid exposing the board to static discharge, moisture, or extreme temperatures.

Troubleshooting and FAQs

Common Issues

  • Board not recognized: Ensure that the correct drivers are installed and the USB cable is functioning.
  • Sketch not uploading: Check the selected board and port in the Arduino IDE. Press the reset button twice quickly to enter bootloader mode if necessary.
  • Unexpected behavior: Verify that the power supply is adequate and the pins are configured correctly in the sketch.

FAQs

  • Can I power the board with a battery? Yes, you can power the board with a battery connected to the VIN pin, within the 7-15V range.

  • What is the maximum current per I/O pin? The maximum DC current per I/O pin is 7 mA.

  • How do I use the onboard LED? The onboard LED is connected to pin 13. You can control it using digital write functions in your sketch.

Example Code for Arduino UNO

Here's a simple example of blinking the onboard LED:

// Pin 13 has an LED connected on most Arduino boards.
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Remember to adjust the pin number and settings according to the SparkFun SAMD21 Dev Breakout specifications when adapting code for this board.