0

The RP2040 Connectivity board – the all-in-one IoT solution

Introduction

The RP2040 Connectivity Board is a comprehensive IoT solution designed for modern applications. This board combines the capabilities of LTE, WiFi, and BLE into a single platform, making it ideal for a wide array of IoT projects. Based on the Raspberry Pico chip and compatible with the Arduino/PlatformIO, this board is perfect for both professional and hobbyist users who need multifaceted connectivity in their projects.

Key Features of the RP2040 Connectivity board are:

  • High-Performance Microcontroller: Powered by the RP2040 from Raspberry Pi, featuring a dual-core Cortex M0 processor at 133MHz, equipped with 8 MByte of FLASH memory and 264 Kbyte of integrated RAM.

  • Diverse Connectivity Options:

    • LTE (Cat M1/NB-IoT/eGPRS): Includes the SARA-R412M module for international GSM and LTE-M/NB-IoT coverage, offering robust IoT security and efficient data transfer.
    • WiFi/BLE: Integrated with the ESP32-C3FN4 chip, providing a full range of WiFi and BLE functionalities, including various operating modes and advanced features.
    • USB Type C Interface: Equipped with a modern USB Type C port, ensuring compatibility with contemporary devices and enhanced durability.
    • BConnect interface connector.
  • Built in LiPO battery charger and standardized battery connector

Enhanced Power Efficiency:

  • Low power supply design, enabling lower battery voltage operation and extended battery life.
  • On board battery charger that charges the attached battery with up to 500mA, enabling rapid charging times.

User Interface and Programming:

  • Two accessible buttons for easy reset and UF2 mode activation.
  • Flexible antenna design with options for on-board chip antenna or U.FL connector for external antenna use.

Additional Specifications:

  • Backward Compatibility: Ensures seamless software integration with previous board versions.
  • Nano SIM Card Slot: Supports various prepaid SIM card options, including 1NCE IoT Flat Rate for LTE connectivity.
  • Versatile Application Potential: Ideal for remote monitoring systems, smart connected devices, and other IoT applications.
  • BConnect interface that allows the user to hook up a wide range of peripherals such as NFC readers, accelerometers etc.

The microcontroller

Again we have used the popular RP2040 from the Raspberry Pi Pico. An extremely well suited embedded processor for doing cool projects and managing high end communication devices such as the embedded modem. With its dual core Cortex M0 at 133MHz, 8 MByte of FLASH and 264 Kbyte of integrated RAM it will take a very long time before you run out of resources.

LTE (Cat M1/NB-IoT)

The module we selected to handle the cellular communication is the SARA-R412M series module. This module can be software multi-band configured, enabling international multi-regional coverage in both GSM as well as LTE-M/NB-IoT radio access technologies.

The SARA-R412M module is ideal for mission critical IoT solutions, as it includes a unique and immutable root of trust. It supports IoT security as a service and provides the foundation for a trusted set of advanced security functionalities. The scalable, pre-shared key management system offers data encryption and decryption, both on-device as well as from device to cloud. Utilizing the latest (D)TLS stack and cipher suites with hardware based crypto acceleration provides robust, efficient and protected communication.

Communication with the modem device is done over one of the hardware serial ports of the RP2040 and the board is configured for hardware flow control which allows you to use high data transfer speeds to and from the modem.

The supplied cellular antenna is connected to the board through a U.FL connector at the rear of the board. The antenna can then be attached to a plastic enclosure by peeling of the protective film and pressing it in place.

SIM Card

The board needs a nano SIM card in order to be able to connect to an LTE network and transfer data. Here you can either get it yourself or use our prepaid cards from 1NCE. The IoT pricing of the 1NCE IoT Flat Rate contains 120 months of connectivity services for 150 SEK. It is a one-time-payment only with no hidden costs. 1NCE offers one IoT data plan where all necessary features are included:

The SIM card that we supply is for evaluation only, If you want to take advantage of 1NCE full flexibility with their top-up option and their API’s you should get in touch with them directly here.

WiFi/BLE

The RP2040 Connectivity board is equipped with a powerful combined single chip solution that provides the WiFi and BLE connectivity of this board. The chip we are using is the ESP32-C3FN4 from Espressif and it is a complete WiFi subsystem that complies with IEEE 802.11b/g/n protocol and supports Station mode, SoftAP mode, SoftAP + Station mode, and promiscuous mode. It also implements A Bluetooth LE subsystem that supports features of Bluetooth 5 and Bluetooth mesh.

