When Arduino meets the Raspberry Pi

Article By : Maurizio Di Paolo Emilio

The already-large family of Arduino boards is enriched with a new entry, the Arduino Nano RP2040 Connect.

The already-large family of Arduino boards is enriched with a new entry, the Arduino Nano RP2040 Connect, integrating the RP2040 microcontroller developed by Raspberry Pi Foundation with the u-blox NINA-W102 Wi-Fi and Bluetooth radio module, as well as a rich set of advanced sensors even able to support artificial intelligence algorithms. In fact, the board includes a digital microphone that supports voice-activation features, a six-axis inertial motion sensor (IMU), a small RGB LED, and a wide availability of flash memory (16 MB) able to meet even the most demanding applications.

The new board inherits from the Raspberry Pi RP2040 the programming support for MicroPython and the C/C++ language, both based on the SDKs developed for the Raspberry Pi Pico board. Like all the other boards in the Arduino family, the latest addition supports native programming environments, such as the well-known Arduino IDE (now in version 2.0), Arduino CLI, IoT Cloud, and Web Editor. The latter allows programming and controlling the operation of the Nano RP2040 Connect directly from a web browser. It is thus possible to upload the sketches over the air with instant remote control from the free Arduino IoT Remote smartphone app.

The RP2040 microcontroller was chosen because it represents the “trait d’union” between the Raspberry and Arduino worlds, the ideal solution for all those applications that do not require the complexity and performance of a “full” Raspberry Pi, benefiting at the same time from advanced features at a very competitive cost.

Another noteworthy feature is the board’s belonging to the Arduino Nano Mbed OS family, a group of boards with a common small form factor (the “Nano” footprint, with a size of just 18 × 43 mm) and support for IoT applications based on ARM’s Mbed OS operating system. Currently, this family includes three boards: the Nano 33 BLE, the Nano 33 BLE Sense, and the Nano RP2040 Connect (the Nano 33 IoT is not part of it, as it does not support the Mbed OS system). Figure 1 shows a three-quarter view of the Arduino Nano RP2040 Connect board, here in the version without pin headers installed.

arduino nano

Figure 1: Arduino Nano RP2040 Connect

Block diagram

The board block diagram is shown in Figure 2. The heart is represented by the RP2040 microcontroller, able to communicate with the host development and debug environment via the classic USB connection and with the 16-MB external flash memory via a quad SPI serial high-speed interface. The 3.3-V power supply is provided by an MP2322 regulator, with an input source that can be selected from the USB port (VUSB) or from an external power supply (VIN). The NINA W102 Wi-Fi/Bluetooth module is connected to the micro via I2C, SPI, and UART interfaces, and the RGB LED is connected to it. As for the other sensors, the MEMS microphone is connected to the micro via the pulse-density modulation (PDM) digital audio interface, while the six-axis motion sensor and the authentication module are connected via the I2C bus. The external MEMS oscillator running at 12 MHz provides the clock pulse.

arduino nano

Figure 2: Board block diagram

The components

The board’s main components are highlighted in Figure 3. First of all, we have the RP2040 chip, a 32-bit dual-core microcontroller based on ARM Cortex M0+ and operating at 133 MHz, accompanied by an integrated 264-KB SRAM memory. The excellent performance and high efficiency of this MCU allow it to support machine-learning algorithms developed with TinyML, TensorFlow Lite, or Edge Impulse. In addition to full support for MicroPython (available starting July 2021), the board comes with a free OpenMV license for machine-vision projects. The features offered by the RP2040 microcontroller include:

  • Direct memory access controller
  • USB 1.1 controller and PHY, with host and device support
  • Eight programmable-IO state machines
  • Programmable IO for extended peripheral support
  • Four-channel ADC with internal temperature sensor, 0.5-MS/s, 12-bit conversion
  • SWD debugging
  • Two on-chip PLLs to generate USB and core clock
  • Multiple low-power–mode support
  • USB 1.1 host/device
  • Internal voltage regulator to supply the core voltage
  • Advanced high-performance bus/advanced peripheral bus

arduino nano

Figure 3: The main components of the board

