The Arduino MKR zero board is a great tool for projects related to music or any project which needs to play files. MKR Zero board has an inbuilt SD connector with a dedicated SPI interface which is SPI1 which allows you to play with files without the need for any extra hardware. The Arduino MKR is also a good educational tool for learning about 32-bit application development.
The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM Cortex® M0+ core. The MKR Zero board contains everything which is needed to support the microcontroller. We have to simply connect it to a computer with a micro-USB cable or can power it by using a LiPo battery.
The maximum voltage that MKR Zero can bear is 3.3v. The battery voltage can also be monitored as there is a connection between the battery and the analog converter of the board.
Arduino MKR Zero Board Layout
Processor
The Arduino MKR Zero comes with a small but powerful processor Cortex-M0 32-bit SAMD21.
Ram And Flash Memory
The MKR Zero board consists of 256KB of flash memory and 32KB of Random Access Memory.
USB Micro Power Port
The board comes with an inbuilt micro USB port for connecting it to a PC or supplying power to the circuit.
Micro SD Card Holder
The Arduino MKR Zero board consists of a micro SD card holder which is used for Storing large media files.
Arduino MKR Zero Board Specifications
Microcontroller | SAMD21 Cortex-M0+ 32 bit low power ARM® MCU |
Board Power Supply (USB/VIN) | 5V |
Supported Battery(*) | Li-Po single cell, 3.7V, 700mAh minimum |
DC Current for 3.3V Pin | 600mA |
DC Current for 5V Pin | 600mA |
Circuit Operating Voltage | 3.3V |
Digital I/O Pins | 22 |
PWM Pins | 12 (0, 1, 2, 3, 4, 5, 6, 7, 8, 10, A3 – or 18 -, A4 -or 19) |
UART | 1 |
SPI | 1 |
I2C | 1 |
Analog Input Pins | 7 (ADC 8/10/12 bit) |
Analog Output Pins | 1 (DAC 10-bit) |
External Interrupts | 10 (0, 1, 4, 5, 6, 7, 8, A1 -or 16-, A2 – or 17) |
DC Current per I/O Pin | 7 mA |
Flash Memory | 256 KB |
Flash Memory for Bootloader | 8 KB |
SRAM | 32 KB |
EEPROM | no |
Clock Speed | 32.768 kHz (RTC), 48 MHz |
LED_BUILTIN | 32 |
Arduino MKR Zero Pinout
Power Pins
LiPo
For providing power to the circuit we can connect a Lithium Polymer battery to the circuit with a normal voltage of 3.3v.
5v
This pin is used to produce the output of 5V from the board when it is powered from the USB connector or from the VIN pin of the board. It generates an unregulated voltage and then the voltage is taken directly from the inputs. As an OUTPUT, it should not be used as an input pin to power the board.
2 | +5V | Output or Input | +5V Output (From On-board Regulator) or+5V (Input from External Power Supply |
Vin
This pin can be used to power the board with a regulated 5V source. If the power is supplied with the help of this pin. The USB power source is disconnected when the Vin pin is in use. Using a Vin pin is the only way with which we can supply 5V (range is 5V to maximum 6V) to the board without using USB. This pin is an INPUT pin.
3 | VIN | Power | Supply voltage |
Vcc
Vcc pin generates the output of 3.3V with the help of the onboard voltage regulator. The voltage generated by this pin is the same as that of USB, Vin, and battery regardless of the power source used (USB, Vin, and Battery).
4 | Vcc | Output | Supply Voltage |
Input/output pins
Digital Pins
In Arduino MKR Zero there are a total of 22 digital input output pins available. As we know that these digital pins can only read two states which are:-
- High
- Low
The signal high can also be represented by 1 and the low signal by 0. These are the values that are shown when there is a signal of 5v(i,e. High) and when there is no signal(i,e. Low) respectively.
The digital pins of Arduino MKR Zero are from pin 0 to pin 21.
1 | D0 | I/O | Digital I/O Pin |
2 | D1 | I/O | Digital I/O Pin |
3 | D2 | I/O | Digital I/O Pin |
4 | D3 | I/O | Digital I/O Pin |
5 | D4 | I/O | Digital I/O Pin |
6 | D5 | I/O | Digital I/O Pin |
7 | D6 | I/O | Digital I/O Pin |
8 | D7 | I/O | Digital I/O Pin |
9 | D8 | I/O | Digital I/O Pin |
10 | D9 | I/O | Digital I/O Pin |
11 | D10 | I/O | Digital I/O Pin |
12 | D11 | I/O | Digital I/O Pin |
14 | D12 | I/O | Digital I/O Pin |
15 | D13 | I/O | Digital I/O Pin |
16 | D14 | I/O | Digital I/O Pin |
17 | D15 | I/O | Digital I/O Pin |
18 | D16 | I/O | Digital I/O Pin |
19 | D17 | I/O | Digital I/O Pin |
20 | D18 | I/O | Digital I/O Pin |
21 | D19 | I/O | Digital I/O Pin |
22 | D20 | I/O | Digital I/O Pin |
23 | D21 | I/O | Digital I/O Pin |
Analog Pins
In Arduino MKR Zero there are a total of 7 analog pins available. The analog pins can read any value, unlike digital pins which are only high and low. These 7 analog pins are used to measure analog voltage in the range of 0- 3.3V with a resolution of 10 bits. Each of the analog pins has an inbuilt ADC which can have a resolution of 28 210 or 212 bits.
The analog pins of Arduino MKR Zero are from pin A0 to pin A6.
1 | A0 | Input | Analog Input Channel 0 |
2 | A1 | Input | Analog Input Channel 1 |
3 | A2 | Input | Analog Input Channel 2 |
4 | A3 | Input | Analog Input Channel 3 |
5 | A4 | Input | Analog Input Channel 4 |
6 | A5 | Input | Analog Input Channel 5 |
8 | A6 | Input | Analog Input Channel 6 |
PWM Pins
There are 12 Pulse width modulation pins available on the Arduino MKR Zero board. These pins are used to provide 8-bit PWM output with the help of the AnalogWrite() function.
PWM pins are pins 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, A3 – or 18 -, A4 -or 19.
1 | D0 | I/O | Digital I/O Pin |
2 | D1 | I/O | Digital I/O Pin |
3 | D2 | I/O | Digital I/O Pin |
4 | D3 | I/O | Digital I/O Pin |
5 | D4 | I/O | Digital I/O Pin |
6 | D5 | I/O | Digital I/O Pin |
7 | D6 | I/O | Digital I/O Pin |
8 | D7 | I/O | Digital I/O Pin |
9 | D8 | I/O | Digital I/O Pin |
10 | D10 | I/O | Digital I/O Pin |
11 | A3 | Input | Analog Input Channel 3 |
12 | A4 | Input | Analog Input Channel 4 |
DAC0 Pin
The DAC pin is present just above the Analog Pins and it is used to provide an analog voltage based on the digital input with a resolution of 10 bit.
Communication Pins Of Arduino MKR Zero:-
Serial Rx, Tx Pins
These pins are used for transmitting and receiving serial data. Pin TX is used for the transmission of serial data and pin RX is used for receiving the serial data. These pins are connected with the corresponding pins of the peripheral devices for the transmission process.
SPI Pins
The Arduino MKR Zero board supports the “Semi-Peripheral Communication Protocol” or SPI. The SPI protocol is used to develop communication between the controller device and its peripheral devices. Three pins are needed for SPI communication protocol which is:-
- MISO – It stands for Master Input/Slave Output. This data line sends data to the master device.
- MOSI – It stands for Master Output/Slave Input. This data line is used for sending data to slaves/peripheral devices.
- SCK – This pin is used to synchronize the data transfer between the master and slave device.
SPI pins on the board are D08 which is used as a MOSI pin. D09 which is used as the SCK pin and D10 which is used as the MISO pin.
1 | D08/MOSI | I/O | Digital I/O Pin 8Master Out Slave In | |
2 | D9/SCK | Output | Digital I/O Pin 9Clock From Master To Slave | |
3 | D10/MISO | I/O | Digital I/O Pin 10Master In Slave Out |
UART Pins
The Arduino MKR Zero consists of a UART communication protocol which is used for serial communication. It consists of two pins which are Rx and TX.
- Rx – This pin is used to transmit the serial data.
- TX – This pin is used to receive the serial data.
UART pins are D14 which acts as TX pin and D13 which act as Rx pin.
1 | D13/RX | I/O | Digital I/O PinSerial RX Pin |
2 | D14/TX | I/O | Digital I/O PinSerial TX Pin |
I2C Pins
I2C is a two-wire serial communication protocol. It stands for “Inter-Integrated Circuit.” It uses two pins for communication purposes. One of them is used to send data while the other pin is used to receive data.
The two pins of the I2C protocol are the “Serial Clock Pin(SCA)” and “Serial Data Pin(SDA)”.
- SCA – It is defined as the line which transfers the clock data. SCA pin is used to synchronize the shift of data in between two devices. This signal is generated by the master device.
It is a clock line
- SDA – It is defined as the line which is used by slave devices to send and receive data. It is a data line.
I2C pins on the board are D11 which is SDA and D12 which is SCL.
1 | D11/SDA | I/O | Digital I/O PinSerial Data Pin |
2 | D12/SCL | I/O | Digital I/O PinSerial Clock Pin |
Other pins
AREF Pin
AREF pin is used for providing the reference voltage for the analog inputs. It is used with the help of the analogReference() function.
1 | AREF | Input | ADC reference |
RESET Pin
This pin is used to RESET the microcontroller. For this purpose, we have to pull this line to LOW.
2 | RESET | Input | Reset ( Active Low) |
GND pin
This pin is used as the ground pin of the board.
3 | GND | Power | Supply Ground |
LED
The LED pin is connected to the Vin pin or USB. It is not connected to the lithium polymer battery, this means that it will glow up when the power is from USB or Vin and remains off when the board is running on battery power.
CHARGE LED
The CHARGE LED pin which is present on the board is driven by the charger chip which is used to monitor the current drawn by the Lithium Polymer battery while charging.
Generally, it will light up when the board gets 5V from the VIN pin or USB and the chip starts charging the Lithium Polymer battery.
Frequently Asked Questions:-
- What does the CHARGE LED blinking indicate?
- It indicates that the board is charging the LiPo battery connected to the white JST connector.
- How to use the onboard SD?
- The onboard is connected to a dedicated SPI interface. The SD library deals with it, so we have to use the library for this purpose. We will use SD.begin() without specifying any pin number, the number will fall back to the right one.
- After some time the Charge LED starts blinking even if no battery is attached to the JST connector
- The CHARGE LED on the board is driven by the charger chip. This LED starts to blink at a frequency of about 2Hz if a defective or no battery is connected to the JST connector.