This solution is based on an RISC-V micro controller core and comes with 4MByte of internal flash and 408Kbyte of internal SRAM as well as the advanced 2.4GHz radio.

The ESP32-C3 device comes pre loaded with the ESP-AT interpreter already programmed into flash. This interpreter provides the system with everything from low level TCP/UDP functionality up to high level functions such as a on board integrated web server, MQTT server and client functions and much more.

From the get go the on board ESP32 delivers the following functionalities:

  • Basic AT Commands
  • Wi-Fi AT Commands
  • TCP-IP AT Commands
  • Bluetooth® Low Energy AT Commands
  • MQTT AT Commands
  • HTTP AT Commands
  • Web server AT Commands

Setting an MQTT client up for instance is a matter of three lines of code, couldn’t be easier to use.

Antenna solutions

The board is equipped with a on board chip antenna for the WiFi/BLE radio and for the GSM/LTE part we have included a U.FL. connector that allows the user to hook up the antenna of their choice. We’ve also included a antenna detection circuit on the board which together with the appropriate antenna can detect whether an antenna is attached or not (requires special circuitry on the antenna).

External IO

We have equipped the board with a 26 pin expansion header that allow the board to connect a multitude of sensors, buttons, displays… well basically anything you need. Here’s a list of the connector pins and their functions.

FunctionPinPinFunction
GND12D2
D134D3
D056D18
SDI78D11
SS910D10
SCK1112D9
SDO1314D8
GND1516GND
A317183.3V
A21920VUSB (+5V)
A12122VBAT
A02324RESET (Active low)
AREF2526EN (Pull low to deactivate module)

Buttons

There are two buttons on the board. The button closest to the USB connector is the reset button. Use it whenever you need to reset the unit. It has exactly the same functionality as the RESET pin. Then there is the BOOT button just next to the reset button. This button must be used in conjunction with the reset button to reset the RP2040 into UF2 mode. Press the BOOT button, then the RESET button for a short moment. Then release the RESET button (while still pressing the BOOT button) and shortly after that release the BOOT button. This will place the board in UF2 mode and show up in the computer as a mass storage device.

USB Type C

In the recent years we have noticed that we are seeing more and more USB Type C cable laying around the lab due to the fact that all new phones and accessories use them. As of yet we haven’t seen any shortage of micro USB cables but we are not getting any new ones any more and old ones do break occasionally. So we decided to go for a USB Type C connector for this board. A bonus of this is that they are quite bit more durable and you don’t have to fiddle with the cable before plugging it in.

Product Summary

The “RP2040 Connectivity Board” is a testament to the convergence of technology and innovation in the IoT space. Offering unmatched processing power and a suite of connectivity options, this board is your go-to solution for IoT projects demanding versatility, reliability, and ease of use. Elevate your IoT projects to new heights with the RP2040 Connectivity Board – your all-in-one solution for modern IoT challenges.

Weight 0.015 kg
Dimensions 5 × 4.2 × 0.72 cm

Using the Arduino environment

We’ve teamed up with Earle F. Philhower over at his Github page to provide Arduino support for our RP2040 based boards. You can follow the instructions on Earle’s github page or you can check out our instructions here on how to install the package.

Documentation for the RP2040 Connectivity LTE/WIFI/BLE board.

Below is an example showing how you can user the TinyGSM library to retrieve a web page using the on board modem.

/**************************************************************
*
* This sketch connects to a website and downloads a page.
* It can be used to perform HTTP/RESTful API calls.
*
* For this example, you need to install ArduinoHttpClient library:
* https://github.com/arduino-libraries/ArduinoHttpClient
* or from http://librarymanager/all#ArduinoHttpClient
*
* TinyGSM Getting Started guide:
* https://tiny.cc/tinygsm-readme
*
**************************************************************/
#include <Connectivity.h>

#define TINY_GSM_MODEM_SARAR4

// Set serial for debug console (to the Serial Monitor, default speed 115200)
#define SerialMon Serial

// Set serial for AT commands (to the module)
#define SerialAT SARA_SERIAL_PORT

