Arduin MKR NB 1500
Last updated
Last updated
© 2024 KPN - All rights reserved.
Arduino MKR NB 1500 is the fastest start with LTE-M and the Internet of Things. It’s the perfect introduction to IoT for your organization, and is also used in education. Arduino MKR NB 1500 uses its LTE-M connectivity to connect to the internet from anywhere in the world where there is LTE-M coverage.
When ordering the Arduino MKR WAN 1300/1310 make sure that an antenna is included in the order since it's not delivered with the board
Before you can start you need a KPN simcard. You can order 2 free cards via https://portal.kpnthings.com/home
On this page you will find the window below to order a simcard.
To connect the Arduino MKR NB 1500 to the computer you must use a USB cable.
Download the Arduino IDE and follow the installer. We'll use it later on to program the Arduino MKR NB 1500.
Connect your Arduino MKR NB 1500 to your computer.
From the Tools menu, under Board, under Arduino SAMD boards (32-bits ARM Cortex M0+), select Arduino MKR NB 1500.
If the board is not available go to Tool menu, under Board select Board Manager and search for the Arduino SAMD boards (32-bits ARM Cortex M0+). Click install to install the board.
Also from the Tools menu, under Port, make sure the correct COM port is selected. If you have multiple options, select the one stating Arduino MKR NB 1500. If non of your ports is labelled that way, disconnect your Arduino MKR NB 1500, reopen the menu, check which COM port disappeared, reconnect the Arduino MKR NB 1500 and choose the previously identified COM port.
We will now test whether the Arduino MKR NB 1500 device is working by letting a LED blink.
In the Arduino IDE go to File, under Examples, under 01. Basics, select Blink.
From the Sketch menu, click Upload or select the big arrow on de left of the Arduio IDE to send the software to the Arduino MKR NB 1500. If all went well it will say Uploading complete in the bottom of the Arduino IDE and the LED on the Arduino MKR NB 1500 board will blink!
The LTE-M connectivity on your Arduino MKR NB 1500 device is managed by the uBlox SARA-R410M-02B module. With the following steps we check whether this module works correctly.
In the Arduino IDE select from the sketch menu, under Include Library select Manage Libraries or click on the library icon on the left side of the IDE. Search for MKRNB and select the 1.6.0 version.
After the library is downloaded go to File, under Examples, under MKRNB select Tools and select TestModem.
Upload the sketch to the Arduio MKR NB 1500.
Meanwhile, from the Tools menu, open the Serial Monitor. Here we will find the unique IMEI. Store the value in a text file. You'll need it when adding the device to KPN Things.
Open the KPN Things Portal. Go to the All Devices page and click on Add new Device.
Select the Own M2M device device type
Enter a name for your Arduino MKR NB 1500 device
Click Add Device to continue
IMEI: the value you retrieved from the Ublox module in the step Test the LTE-M module on the Arduino MKR NB 1500
ICCID: you must use the ICCID form the simcard you ordered via KPNThings:
Shared secret: Every device should have its own unique shared secret You can generate a unique secret by pressing Generate:
Store these three values somewhere, because you will be needing them to program your device later on.
You are now on the Device Detail Page. On this page you can see the network status. If everything is done the status should be Activated. This means your device is correctly registered to the network.
To receive data in the KPNThings portal you must create a flow. Click on Flows and then on Link to another Flow.
Select My first Flow.
The flow is now created and you must add a decoder to the flow to decode the payloads from the device.
Click on My first flow.
Click on Data Processing
Enable the switch Decoded ThingsML and raw SenML data (v2).
The decoder is now enabled and device data send by the Arduino MKR NB 1500 will be decoded and visible in the Device twin.
The decoded data can be send to a destination. For testing you can use the KPN Test Endpoint destination.
Click on Destination on the left side on the screen, next click on Add new Destination in the upper right side of the screen.
Select the Test Endpoint destination. Give it a name and click on Create Test Endpoint. The endpoint is created and there is a button and link to view the destination. Later the endpoint can always be accessed via the destination menu option on the left side of the main screen.
· From the Sketch menu in your Arduino IDE click on Include Library, Manage Libraries... or click on the library icon on the left side of the IDE.
Now, in the Library Manager, search for ThingsML and click Install.
Search for TemperatureZero and click install. When the installation is finished, click on the Library manager icon to close the left window.
From the File menu, click on Examples.
Now find ThingsML, then select Arduino, MKR_NB_1500, and within that choose mkr_nb_1500_uplink_example.
A sketch will open. Now update the values for the variables IMEI
, and shared secret
in the code with the values you get earlier from the device and the KPNThings.
Upload the sketch to your Arduino MKR NB 1500 and open the Serial Monitor. You will see the AT commands and some other information. Check incoming data in the Portal.
Now your Arduino MKR NB 1500 is sending data, you could visit the Device twin tab on your Device Detail Page in the Portal. You should see the measured temperature.
If the Test endpoint was setup the data from de device is also visible there.