Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Arduino Zero MKR: Examples, Pinouts, and Specs

Image of Arduino Zero MKRDesign with Arduino Zero MKR in Cirkit Designer

Introduction

The Arduino Zero MKR is a compact and versatile microcontroller board powered by the SAMD21 ARM Cortex-M0+ processor. Designed specifically for Internet of Things (IoT) applications, it features built-in Wi-Fi and Bluetooth connectivity, making it an excellent choice for projects requiring wireless communication. The board offers a variety of digital and analog I/O pins, enabling seamless integration with sensors, actuators, and other peripherals.

Explore Projects Built with Arduino Zero MKR

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 Arduino MKR WiFi 1010 Basic Power Supply with Voltage Divider: A project utilizing Arduino Zero MKR in a practical application
Arduino MKR WiFi 1010 Basic Power Supply with Voltage Divider

This circuit features an Arduino MKR WiFi 1010 powered by a 4xAA battery holder, with the battery's positive terminal connected to the Arduino's VIN pin and the negative terminal to GND. Two 100k Ohm resistors are connected in series between the Arduino's A0 analog input and VCC, with their midpoint also tied to GND, forming a voltage divider that could be used for sensing or reference voltage purposes.

Open Project in Cirkit Designer
Image of Arduino MKR WiFi 1010 Environmental Monitoring Station with Multiple Sensors: A project utilizing Arduino Zero MKR in a practical application
Arduino MKR WiFi 1010 Environmental Monitoring Station with Multiple Sensors

This circuit is designed around an Arduino MKR WiFi 1010 microcontroller and includes a variety of sensors: a water level sensor, an MQ-2 gas sensor, a TEMT6000 ambient light sensor, a steam sensor, a DHT11 temperature and humidity sensor, and a rotary encoder. The sensors are powered by the 5V output from the Arduino and their ground pins are connected to the Arduino's ground. The signal outputs from the sensors are connected to various analog and digital input pins on the Arduino, enabling it to monitor environmental conditions such as gas presence, light levels, temperature, humidity, water level, and user input through the rotary encoder.

Open Project in Cirkit Designer
Image of Arduino MKR WiFi 1010 Controlled Relay Switching Circuit: A project utilizing Arduino Zero MKR in a practical application
Arduino MKR WiFi 1010 Controlled Relay Switching Circuit

This circuit consists of an Arduino MKR WiFi 1010 microcontroller connected to a 5V relay. The Arduino is programmed to receive LoRa wireless communication signals and toggle the relay based on the received data, which controls the connection between the relay's Common terminal and either the Normally Open or Normally Closed terminal. The relay's activation is dependent on the specific message received ('button pressed'), which is intended to switch a connected external load on or off.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The Arduino Zero MKR features a variety of pins for digital, analog, and communication purposes. Below is a detailed pinout description:

Pin Type Description
VIN Power Input External power input (5V to 6V).
3.3V Power Output Regulated 3.3V output for powering external components.
GND Ground Ground connection.
A0-A6 Analog Input 12-bit ADC pins for reading analog signals.
D0-D7 Digital I/O General-purpose digital pins (D3, D4, D5, and D6 support PWM).
DAC0 Analog Output 10-bit DAC pin for generating analog signals.
RX/TX UART Serial communication pins (RX for receiving, TX for transmitting).
SDA/SCL I2C I2C communication pins (SDA for data, SCL for clock).
SPI SPI Interface SPI communication pins (MISO, MOSI, SCK, and SS).
RESET Reset Resets the microcontroller.

Usage Instructions

How to Use the Arduino Zero MKR in a Circuit

  1. Powering the Board:

    • Connect the board to a computer or USB power source using a Micro USB cable.
    • Alternatively, supply 5V to 6V via the VIN pin for external power.
  2. Connecting Peripherals:

    • Use the digital I/O pins (D0-D7) to connect LEDs, buttons, or other digital devices.
    • Connect sensors or potentiometers to the analog input pins (A0-A6).
    • For communication with other devices, use the UART (RX/TX), I2C (SDA/SCL), or SPI pins.
  3. Programming the Board:

    • Install the Arduino IDE from the official Arduino website.
    • In the Arduino IDE, select Tools > Board > Arduino MKRZero.
    • Connect the board to your computer via USB and select the appropriate COM port.
    • Write your code and upload it to the board.

Important Considerations and Best Practices

Example Code: Reading an Analog Sensor and Sending Data via Serial

The following example demonstrates how to read an analog sensor connected to pin A0 and send the data to the Serial Monitor.

// Define the analog input pin
const int analogPin = A0;

// Variable to store the sensor value
int sensorValue = 0;

void setup() {
  // Initialize serial communication at 9600 baud
  Serial.begin(9600);
}

void loop() {
  // Read the analog value from the sensor
  sensorValue = analogRead(analogPin);

  // Print the sensor value to the Serial Monitor
  Serial.print("Sensor Value: ");
  Serial.println(sensorValue);

  // Wait for 500 milliseconds before the next reading
  delay(500);
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not recognized by the computer:

    • Ensure that the USB cable is properly connected and functional.
    • Verify that the correct board and COM port are selected in the Arduino IDE.
    • Try reinstalling the USB drivers for the Arduino Zero MKR.
  2. Wi-Fi or Bluetooth is not working:

    • Check that the board is within range of the Wi-Fi network or Bluetooth device.
    • Ensure that the correct libraries (e.g., WiFiNINA) are installed in the Arduino IDE.
    • Verify the network credentials in your code.
  3. The board is overheating:

    • Confirm that the input voltage does not exceed the recommended range (5V to 6V).
    • Avoid drawing excessive current from the 3.3V pin.

FAQs