|
| 1 | +--- |
| 2 | +title: 'MKR ETH Shield User Manual' |
| 3 | +difficulty: beginner |
| 4 | +compatible-products: [] |
| 5 | +description: '' |
| 6 | +tags: |
| 7 | + - Cheat sheet |
| 8 | + - User manual |
| 9 | +author: 'Benjamin Dannegård' |
| 10 | +hardware: |
| 11 | + - hardware/ |
| 12 | +software: |
| 13 | + - ide-v1 |
| 14 | + - ide-v2 |
| 15 | + - web-editor |
| 16 | +--- |
| 17 | + |
| 18 | +This user manual provides a comprehensive overview of the MKR ETH Shield, highlighting its hardware and software elements. With it, you will learn how to set up, configure, and use all the main features of a MKR ETH Shield. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +## Hardware and Software Requirements |
| 23 | + |
| 24 | +### Hardware Requirements |
| 25 | + |
| 26 | +- [Arduino MKR ETH Shield](https://store.arduino.cc/products/arduino-mkr-zero-i2s-bus-sd-for-sound-music-digital-audio-data) |
| 27 | +- [USB-B® cable](https://store.arduino.cc/products/usb-cable-type-a-male-to-micro-type-b-male) |
| 28 | + |
| 29 | +### Software Requirements |
| 30 | + |
| 31 | +- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor) |
| 32 | +- [SD library](https://docs.arduino.cc/libraries/sd/) |
| 33 | +- [Arduino SAMD boards core](https://github.com/arduino/ArduinoCore-samd) (required to work with the MKR ETH Shield board) |
| 34 | + |
| 35 | +## Maker Zero Overview |
| 36 | + |
| 37 | +The MKR ETH Shield brings you the power of a Zero in the smaller format established by the MKR form factor. The MKR ETH Shield acts as a great educational tool for learning about 32-bit application development. It has an on-board SD connector with dedicated SPI interfaces (SPI1) that allows you to play with MUSIC files with no extra hardware! The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM® Cortex® M0+ core. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it by a LiPo battery. The battery voltage can also be monitored since a connection between the battery and the analog converter of the board exists. |
| 42 | + |
| 43 | +### Board Libraries |
| 44 | + |
| 45 | +The [`SD` library](https://www.arduino.cc/reference/en/libraries/sd/) enables reading and writing on SD cards. Once an SD memory card is connected to the SPI interface of the Arduino board you can create files and read/write on them. You can also move through directories on the SD card. |
| 46 | + |
| 47 | +To install the `SD` library, navigate to `Tools > Manage libraries...` or click the **Library Manager** icon in the left tab of the Arduino IDE. In the Library Manager tab, search for `SD` and install the latest version of the library. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +### Pinout |
| 52 | + |
| 53 | +The full pinout is available and downloadable as PDF from the link below: |
| 54 | + |
| 55 | +- [MKR ETH Shield pinout](https://docs.arduino.cc/resources/pinouts/ABX00012-full-pinout.pdf) |
| 56 | + |
| 57 | +### Tech Specs |
| 58 | + |
| 59 | +The tech specs are available from the link below: |
| 60 | + |
| 61 | +- [MKR ETH Shield tech specs](https://docs.arduino.cc/hardware/mkr-zero/#tech-specs) |
| 62 | + |
| 63 | +### Schematics |
| 64 | + |
| 65 | +The complete schematics are available and downloadable as PDF from the link below: |
| 66 | + |
| 67 | +- [MKR ETH Shield schematics](https://docs.arduino.cc/resources/schematics/ABX00012-schematics.pdf) |
| 68 | + |
| 69 | +## First Use |
| 70 | + |
| 71 | +### Connecting the Board |
| 72 | + |
| 73 | +As shown in the image below, the Nicla Sense Env can be connected to a Portenta or MKR family board using the onboard ESLOV connector and the included ESLOV cable. Alternatively, you can connect the Nicla Sense Env as a shield by using the MKR-style pins on the Portenta or MKR family boards. |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +For other compatible boards, such as those from the Nano family, the Nicla Sense Env can also be connected using the 2.54 mm pins of the Nicla Sense Env board. |
| 78 | + |
| 79 | +### Powering the Board |
| 80 | + |
| 81 | +The Nicla Sense Env can be powered by: |
| 82 | + |
| 83 | +- Using the onboard **ESLOV connector**, which has a dedicated +5 VDC power line regulated onboard to +3.3 VDC. |
| 84 | +- Using an **external +3.3 VDC power supply** connected to the `VCC` pin (please refer to the [board pinout section](#pinout) of the user manual). |
| 85 | + |
| 86 | +### Blink Example |
| 87 | + |
| 88 | +Let's control the MKR ETH Shield to reproduce the classic `blink` example used in the Arduino ecosystem. We will use this example to verify the MKR ETH Shield board's connection to the Arduino IDE. |
| 89 | + |
| 90 | +Now, connect the host board to your computer using a USB-B® cable, open the Arduino IDE, and connect the board to it. |
| 91 | + |
| 92 | +Copy and paste the example sketch below into a new sketch in the Arduino IDE: |
| 93 | + |
| 94 | +```arduino |
| 95 | +
|
| 96 | +``` |
| 97 | + |
| 98 | +To upload the sketch to the host board, click the **Verify** button to compile the sketch and check for errors, then click the **Upload** button to program the device with the sketch. |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +You should see the onboard orange LED of your Nicla Sense Env board turn on for one second, then off for one second, repeatedly. |
| 103 | + |
| 104 | +### SD card example |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +### Low Power Mode Management |
| 109 | + |
| 110 | +Saving energy is vital for many projects, particularly those deployed in remote areas or with a limited power supply. The Nicla Sense Env supports a deep sleep mode that can help to minimize the board's power consumption. |
| 111 | + |
| 112 | +***Deep sleep is essential for extending battery life and minimizing energy consumption when the board is not collecting data or performing tasks. It is necessary for battery-powered or power-constrained applications.*** |
| 113 | + |
| 114 | +The example sketch shown below demonstrates how to put the Nicla Sense Env board into deep sleep mode using the `Arduino_NiclaSenseEnv` library API: |
| 115 | + |
| 116 | +```arduino |
| 117 | +/** |
| 118 | + Low Power Mode Management Example for Nicla Sense Env |
| 119 | + Name: nicla_sense_env_low_power_mode_example.ino |
| 120 | + Purpose: This sketch demonstrates how to put the Nicla Sense Env |
| 121 | + into deep sleep mode using the Arduino_NiclaSenseEnv library API. |
| 122 | + |
| 123 | + @author Arduino Product Experience Team |
| 124 | + @version 1.0 31/05/24 |
| 125 | +*/ |
| 126 | +
|
| 127 | +// Include the NiclaSenseEnv library |
| 128 | +#include "NiclaSenseEnv.h" |
| 129 | +
|
| 130 | +// Global device object for Nicla Sense Env |
| 131 | +NiclaSenseEnv device; |
| 132 | +
|
| 133 | +void setup() { |
| 134 | + // Initialize serial communication and wait up to 2.5 seconds for a connection |
| 135 | + Serial.begin(115200); |
| 136 | + for (auto startNow = millis() + 2500; !Serial && millis() < startNow; delay(500)); |
| 137 | +
|
| 138 | + if (device.begin()) { |
| 139 | + // Putting the device to sleep |
| 140 | + Serial.println("- Going to deep sleep mode..."); |
| 141 | + device.deepSleep(); |
| 142 | + } else { |
| 143 | + Serial.println("- Device could not be found. Please double-check the wiring!"); |
| 144 | + } |
| 145 | +} |
| 146 | +
|
| 147 | +void loop() { |
| 148 | + // Nothing to do here. The device is in deep sleep mode. |
| 149 | +} |
| 150 | +``` |
| 151 | + |
| 152 | +Here is a detailed breakdown of the example sketch shown before and the `Arduino_NiclaSenseEnv` library API functions used in the sketch: |
| 153 | + |
| 154 | +- `device.deepSleep()`: This function puts the Nicla Sense Env board into a deep sleep state, minimizing power consumption to the lowest possible level. |
| 155 | + |
| 156 | +After uploading the example sketch to the host board, you should see the following output in the Arduino IDE's Serial Monitor: |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | +***Waking up a Nicla Sense Env board from deep sleep mode can only be done by a hardware reset.*** |
| 161 | + |
| 162 | +You can download the example sketch [here](assets/nicla_sense_env_low_power_mode_example.zip). |
| 163 | + |
| 164 | +## Support |
| 165 | + |
| 166 | +If you encounter any issues or have questions while working with your MKR ETH Shield board, we provide various support resources to help you find answers and solutions. |
| 167 | + |
| 168 | +### Help Center |
| 169 | + |
| 170 | +Explore our Help Center, which offers a comprehensive collection of articles and guides for MKR family boards and shields. The Help Center is designed to provide in-depth technical assistance and help you make the most of your device. |
| 171 | + |
| 172 | +- [MKR family help center page](https://support.arduino.cc/hc/en-us/sections/360004641919-MKR-Family) |
| 173 | + |
| 174 | +### Forum |
| 175 | + |
| 176 | +Join our community forum to connect with other MKR family board users, share your experiences, and ask questions. The Forum is an excellent place to learn from others, discuss issues, and discover new ideas and projects related to the MKR ETH Shield. |
| 177 | + |
| 178 | +- [MKR category in the Arduino Forum](https://forum.arduino.cc/c/official-hardware/mkr-boards/79) |
| 179 | + |
| 180 | +### Contact Us |
| 181 | + |
| 182 | +Please get in touch with our support team if you need personalized assistance or have questions not covered by the help and support resources described before. We're happy to help you with any issues or inquiries about the MKR family boards. |
| 183 | + |
| 184 | +- [Contact us page](https://www.arduino.cc/en/contact-us/) |
0 commit comments