Skip to content

Commit e2436b4

Browse files
authored
Merge pull request #2651 from arduino/canchebagur/nano-r4-manual-update-qwicc
[PXCT-1475] - Nano R4 Update User Manual (Qwiic Connector Information)
2 parents e4d7e56 + 347ef44 commit e2436b4

File tree

4 files changed

+152
-1
lines changed

4 files changed

+152
-1
lines changed
599 KB
Loading
87.2 KB
Loading
1010 KB
Loading

content/hardware/03.nano/boards/nano-r4/tutorials/01.user-manual/content.md

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This user manual provides a comprehensive overview of the Nano R4 board, highlig
3131

3232
### Software Requirements
3333

34-
- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor)
34+
- [Arduino IDE](https://www.arduino.cc/en/software) or [Arduino Cloud Editor](https://create.arduino.cc/editor)
3535
- [Arduino UNO R4 Boards core](https://github.com/arduino/ArduinoCore-renesas)
3636

3737
***The Nano R4 is compatible with the complete Arduino ecosystem and can be programmed directly as a standalone device.***
@@ -2290,6 +2290,157 @@ When working with HID on the Nano R4, there are several key points to keep in mi
22902290
- The Nano R4 can function as both a keyboard and mouse simultaneously, allowing for complex automation sequences that combine typing, shortcuts and mouse control.
22912291
- Remember that different operating systems may have slightly different keyboard layouts and shortcuts, so test your HID projects on your target platform to ensure compatibility.
22922292

2293+
## Qwiic Connector
2294+
2295+
The Nano R4 board features an onboard Qwiic connector that provides a simple, tool-free solution for connecting I²C devices. The Qwiic ecosystem, developed by SparkFun Electronics, has become an industry standard for rapid prototyping with I²C devices, allowing you to connect sensors, displays, and other peripherals without soldering or complex wiring. This makes it perfect for quickly building sensor networks, adding displays, or expanding your project's capabilities with minimal effort.
2296+
2297+
![Qwiic connector of the Nano R4 board](assets/qwiic-connector.png)
2298+
2299+
The Qwiic connector enhances the Nano R4's versatility by providing a dedicated interface for the extensive ecosystem of +3.3 VDC I²C modules. While the Nano R4's native +5 VDC operation ensures compatibility with classic Arduino shields and components, the Qwiic interface adds seamless integration with modern sensors and modules. The board includes built-in level translation between the +5 VDC microcontroller and the +3.3 VDC Qwiic bus, giving you the best of both worlds: full compatibility with traditional Arduino hardware on the main pins, plus instant access to the latest Qwiic-compatible devices.
2300+
2301+
### Qwiic Specifications
2302+
2303+
The Nano R4's Qwiic connector offers the following specifications:
2304+
2305+
| **Parameter** | **Value** | **Notes** |
2306+
|:-----------------:|:--------------------------:|:----------------------------------------------:|
2307+
| Connector Type | JST SH 4-pin 1mm | Industry standard Qwiic |
2308+
| Operating Voltage | +3.3 VDC | Powered by onboard regulator |
2309+
| I²C Interface | `Wire1` | Secondary I²C bus (not `Wire`) |
2310+
| Level Shifting | Built-in | Automatic +5 VDC to +3.3 VDC level translation |
2311+
| Pin Order | `GND`, `VCC`, `SDA`, `SCL` | Standard Qwiic pinout |
2312+
2313+
The Qwiic connector is a small 4-pin connector with a 1.00 mm pitch. The mechanical details of the connector can be found in the connector's [datasheet](https://www.jst-mfg.com/product/pdf/eng/eSH.pdf).
2314+
2315+
The pin layout of the Qwiic connector is the following:
2316+
2317+
- `GND`: Ground
2318+
- `VCC`: +3.3 VDC power supply
2319+
- `SDA`: I²C data line
2320+
- `SCL`: I²C clock line
2321+
2322+
The `VCC` pin provides a stable +3.3 VDC output from the onboard regulator when the board is powered. The manufacturer part number of the Qwiic connector is [SM04B-SRSS-TB](https://www.jst-mfg.com/product/pdf/eng/eSH.pdf), and its matching cable assemblies use the [SHR-04V-S-B](https://www.jst-mfg.com/product/pdf/eng/eSH.pdf) receptacle.
2323+
2324+
### Understanding the Dual I²C Architecture
2325+
2326+
The Nano R4 implements a dual I²C bus architecture that separates +5 VDC and +3.3 VDC devices:
2327+
2328+
| **I²C Bus** | **Arduino Object** | **Physical Connection** | **Voltage** | **Level Shifter** | **Use Case** |
2329+
|:-----------:|:------------------:|:-----------------------:|:-----------:|:-----------------:|:-----------------------------:|
2330+
| Primary | `Wire` | Pins `A4/A5` | +5 VDC | None | +5V sensors, Arduino shields |
2331+
| Secondary | `Wire1` | Qwiic Connector | +3.3 VDC | Built-in | Modern sensors, Qwiic devices |
2332+
2333+
***__Important note__: The Qwiic connector uses `Wire1` object, not the standard `Wire` object. This is different from boards with a single I²C bus. Always use `Wire1.begin()` and related `Wire1` functions when communicating with Qwiic devices.***
2334+
2335+
### Connecting Qwiic Devices
2336+
2337+
Connecting Qwiic devices to your Nano R4 board is straightforward. Simply get a standard Qwiic cable (available in various lengths) and plug one end into the Nano R4's Qwiic connector and the other into your Qwiic device. Most Qwiic devices have two connectors, allowing you to daisy-chain multiple devices without any soldering or breadboarding. The polarized connectors prevent incorrect connections, making the setup process foolproof.
2338+
2339+
![Nano R4 and Modulino Movement connected via Qwiic](assets/qwiic-connection.png)
2340+
2341+
The Qwiic system's key advantages include:
2342+
2343+
- **Plug-and-play connectivity**: No breadboards, jumper wires, or soldering required
2344+
- **Polarized connectors**: Prevents accidental reverse connections
2345+
- **Daisy-chain capability**: Connect multiple devices in series
2346+
- **Built-in pull-up resistors**: No external resistors needed
2347+
- **Standard pinout**: Compatible across all Qwiic ecosystem devices
2348+
2349+
### Working with Qwiic Devices
2350+
2351+
The following example demonstrates how to use the [Arduino Modulino Movement](https://store.arduino.cc/collections/modulino/products/modulino-movement) sensor via the Qwiic connector:
2352+
2353+
```arduino
2354+
/**
2355+
Modulino Movement Example for the Arduino Nano R4 Board
2356+
Name: nano_r4_modulino_movement.ino
2357+
Purpose: This sketch demonstrates reading motion data from the
2358+
Modulino Movement sensor via the Qwiic connector.
2359+
2360+
@author Arduino Product Experience Team
2361+
@version 1.0 01/06/25
2362+
*/
2363+
2364+
#include <Modulino.h>
2365+
#include <Wire.h>
2366+
2367+
// Create Modulino Movement object
2368+
ModulinoMovement movement;
2369+
2370+
// Variables for sensor data
2371+
float x, y, z;
2372+
float roll, pitch, yaw;
2373+
2374+
void setup() {
2375+
// Initialize serial communication and wait up to 2.5 seconds for a connection
2376+
Serial.begin(115200);
2377+
for (auto startNow = millis() + 2500; !Serial && millis() < startNow; delay(500));
2378+
2379+
Serial.println("- Arduino Nano R4 - Modulino Movement Example started...");
2380+
2381+
// Initialize Wire1 for Qwiic connector
2382+
Wire1.begin();
2383+
2384+
// Initialize Modulino system
2385+
Modulino.begin();
2386+
2387+
// Initialize Movement sensor
2388+
movement.begin();
2389+
2390+
Serial.println("- Modulino Movement connected successfully!");
2391+
Serial.println("- Reading motion data...\n");
2392+
}
2393+
2394+
void loop() {
2395+
// Read new movement data from the sensor
2396+
movement.update();
2397+
2398+
// Get acceleration values
2399+
x = movement.getX();
2400+
y = movement.getY();
2401+
z = movement.getZ();
2402+
2403+
// Get gyroscope values
2404+
roll = movement.getRoll();
2405+
pitch = movement.getPitch();
2406+
yaw = movement.getYaw();
2407+
2408+
// Display acceleration
2409+
Serial.print("- Accel (g): X=");
2410+
Serial.print(x, 2);
2411+
Serial.print(" Y=");
2412+
Serial.print(y, 2);
2413+
Serial.print(" Z=");
2414+
Serial.print(z, 2);
2415+
2416+
// Display gyroscope
2417+
Serial.print(" | Gyro (dps): Roll=");
2418+
Serial.print(roll, 1);
2419+
Serial.print(" Pitch=");
2420+
Serial.print(pitch, 1);
2421+
Serial.print(" Yaw=");
2422+
Serial.print(yaw, 1);
2423+
2424+
Serial.println();
2425+
2426+
// Update at 10Hz
2427+
delay(100);
2428+
}
2429+
```
2430+
2431+
***To test this example, you need an [Arduino Modulino Movement](https://store.arduino.cc/collections/modulino/products/modulino-movement) connected to the Nano R4's Qwiic connector via a Qwiic cable. Install the Modulino library from the Arduino IDE Library Manager (Tools > Manage Libraries > Search "Modulino").***
2432+
2433+
You can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the real-time acceleration and gyroscope data. Try moving or rotating the sensor to see the values change.
2434+
2435+
![Arduino IDE Serial Monitor output for the Modulino Movement sketch](assets/qwicc-modulino-serial-monitor.png)
2436+
2437+
This example demonstrates the key aspects of using Qwiic devices with the Nano R4:
2438+
2439+
- Using `Wire1.begin()` instead of `Wire.begin()` for the Qwiic connector
2440+
- Direct plug-and-play connection without additional wiring
2441+
- Automatic +3.3 VDC power and level translation
2442+
- Access to Arduino's ecosystem of Modulino sensors
2443+
22932444
## Bootloader
22942445

22952446
The Nano R4 board features a built-in bootloader that enables sketch uploading directly from the Arduino IDE without requiring external programming hardware. The bootloader is a small program stored in a protected area of the RA4M1 microcontroller's flash memory that runs each time the board powers on or resets. It manages the critical communication between your computer and the board during sketch uploads, making the development process simple and accessible.

0 commit comments

Comments
 (0)