|SORACOM Air Global IoT SIM||× 1|
|Arduino MKR GSM 1400||× 1|
|SORACOM Air IoT Connectivity Platform||× 1|
|SORACOM Harvest||× 1|
As IoT progresses, we see more and more developers taking advantage of ready-made boards that include everything from processing units to wireless connectivity modules.One such board is Arduino’s recently released MKR GSM 1400, based on the popular Arduino MKR family. The board includes a Cortex-M0+ 32-bit microcontroller, USB Serial port for development and debugging, and most importantly a pre-integrated cellular modem compatible with global 2G and 3G GSM networks. It also features low-power functionality, allowing us to build solutions that can run solely on battery.
Let's look at how to use the MKR GSM 1400 to collect and visualize data from a battery operated IoT sensor over a cellular connection.
To build this project, you will need the following items:
We’ll start by activating the SIM card:Once you have the SORACOM SIM in hand, go to the Soracom User Console: https://console.soracom.ioGo to SIM Management and select REGISTER
Now we can prepare the data storage and analytics environment. First, we’ll create a Group and attach the SIM to it. Groups allow you to activate and configure specific services for specific SIMs. In this case, we’ll use SORACOM Harvest, which allows for quick data storage and visualization from connected devices.
Now that the Soracom platform side has been configured, let’s assemble the sensor device.
This project wiring is as follows (you can see the pin names/numbers on the side of your MKR board):RED: MKR GSM 1400 VCC to DHT11 VCC BLACK: MKR GSM 1400 GROUND to DHT11 GROUND BLUE: MKR GSM 1400 pin 0 to DHT11 DATA
Once your Arduino and Sensor have been assembled, connect your the Micro-USB cable to it and to your computer. The end product should look like the one below:
Now that our SIM card & Soracom Platform have been configured and Arduino MKR GSM assembled, we’ll write the device software and upload it to the Arduino Board.To get started, download the Arduino IDE at https://www.arduino.cc/en/Main/Software?Once the Arduino IDE has been installed on your computer, you’ll need to download additional board support. Start the Arduino IDE and install it from the top menu Tools > Board > Boards Manager:
The console will look as shown below and will show you if the device is working as expected:
As you can see in the above console, our DHT11 sensor is working and we were able to send data to Soracom Harvest.
You will be presented with a graph showing your sensor data along with the full list of collected data points.
That’s it! You now have a cellular-connected MKR GSM 1400 Sensor that will work anywhere you have coverage. If you’d like to run the device independently from a computer, you can plug it directly to a USB power source such as a phone charger or USB Battery.
As well as automatically visualising you data on single or multiple devices, Harvest will also let you query the data via our APIs and CLI so you can integrate it into your applications and processes.