Arduino MKR Zero: распиновка, схема подключения и программирование
Arduino MKR Zero — платформа для разработки на базе микроконтроллера ATSAMD21G18 с вычислительным ядром ARM Cortex® M0!
Видеообзор
Подключение и настройка
Шаг 1
Скачайте и установите на компьютер интегрированную среду разработки Arduino IDE.
Шаг 2
По умолчанию среда Arduino IDE настроена только на AVR-платы. Для работы с платформой Arduino MKR Zero — добавьте в менеджере плат поддержку платформ на ядре ARM Cortex-M0+.
Примеры работы
Элементы платы
Микроконтроллер ATSAMD21G18
Мозгом платформы Arduino MKR Zero является 32-разрядный микроконтроллер фирмы Microchip (Atmel) — ATSAMD21G18 с вычислительном ядром ARM Cortex® M0.
Благодаря использованию 32-разрядного ядра ARM, Arduino MKR Zero во многом превосходит типичные платы на базе 8-разрядных микроконтроллеров. Наиболее существенные отличия заключаются в следующем:
Разъём micro-USB
Разъём micro-USB предназначен для прошивки платформы Arduino M0 с помощью компьютера.
Светодиодная индикация
Имя светодиода | Назначение |
---|---|
ON | Индикатор питания. При питании платформы от аккумулятора через JST PH-разъём светодиод ON не горит для экономии питания. |
CHRG | Индикатор зарядки внешнего аккумулятора |
L | Пользовательский светодиод на 32 пине микроконтроллера, в отличии от 13 пина на других платформах Arduino. Используйте определение LED_BUILTINС для работы со светодиодом. При задании значения HIGH светодиод включается, при LOW – выключается. |
Разъём подключения аккумулятора
На плате расположен JST PH-разъём (2 pin) для подключения внешних Li-Pol и Li-Ion аккумуляторов. При одновременном питании платформы от USB и аккумулятора:
При питании платформы только от аккумулятора:
Разъём I²C интерфейса
На платформе предусмотрен JST SH-разъём (5 pin) для подключения дополнительных модулей по интерфейсу «I²C». Коннектор включает в себя:
Регулятор напряжения
Линейный понижающий регулятор напряжение AP7215-33 с выходом 3,3 вольта обеспечивает питание микроконтроллера. Максимальный выходной ток составляет 600 мА.
Слот карты microSD
Слот для подключения карты памяти формата microSD. Пины холдера подключены к микроконтроллеру через «SPI1», который позволяет общаться с картой памяти без траты выведенных пинов на платформе Arduino MKR Zero.
Кнопка RESET
Служит для сброса микроконтроллера. Это аналог кнопки RESET обычного компьютера.
Распиновка
Пины питания
Порты ввода/вывода
В отличии от большинство плат Arduino, родным напряжением Arduino MKR Zero является 3,3 В, а не 5 В. Выходы для логической единицы выдают 3,3 В, а в режиме входа ожидают принимать не более 3,3 В. Большее напряжение может повредить микроконтроллер!
Будьте внимательны при подключении периферии: убедитесь, что она может корректно функционировать в этом диапазоне напряжений.
MKR Zero
The Arduino MKR Zero is a development board for music makers! With an SD card holder and dedicated SPI interfaces (SPI1), you are able to play music files without extra hardware.
The powerful, low-power processor that is used in all MKR Family boards.
Store large media files, build advanced UIs for displays or log data offline: extra space is always useful.
Board | Name | ArduinoВ® MKR Zero |
---|---|---|
SKU | ABX00012 | |
Microcontroller | SAMD21 CortexВ®-M0+ 32bit low power ARM MCU | |
USB connector | Micro USB (USB-B) | |
Pins | Built-in LED Pin | 32 |
Digital I/O Pins | 8 | |
Analog Input Pins | 7 (ADC 8/10/12 bit) | |
Analog Output Pins | 1 (DAC 10 bit) | |
PWM Pins | 13 (0 — 8, 10, 12, A3, A4) | |
External interrupts | 10 (0, 1, 4, 5, 6, 7, 8 ,9, A1, A2) | |
Communication | UART | Yes |
I2C | Yes | |
SPI | Yes | |
Power | I/O Voltage | 3.3V |
Input Voltage (nominal) | 5-5.5V | |
DC Current per I/O pin | 7 mA | |
Supported battery | Li-Po single cell, 3.7V, 700mAh minimum | |
Battery connector | JST PH | |
Clock speed | Processor | 48 MHz |
RTC | 32.768 kHz | |
Memory | SAMD21G18A | 256KB Flash, 32KB SRAM |
Dimensions | Weight | 32 g |
Width | 25 mm | |
Length | 61.5 mm |
Software & Cloud
The following software tools allow you to program your board both online and offline.
Hardware
The hardware listed below is compatible with this product.
Arduino Zero
Arduino Zero is a simple and powerful 32-bit extension of the platform established by the UNO. This board aims to provide a platform for innovative projects in smart IoT devices, wearable technology, high-tech automation, crazy robotics, and much more.
Overview
The Zero is a simple and powerful 32-bit extension of the platform established by the UNO. The Zero board expands the family by providing increased performance, enabling a variety of project opportunities for devices, and acts as a great educational tool for learning about 32-bit application development. The Zero applications span from smart IoT devices, wearable technology, high-tech automation, to crazy robotics. The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM® Cortex® M0+ core. One of its most important features is Atmel’s Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware, significantly increasing the ease-of-use for software debugging. EDBG also supports a virtual COM port that can be used for device and bootloader programming.
Warning: Unlike most Arduino boards, the Zero runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Applying voltages higher than 3.3V to any I/O pin could damage the board.
The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter or battery to get started. The Zero is compatible with all the shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.
You can find your board warranty information here.
Arduino boards based on AVR microcontrollers get a reset and restart sketch execution each time the Serial Monitor of the Arduino Software (IDE) is opened. This is also the mechanism used to upload sketches to these boards. This board is different: when the Zero is connected through the Programming Port and you open the Serial Monitor, the board does not automatically reset and the sketch loaded keeps running. To restart the sketch you need to press the reset button on the board itself.
Getting Started
In the Getting Started section, you can find all the information you need to configure your board, use the Arduino Software (IDE), and start to tinker with coding and electronics. To keep your Zero’s Bootloader up to date, the the Update Procedure explains what you should do each time there is a new Arduino SAMD Boards release.
Need Help?
- On the Software on the Arduino Forum
- On Projects on the Arduino Forum
- On the Product itself through our Customer Support
Tech specs
Microcontroller | ATSAMD21G18, 32-Bit ARM® Cortex® M0+ |
Operating Voltage | 3.3V |
Digital I/O Pins | 20 |
PWM Pins | 3, 4, 5, 6, 8, 9, 10, 11, 12, 13 |
UART | 2 (Native and Programming) |
Analog Input Pins | 6, 12-bit ADC channels |
Analog Output Pins | 1, 10-bit DAC |
External Interrupts | All pins except pin 4 |
DC Current per I/O Pin | 7 mA |
Flash Memory | 256 KB |
SRAM | 32 KB |
EEPROM | None. See documentation |
LED_BUILTIN | 13 |
Clock Speed | 48 MHz |
Length | 68 mm |
Width | 53 mm |
Weight | 12 gr. |
Documentation
OSH: Schematics
The Zero is open-source hardware! You can build your own board using the following files:
Pinout Diagram
Download the full pinout diagram as PDF here.
Interactive Board Viewer
ARM Core Benefits
- 32-bit core that allows operations on 4 byte wide data within a single CPU clock. (For more information see the int type page)
- CPU Clock at 48MHz
- 12 channels DMA controller that can relieve the CPU from doing memory intensive tasks
- 32 bit Real Time Counter (RTC) with clock/calendar function
- 32 bit CRC generator
- Two-channel Inter IC Sound (I2S) interface
- Peripheral Touch Controller (PTC)
For further information about the SAM-D21 microcontroller please refer to the datasheet.
Atmel Embedded Debugger
- VIN. The input voltage to the board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or if supplying voltage via the power jack, access it through this pin.
- 5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 — 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board if it is not sufficiently regulated. We don’t advise it.
- 3.3V. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provides power to the SAMD21 microcontroller.
- GND. Ground pins.
- IOREF. This pin on the board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
Memory
Input and Output
There are a couple of other pins on the board:
- AREF. Reference voltage for the analog inputs. Used with analogReference().
- Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
Programming
- Programming port: To use this port, select «Arduino/Genuino Zero (Programming Port)» as your board in the Arduino IDE. Connect the Zero’s programming port (the one closest to the DC power jack) to your computer. The programming port uses the EDBG as a USB-to-SWD chip.
- Native port: To use this port, select «Arduino/Genuino Zero (Native USB Port)» as your board in the Arduino IDE. The Native USB port is connected directly to the SAMD21. Connect the Zero’s Native USB port (the one closest to the reset button) to your computer.
Unlike other Arduino & Genuino boards which use avrdude for uploading, the Zero relies on bossac while the programming port uses openOCD .
Arduino Zero
Arduino Zero is a simple and powerful 32-bit extension of the platform established by the UNO. This board aims to provide a platform for innovative projects in smart IoT devices, wearable technology, high-tech automation, crazy robotics, and much more.
Overview
The Zero is a simple and powerful 32-bit extension of the platform established by the UNO. The Zero board expands the family by providing increased performance, enabling a variety of project opportunities for devices, and acts as a great educational tool for learning about 32-bit application development. The Zero applications span from smart IoT devices, wearable technology, high-tech automation, to crazy robotics. The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM® Cortex® M0+ core. One of its most important features is Atmel’s Embedded Debugger (EDBG), which provides a full debug interface without the need for additional hardware, significantly increasing the ease-of-use for software debugging. EDBG also supports a virtual COM port that can be used for device and bootloader programming.
Warning: Unlike most Arduino boards, the Zero runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Applying voltages higher than 3.3V to any I/O pin could damage the board.
The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter or battery to get started. The Zero is compatible with all the shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.
You can find your board warranty information here.
Arduino boards based on AVR microcontrollers get a reset and restart sketch execution each time the Serial Monitor of the Arduino Software (IDE) is opened. This is also the mechanism used to upload sketches to these boards. This board is different: when the Zero is connected through the Programming Port and you open the Serial Monitor, the board does not automatically reset and the sketch loaded keeps running. To restart the sketch you need to press the reset button on the board itself.
Getting Started
In the Getting Started section, you can find all the information you need to configure your board, use the Arduino Software (IDE), and start to tinker with coding and electronics. To keep your Zero’s Bootloader up to date, the the Update Procedure explains what you should do each time there is a new Arduino SAMD Boards release.
Need Help?
- On the Software on the Arduino Forum
- On Projects on the Arduino Forum
- On the Product itself through our Customer Support
Tech specs
Microcontroller | ATSAMD21G18, 32-Bit ARM® Cortex® M0+ |
Operating Voltage | 3.3V |
Digital I/O Pins | 20 |
PWM Pins | 3, 4, 5, 6, 8, 9, 10, 11, 12, 13 |
UART | 2 (Native and Programming) |
Analog Input Pins | 6, 12-bit ADC channels |
Analog Output Pins | 1, 10-bit DAC |
External Interrupts | All pins except pin 4 |
DC Current per I/O Pin | 7 mA |
Flash Memory | 256 KB |
SRAM | 32 KB |
EEPROM | None. See documentation |
LED_BUILTIN | 13 |
Clock Speed | 48 MHz |
Length | 68 mm |
Width | 53 mm |
Weight | 12 gr. |
Documentation
OSH: Schematics
The Zero is open-source hardware! You can build your own board using the following files:
Pinout Diagram
Download the full pinout diagram as PDF here.
Interactive Board Viewer
ARM Core Benefits
- 32-bit core that allows operations on 4 byte wide data within a single CPU clock. (For more information see the int type page)
- CPU Clock at 48MHz
- 12 channels DMA controller that can relieve the CPU from doing memory intensive tasks
- 32 bit Real Time Counter (RTC) with clock/calendar function
- 32 bit CRC generator
- Two-channel Inter IC Sound (I2S) interface
- Peripheral Touch Controller (PTC)
For further information about the SAM-D21 microcontroller please refer to the datasheet.
Atmel Embedded Debugger
- VIN. The input voltage to the board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or if supplying voltage via the power jack, access it through this pin.
- 5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 — 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board if it is not sufficiently regulated. We don’t advise it.
- 3.3V. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provides power to the SAMD21 microcontroller.
- GND. Ground pins.
- IOREF. This pin on the board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
Memory
Input and Output
There are a couple of other pins on the board:
- AREF. Reference voltage for the analog inputs. Used with analogReference().
- Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
Programming
- Programming port: To use this port, select «Arduino/Genuino Zero (Programming Port)» as your board in the Arduino IDE. Connect the Zero’s programming port (the one closest to the DC power jack) to your computer. The programming port uses the EDBG as a USB-to-SWD chip.
- Native port: To use this port, select «Arduino/Genuino Zero (Native USB Port)» as your board in the Arduino IDE. The Native USB port is connected directly to the SAMD21. Connect the Zero’s Native USB port (the one closest to the reset button) to your computer.
Unlike other Arduino & Genuino boards which use avrdude for uploading, the Zero relies on bossac while the programming port uses openOCD .