// Increase RX buffer to capture the entire response
// Chips without internal buffering (A6/A7, ESP8266, M590)
// need enough space in the buffer for the entire response
// else data will be lost (and the http library will fail).
#if !defined(TINY_GSM_RX_BUFFER)
#define TINY_GSM_RX_BUFFER 650
#endif

// See all AT commands, if wanted
//#define DUMP_AT_COMMANDS

// Define the serial console for debug prints, if needed
#define TINY_GSM_DEBUG SerialMon
#define LOGGING // <- Logging is for the HTTP library

// set GSM PIN, if any
#define GSM_PIN ""

// Your GPRS credentials, if any
const char apn[] = "iot.1nce.net";
const char gprsUser[] = "";
const char gprsPass[] = "";

// Your WiFi connection credentials, if applicable
const char wifiSSID[] = "TestNet";
const char wifiPass[] = "MussePigg1";

// Server details
const char server[] = "vsh.pp.ua";
const char resource[] = "/TinyGSM/logo.txt";
const int port = 80;

#include <TinyGsmClient.h>
#include <ArduinoHttpClient.h>

#ifdef DUMP_AT_COMMANDS
#include <StreamDebugger.h>
StreamDebugger debugger(SerialAT, SerialMon);
TinyGsm modem(debugger);
#else
TinyGsm modem(SerialAT);
#endif

TinyGsmClient client(modem);
HttpClient http(client, server, port);

void setup() {
// Set console baud rate
while (!Serial)
delay(10);

SerialMon.begin(115200);
delay(10);

SerialMon.println("Wait...");

// The iLabsConnectivity class handles all the hardware related settings
// for the modem. We simply need to call the doModemPowerOn method to ensure
// that the modem has started properly and is ready to be accessed.
if (!iLabsConnectivity.doModemPowerOn()) {
Serial.println("Failed to start the modem properly !");
while(1);
} else {
Serial.println("Modem started !");
delay(1000);
}

SerialMon.println("Initializing modem...");
modem.init();

String modemInfo = modem.getModemInfo();
SerialMon.print("Modem Info: ");
SerialMon.println(modemInfo);

// Unlock your SIM card with a PIN if needed
if (GSM_PIN && modem.getSimStatus() != 3) { modem.simUnlock(GSM_PIN); }

// Setup an apn if this has not already been done.
//modem.gprsConnect(apn, gprsUser, gprsPass);
}

void loop() {
SerialMon.print("Waiting for network...");
if (!modem.waitForNetwork()) {
SerialMon.println(" fail");
delay(10000);
return;
}
SerialMon.println(" success");

if (modem.isNetworkConnected()) { SerialMon.println("Network connected"); }

// GPRS connection parameters are usually set after network registration
SerialMon.print(F("Connecting to "));
SerialMon.print(apn);
if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
SerialMon.println(" fail");
delay(10000);
return;
}
SerialMon.println(" success");

if (modem.isGprsConnected()) { SerialMon.println("GPRS connected"); }

SerialMon.print(F("Performing HTTP GET request... "));
int err = http.get(resource);
if (err != 0) {
SerialMon.println(F("failed to connect"));
delay(10000);
return;
}

int status = http.responseStatusCode();
SerialMon.print(F("Response status code: "));
SerialMon.println(status);
if (!status) {
delay(10000);
return;
}

SerialMon.println(F("Response Headers:"));
while (http.headerAvailable()) {
String headerName = http.readHeaderName();
String headerValue = http.readHeaderValue();
SerialMon.println(" " + headerName + " : " + headerValue);
}

int length = http.contentLength();
if (length >= 0) {
SerialMon.print(F("Content length is: "));
SerialMon.println(length);
}
if (http.isResponseChunked()) {
SerialMon.println(F("The response is chunked"));
}

String body = http.responseBody();
SerialMon.println(F("Response:"));
SerialMon.println(body);

SerialMon.print(F("Body length is: "));
SerialMon.println(body.length());

// Shutdown
http.stop();
SerialMon.println(F("Server disconnected"));

modem.gprsDisconnect();
SerialMon.println(F("GPRS disconnected"));

// Do nothing forevermore
while (true) { delay(1000); }
}

You can always get our products from your local reseller if you like. Here is a list of current resellers.

  • The Pi Hut Raspberry Pi Superstore

    Reviews

    There are no reviews yet.

    Only logged in customers who have purchased this product may leave a review.

    You may also like…