After the MCU, the second strong point of this card is definitely the connectivity, made possible through the u-blox NINA W102 radio module, an inexpensive and easily adaptable device. The module also adds four more analog GPIOs (the RP2040 has only four analog pins), bringing the total number to eight, in line with the other Arduino Nano boards. The radio module, equipped with an integrated antenna, is based on a dual-core Xtensa LX6 CPU, which can in turn be programmed independently from the RP2040 using the SWD interface and the special pads located on the back of the board. In practice, the NINA W102 module uses the same CPU as the ESP32 module, one of the most popular hardware platforms for makers, along with Arduino and the Raspberry Pi. The RGB LED is connected to the radio module and can be driven using the same library (WiFiNINA) developed for the module itself. The connectivity used in IoT applications requires a high degree of security in order to preserve the consistency of the transmitted data in all operating conditions and prevent potential attacks from outside. For this purpose, the designers included a powerful cryptographic co-processor, the Microchip ATECC608A already used on the boards of the Arduino MKR family. The cryptographic co-processor, characterized by a particularly low power absorption, provides support for secure boot, hardware support for asymmetric sign, verify, key agreement, hardware support for symmetric algorithms (SHA-256 and HMAC, AES-128), and networking key management support.

The sensor equipment includes the ST LSM6DSOX six-axis IMU, which combines a 3D accelerometer and a 3D gyroscope with a dedicated machine-learning core. The component, intended mainly for the mobile market, where “always-on” operation requires particularly low power consumption, offers the following technical characteristics:

  • 3D gyroscope, ±2-/±4-/±8-/±16-g full scale
  • 3D accelerometer, ±125-/±250-/±500-/±1,000-/±2,000-dps full scale
  • Advanced pedometer, step detector, and step counter
  • Significant motion detection, tilt detection
  • Standard interrupts: free-fall, wakeup, 6D/4D orientation, click and double-click
  • Programmable finite state machine: accelerometer, gyroscope, and external sensors
  • Machine-learning core
  • Embedded temperature sensor

The device can be easily programmed by using the dedicated Arduino LSM6DSOX library.

The other relevant sensor is the omnidirectional digital microphone, which can be used for sound activation, audio control, and even AI voice recognition. The MP34DT05 microphone captures and analyzes sound in real time and can be used to create a voice interface for any project. The ST MP34DT05-A is an ultra-compact, low-power, omnidirectional, digital MEMS microphone built with a capacitive sensing element and an IC interface. The sensing element, capable of detecting acoustic waves, is manufactured using a MEMS process, whilst the IC interface is manufactured using a CMOS process that provides a digital signal externally in PDM format. The MP34DT05-A is a low-distortion digital microphone featuring a 64-dB signal-to-noise ratio and –26-dBFS ±3-dB sensitivity. The device can be programmed using the dedicated Arduino PDM library.

Regarding the programmable I/O pins, the board provides eight analog input pins and 22 digital I/O pins (of which 20 can be configured as PWM generators or as external interrupt). A built-in user LED is also available on Pin 13. Figure 4 shows the full pinout of the Arduino Nano RP2040 Connect board, which is also available with header pins pre-installed. Pin layout is well-organized, with all analog and power pins on the left header and digital pins on the right one. As shown in Figure 2, the RP2040 MCU provides support for UART, SPI, and I2C communication.

arduino nano

Figure 4: Board pinout

Regarding applications, the Arduino Nano RP2040 Connect can be adapted to a wide range of use cases, including:

  • Edge computing: TinyML can be used for anomaly detection, cough detection, gesture analysis, and more.
  • Wearable devices: The reduced footprint enables the deployment of machine-learning algorithms on a wide range of wearable devices, including sports trackers and VR controllers.
  • Voice assistant: The Arduino Nano RP2040 Connect includes an omnidirectional microphone that can be used as personal digital assistant, enabling voice control in different projects.

Expo booth:

New products & solutions, whitepaper downloads, reference designs, videos

Conference sessions:
  • Internet of Things (IoT)
  • Supply Chain
  • Automotive Electronics
  • Wave of Wireless
3 Rounds Lucky Draw:

Register, join the conference, and visit the booths for a chance to win great prizes.

Leave a comment