An Open-Source platform to create digital devices and interactive objects that sense and control physical devices. | Arduino Tutorials | |
Arduino Projects |
The Arduino MKRZero brings you the power of the Arduino Zero in the smaller MKR form factor. It acts as an educational tool for learning about 32-bit application development. It has an onboard SD connector with dedicated SPI interfaces that allows you to play with files without the need for extra hardware.
Arduino MKR Zero Board:
Product Name | Quantity | |
---|---|---|
Arduino MKR Zero Development Board | 1 | Buy NowBuy Now |
Arduino MKR Shields:
Product Name | Quantity | |
---|---|---|
Arduino MKR SD Proto Shield | 1 | Buy NowBuy Now |
Arduino MKR CAN Shield | 1 | Buy NowBuy Now |
Arduino MKR Relay Proto Shield | 1 | Buy NowBuy Now |
Arduino MKR Connector Carrier | 1 | Buy NowBuy Now |
Arduino MKR MEM Shield | 1 | Buy NowBuy Now |
Arduino MKR 485 Shield | 1 | Buy NowBuy Now |
Arduino MKR ETH Shield | 1 | Buy NowBuy Now |
Arduino MKR Proto Shield | 1 | Buy NowBuy Now |
Arduino MKR Proto Large Shield | 1 | Buy NowBuy Now |
It features a Microchip AT SAMD21, 48 Mhz 32 bit MO+ ARM Cortex low power processor. Its the same SAMD21 as the MKR 1000, MKR Zero, and Arduino/Genuino Zero boards.
The Arduino MKR 1300 uses the same pin mapping as the MRK 1000:
Power Pins:
- Li-Po (3.7V) - You can power the board by connecting a Lithium polymer battery (shown to the right) with a nominal voltage of 3.7.
- Vin - The board can be powered by a regulated 5V supply with a maximum voltage of 6V for this Pin.
- 5V - When the board is powered by USB, you can use this pin get +5V to power other circuit
- Vcc - This pin uses the on board regulator IC to output a regulated 3.3V
- GND - Ground Pins
Reset Pin - Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
Analog Pins (Pins A0-A06) - The 7 analog pins are used to emasure analog voltage in the range 0- 3.3V with a resolution of 10 bit.
DAC0 Pin - The DAC pin is just above the Analog Pins and is used provide an analog voltage based in the digital input with a resolution of 10bit.
Digital I/O Pins (Pins 0-14) - Below the analog pins on the left and just below the reset are digital pins that can be used as either input or output pins. Low is at 0V and high is at 3.3V.
Serial Rx, Tx Pins (Pins 13, 14) - Pins 13 and 14 are used to Receive (Rx) and Transmit (Tx) TTL serial data. These pins are connected to the corresponding pins of the FTDI USB-to-TTL serial chip.
External Interrupts (Pins 0,1, 4, 5,6, 7, 8, A1, A4) - These pins can be used to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See attachInterrupt()function for details.
PWM Pins (Pins 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, A3, A4) - These pins provide 8-bit PWM output with the analogWrite () function.
SPI (Pin 8 - MOSI, Pin 9 - SCK, Pin 10 - MISO) - These pins support SPI Communication
LED - There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
I2C Pins (Pin 11 is SDA and Pin 12 is SCL) - Pin 11 (SDA) and Pin 12(SCL) support I2C (TWI) communication using the Wire library (documentation on the Wiring website).
AREF Pin - Reference voltage for the analog inputs. Used with analogReference().
The low power, high performance ARM Cortex-MO+ is ideal for a wide range of home automation, consumer, metering, and industrial applications. Its the same SAMD21 as the MKR 1000, MKR Zero, and Arduino/Genuino Zero boards. A unique feature of the SAMD21 chip is SERCOM, a set of six configurable serial interfaces. These can be turned into either a UART, I2C master, I2C slave, SPI master, and SPI slave. Additionally it features a 32-bit Real-Time Clock and calendar, 20 PWM channels, one 14-channel 12-bit ADC, on 10-bit DAC.
ATSAMD21G18A Overview | |
---|---|
Architecture | ARM Cortex-MO+ |
Voltage Range | 1.62-3.63V |
Bus Size | 32-Bit |
Max CPU Speed | 48MHz |
Internal Oscillator | 21khz, 23Khz ULP, 8Mhz |
Program Memory Size | 256KB |
SRAM | 32KB |
EEPROM | 32KB (emulated from Flash) |
GPIO | 38 |
ADC Channels | 14 |
ADC Resolution | 12-bit |
Digital-to-Analog Converter (DAC) | Yes |
USB Controller | Yes |
Direct Memory Access (DMA) | 12 Channel |
Peripheral Touch Controller | Yes |
Inter-IC Sound 12S | Yes |
32 bits, 48 Mhz
The 32 bit architecture allows you to process your instructions faster at double the speed of an 8-bit AVR. While the AVR must process data in 8-bit, the 32-bit architecture allows the SAMD21G to process data in one large chunk.
Memory Map:
USB Controller
Like the ATmega32U4 used on the Leonardo, ATSAMD21 comes with an integrated USB controller, allowing it to be used as either a USB device or host. In device mode it configures itself as a USB CDC (communication device class) so that your computer talks to it as if it were a serial port. This allows the SAMD21 to emulate a mouse, keyboard, or controller, and also work as a mass flash storage. If used as a USB host it can connect to keyboard or mouse, as well as, save data to a USB flash drive. However, to act as a host requires extra power supply.
Real-Time Clock
The SAMD21 has a separate real time clock (RTC), powered by an on board 32.78 crystal, that runs at a full 48 MHz. Also, almost every pin is tied to timer-counter, giving you a lot more PWM-capable I/O pins so you'll have plenty of options for dimming lights or controlling motors.
Reference links:
- Arduino Sound Library: https://www.arduino.cc/en/Reference/ArduinoSound
- 12S Library: https://www.arduino.cc/en/Reference/I2S
Github links:
Arduino Core for SAMD21 CPU: https://github.com/arduino/ArduinoCore-samd/tree/master/variants/mkrzero
The RTC library enables an Arduino Zero or MKR1000 board to take control of the internal RTC: https://github.com/arduino-libraries/RTCZero
The Audio library enables an Arduino Zero or MKR1000 board to play back .wav files from a storage device like an SD card: https://github.com/arduino-libraries/AudioZero
Arduino Command Line Interface: https://github.com/arduino/arduino-cli
FAQ:
I plugged the board to my PC / MAC but I cannot see the serial port listed on the IDE, I cannot upload sketch to the board!
- The first thing to try is manually put the CPU into bootloader mode, this is accomplished by pressing quickly twice the reset button (you need a pencil to actually push the button). Another try is to change the USB cable: some micro-USB cables are "power only", you'll see the board powered but no data connection to the PC.
I plugged the board, I can see the serial port but I cannot upload sketch:
- If still on, remove the conductive foam that protects the pins.
What's the pin number of the onboard LED? Pin 13 seems to not work...
- The LED is connected to a dedicated pin. Use the LED_BUILTIN constant instead of declaring the pin number.
What does the CHRG LED blinking indicate?
- Indicates that the board is charging the LiPo battery connected to the white JST connector. Please note that the charger use a constant current of 350mA, this means that you must use a LiPo battery with a minimum capacity of 700mAh otherwise you risk unpleasant side-effects like flames and/or explosions.
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 (slow blink) if a defective or no battery is connected to the JST connector.
I see that A0 is marked as DAC0. There is a DAC on that pin? is usable?
- Yes, there is a DAC and it's usable, you can control the pin with analogWrite(..). Q:
Which is the VIN range voltage value?
- VIN Nominal voltage value is 5V, range is from 5V to 6V (6V is the Maximum)
Which is the polarity of the battery?
- Looking at the connector pins: Left = Positive, Right = GND Q:
How can I use the on-board SD?
- The on-board is connected to a dedicated SPI interface. The SD library deals with it, so you use the library as usual. Use SD.begin() without specify any pin number, the number will fallback to the right one.
What Vin, 5V and VCC means?
- Vin. This pin can be used to power the board with a regulated 5V source. If the power is fed through this pin, the USB power source is disconnected. This is the only way you can supply 5v (range is 5V to maximum 6V) to the board not using USB. This pin is an INPUT. 5V. This pin outputs 5V from the board when powered from the USB connector or from the VIN pin of the board. It is unregulated and the voltage is taken directly from the inputs. When powered from the battery it supplies around 3.7 V. As an OUTPUT, it should not be used as an input pin to power the board. VCC. This pin outputs 3.3V through the onboard voltage regulator. This voltage is the same regardless the power source used (USB, Vin and Battery).