You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/03.nano/boards/nano-r4/tutorials/01.user-manual/content.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ The complete STEP files are available and downloadable from the link below:
118
118
119
119
When opening the Nano R4 box, you will find the board and its corresponding documentation. **The Nano R4 does not include additional cables**, so you will need a USB-C cable ([available separately here](https://store.arduino.cc/products/usb-cable2in1-type-c)) to connect the board to your computer.
120
120
121
+

121
122
122
123
The Nano R4 is a standalone device that can be programmed directly without requiring additional boards. However, for more complex projects, you can easily combine it with Arduino shields compatible with the Nano family or connect it to other Arduino devices through its onboard Qwicc connector.
123
124
@@ -873,16 +874,14 @@ The Nano R4's OPAMP offers the following electrical characteristics:
873
874
874
875
You can configure and use the OPAMP using the dedicated `<OPAMP.h>` library, which is included in the Arduino UNO R4 Boards core. To startup the OPAMP, simply include the library and call `OPAMP.begin(speed)` where speed can be `OPAMP_SPEED_LOWSPEED` for lower power consumption or `OPAMP_SPEED_HIGHSPEED` for better performance.
875
876
876
-
***The following example demonstrates basic OPAMP functionality configured as a voltage follower (unity gain buffer).***
877
-
878
-
The following example demonstrates how to use the OPAMP as a voltage follower to buffer an analog signal:
877
+
The following example demonstrates how to initialize and use the OPAMP. The same code works for both voltage follower and amplifier configurations, **the difference is only in the external connections**:
879
878
880
879
```arduino
881
880
/**
882
-
OPAMP Voltage Follower Example for the Arduino Nano R4 Board
883
-
Name: nano_r4_opamp_follower.ino
884
-
Purpose: This sketch demonstrates how to use the built-in OPAMP
885
-
as a voltage follower to mirror input voltage to output.
881
+
OPAMP Example for the Arduino Nano R4 Board
882
+
Name: nano_r4_opamp_example.ino
883
+
Purpose: This sketch demonstrates how to initialize the built-in OPAMP.
884
+
Works for both voltage follower and amplifier configurations.
886
885
887
886
@author Arduino Product Experience Team
888
887
@version 1.0 01/06/25
@@ -894,29 +893,27 @@ void setup() {
894
893
// Initialize serial communication at 115200 baud
895
894
Serial.begin(115200);
896
895
897
-
Serial.println("- Arduino Nano R4 - OPAMP Voltage Follower Example started...");
896
+
Serial.println("- Arduino Nano R4 - OPAMP Example started...");
898
897
Serial.println("- Initializing OPAMP in high-speed mode...");
Serial.println("- Connect A2 to A3 with a jumper wire for voltage follower configuration");
905
-
Serial.println("- Connect input signal to A1, output will be mirrored on A3");
906
-
Serial.println("- Test: Connect A1 to GND (0V) or 3.3V to verify voltage following");
903
+
Serial.println("- OPAMP is now ready for use with external connections");
904
+
Serial.println("- The behavior depends on how you connect the external components");
907
905
}
908
906
909
907
void loop() {
910
-
// In voltage follower mode, the OPAMP automatically mirrors
911
-
// the voltage from A1 (Plus) to A3 (Output)
912
-
// No additional code needed in the loop for basic voltage following
908
+
// The OPAMP operates automatically based on external connections
909
+
// No additional code needed in the loop
913
910
914
-
Serial.println("- OPAMP running in voltage follower mode...");
911
+
Serial.println("- OPAMP running...");
915
912
delay(2000);
916
913
}
917
914
```
918
915
919
-
To test this example, configure the OPAMP voltage follower on the Nano R4 board as follows:
916
+
To configure the OPAMP as a **voltage follower**, connect the Nano R4 board as follows:
920
917
921
918
- Connect pin `A2` (-) to pin `A3` (Output) with a jumper wire
922
919
- Connect the input signal to pin `A1` (+)
@@ -925,7 +922,7 @@ For testing, connect pin `A1` to `GND` to see 0 VDC output, or connect pin `A1`
925
922
926
923

927
924
928
-
In voltage follower configuration, any voltage applied at `A1` should be mirrored onto `A3`. This provides a high-impedance buffer that doesn't load down the input signal source.
925
+
***In voltage follower configuration, any voltage applied at `A1` should be mirrored onto `A3`. This provides a high-impedance buffer that doesn't load down the input signal source.***
929
926
930
927
The Nano R4 OPAMP can also be configured as a **non-inverting amplifier** to amplify small signals. For example, a simple 2x amplifier can be built using two 10k Ω resistors as follows:
931
928
@@ -938,6 +935,8 @@ For testing, apply an input signal to `A1` (+).
938
935
939
936
The output at `A3` will be double the amplitude of the input signal.
940
937
938
+
***In a non-inverting amplifier configuration, remember that the input signal and the Nano R4 should share the same GND, and the amplified output signal should not exceed approximately +4.7 VDC to avoid clipping.***
939
+
941
940
## Digital-to-Analog Converter (DAC)
942
941
943
942
The Nano R4 features a built-in 12-bit Digital-to-Analog Converter (DAC) connected to pin `A0`. Unlike PWM pins that simulate analog output through rapid switching, the DAC provides true analog voltage output. This makes it ideal for applications requiring precise analog signals, such as audio generation, sensor calibration, control systems and waveform generation.
@@ -1085,4 +1084,7 @@ void loop() {
1085
1084
}
1086
1085
```
1087
1086
1088
-
You can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the sine wave generation progress with angle, DAC values, and corresponding voltages. For best results, connect an oscilloscope to pin `A0` to visualize the smooth sine wave output.
1087
+
You can open the Arduino IDE's Serial Monitor (Tools > Serial Monitor) to see the sine wave generation progress with angle, DAC values, and corresponding voltages. For best results, connect an oscilloscope to pin `A0` to visualize the smooth sine wave output.
0 commit comments