Skip to main content

First Impressions of the Arduino MKR WAN 1300

ArduinoMKRWAN1300_11cad8014f5a2749ed93587a6129408cf4bba11e.jpg

A first look at the compact LoRaWAN enabled Arduino and running the example sketches.

To quote from the standard description of the Arduino MKR WAN 1300 (171-1859) , it “is the ideal solution for makers wanting to design IoT projects with minimal previous experience in networking … ”. So ideal for me to try out.

Features

Atmel_2be43bb75c7d12838789515a248a81758d4b22b9.jpg

The MKR WAN 1300 has the same form factor as the other Arduino MKR boards and offers a lot of functionality in a very small package. It uses the Atmel SAMD21 microcontroller and Murata MCWX1ZZABZ LoRa module for connectivity.

murata_d8811143bb855b85ea4fd8239a53c7b05987adea.jpg
The board can be powered by two 1.5V AAA or AA batteries, else an external 5V supply via the micro USB socket, and switches automatically between the two.

To use the LoRa radio it is also necessary to connect an antenna to the U.FL connector. Also, check that the antenna is tuned for the correct frequency band for your region. I.e. one of 433, 868 or 915 MHz for LoRa.

Getting Started

As advised I first removed the black foam that protects the pins of the board as it is conductive and can cause erratic behaviour if the board is connected while it is in place.

I followed the guide for getting started with the MKR WAN 1300 and Arduino IDE, first of all adding the Atmel SAMD Core to the IDE boards, via Boards Manager in the “Tools” menu.

Screenshot_-_Boards_Manager2_ebc7adcd58ba2f7247287fab2711445baf474c88.jpg

Then it is simply a case of connecting the board to your PC via the micro USB socket and selecting the board from the boards menu

boards_manager3_414ad29c1c4f44b4c07a8883e47b3086d0f1b1eb.png

And following which selecting the correct port ...

select_port_6fcd6fa393a8f864b445bbc5a0ba5097558018aa.png

Now I was ready to upload a sketch!

It is worth noting that I tried this procedure on both Ubuntu and Windows. Drivers need to be installed on the Windows PC, which happens automatically when the board is added to the Arduino IDE, but it did take a little time so some patience was needed.

Connecting to The Things Network

I wanted to connect the board to The Things Network (TTN) as I already have an account and I know I am in range of a LoRaWAN gateway both at work and at home. Again there was a handy guide.

library_353a589236d8a200712b128cb7d68b7ea59e5eb7.png

I needed to install the MKRWAN Library, using the Library Manager in the Sketch menu.

Screenshot_-_library_manager_a5666527ac9544229bfedd0fc10e19140dbc893c.jpg

Searching for “mkrwan” brought up the library and I installed the latest version.

I could now see the MKRWAN Examples in the Files / Example menu.

The initial thing to do was to run the First Configuration Sketch and then open the Serial Monitor so that I could see the device EUI that I would subsequently need to add the device to an Application in the TTN console.

Armed with the EUI of the board I could now go to TTN console, set up an Application and Register the board as a Device.

TTN_Register_Device_4866a7f108af7d76beb683a743a767809ca4c996.jpg

If you are new to The Things Network there are good, clear instructions on how to do this here. Once that was done I could go back to the Arduino IDE and try another example.

Testing network uplink

I next opened the LoRa Send and Receive sketch, which consists of two files.

Screenshot_-_secret_sketch_ae11f6157b25d0ba1c7e83f042fe8b3b41739a2c.jpg

I clicked on the tab for the arduino_secrets.h file of the sketch and entered the App EUI and App Key by copying and pasting them from the Devices Overview page on the application I had created in TTN console. Going back to the main LoRa Send and Receive sketch, I checked the I had the Region for the modem set correctly and then uploaded the sketch and opened the Serial Monitor.

uplink_8477205bd0f3eb7041cfcf60e5d1805294841ecd.jpg

On the TTN console, I could see the board was connected. If I typed anything and pressed enter (or clicked send) I could see both in the Serial Monitor and on the TTN Console that whatever I typed was being converted to hex, sent and received. I now know what the ASCII hex for red-tin is!

Testing downlink

Downlink_f80ab37afa995fa639e192e0e2aa6e52d6cef4ab.jpg

To test downlink – sending data from TTN to the Arduino board – I went to the Device Overview page on the TTN Console and scrolled down until I could see the Downlink section. I entered data in hex format (I just copied the red-tin Hex) and clicked the Send button. The data was queued up and in due course sent, following the next uplink from the board to TTN.

LoRaWAN network operation

This downlink data queuing and then sending is by design and as all LoRaWAN Class A end devices must implement. Since this way, the device does not have to leave its radio on and constantly listen for downlink, saving power, while also managing traffic on the LoRaWAN network.

In a similar vein, I noticed I a comment in the sketch which limits uplink frequency.

// NOTE: independently by this setting the modem will

// not allow to send more than one message every 2 minutes,

// this is enforced by firmware and can not be changed.


And trying to send more frequently does indeed generate an error message.

Screenshot-too_frequent_error2_f47fbd2d2756c0ea61f197424a685792e1d365ea.png

This is likely so that the device complies with duty cycle limits stipulated by wireless regulatory bodies in an effort to ensure that you don’t have one or a small number of devices “hogging” the spectrum.

Conclusion

The fact that this board will run on batteries and its diminutive size makes it very portable – ideal for IoT applications. The MKR WAN 1300 obviously comes into its own once sensors are connected and there are examples of it being used as a GPS tracker and the possibility of connecting it to temperature and humidity sensors.

I have a background in the arts, environmental conservation and IT support. In my spare time I do a bit of DJing and I like making things.
DesignSpark Electrical Logolinkedin