Skip to content

Commit 7068372

Browse files
Merge pull request #285 from arduino/AEK-R2-Functional-Test-for-Battery,-DC-Motor-and-Servo-Motor(HC-1386)
AEK-R2:-Functional-Test-for-Battery,-DC-Motor-and-Servo-Motor [HC-1386]
2 parents dd46c44 + d30b4ac commit 7068372

File tree

6 files changed

+81
-0
lines changed

6 files changed

+81
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: "AEK R2: functional test for battery, servo motor, and DC motor"
3+
id:
4+
---
5+
6+
Learn how to determine if specific components in the Arduino Engineering Kit Rev2 (AEK R2) are functioning correctly or if they are faulty.
7+
8+
In this article:
9+
10+
- [Before running the tests](#before-running-the-tests)
11+
- [Check the firmware version on the Nano Motor Carrier](#check-firmware-version-and-battery-voltage)
12+
- [Check the voltage on the Li-ion battery](#check-firmware-version-and-battery-voltage)
13+
- [Test the servo motors](#test-the-servo-motors)
14+
- [Test the DC motors](#test-the-dc-motors)
15+
16+
---
17+
<a id="before-running-the-tests"></a>
18+
19+
## Before running the tests
20+
21+
1. Install the [ArduinoMotorCarrier library](https://www.arduino.cc/reference/en/libraries/arduinomotorcarrier/). (See [Add libraries to Arduino IDE](https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE) for instructions)
22+
2. Connect the Nano 33 IoT board to the Nano Motor Carrier.
23+
24+
![The Nano 33 IoT board plugged to the Arduino Nano Motor Carrier](img/Nano33IoT-plug.png)
25+
26+
3. Connect the Li-ion battery.
27+
4. Turn on the power switch on the Nano Motor Carrier.
28+
5. Connect the Nano 33 IoT to your computer.
29+
30+
---
31+
32+
<a id="check-firmware-version-and-battery-voltage"></a>
33+
34+
## Check the firmware version and battery voltage
35+
36+
You can check the Nano Motor Carrier firmware version and/or the voltage of the Li-ion battery by following the steps below:
37+
38+
1. Follow the instructions in [Before running the tests](#before-running-the-tests).
39+
2. In Arduino IDE, go to **File > Examples > ArduinoMotorCarrier > NanoMotorCarrier** and select the **Battery_Charging** sketch.
40+
3. Enable `while (!Serial);` in line 10.
41+
4. Open the Serial Monitor and set the baud rate to 115200.
42+
5. Upload the sketch.
43+
6. You should now be able to see information about the Nano Motor Carrier's firmware version and the battery voltage printed on the Serial Monitor.
44+
45+
![The Arduino Serial Monitor with the Nano Motor Carrier's firmware version and the battery voltage printed](img/AEK-R2-Firmware-Battery-test.png)
46+
47+
---
48+
49+
<a id="test-the-servo-motors"></a>
50+
51+
## Test the servo motors
52+
53+
1. Follow the instructions in [Before running the tests](#before-running-the-tests).
54+
2. In Arduino IDE, go to **File > Examples > ArduinoMotorCarrier > NanoMotorCarrier** and select the **ServoTest** sketch.
55+
3. Connect the servo motor to one of the servo ports on the Nano Motor Carrier.
56+
57+
![Nano Motor Carrier with Nano 33 IoT, servo motor, and Li-ion battery plugged](img/AEK-R2-Servo-plugged-test.png)
58+
59+
4. Comment out or delete `#include <Arduino_PMIC.h>` in line 1 since this library is not necessary for this test.
60+
5. Comment out or delete `if (!PMIC.enableBoostMode()) {` in line 35, `Serial.println("Error enabling Boost Mode");` in line 36, and `}` in line 37, since these are not necessary for this test.
61+
6. Upload the sketch.
62+
63+
Once done, the servo motor should loop continuously between clockwise and counterclockwise motion.
64+
65+
---
66+
67+
<a id="test-the-dc-motors"></a>
68+
69+
## Test the DC motors
70+
71+
1. Follow the instructions in [Before running the tests](#before-running-the-tests).
72+
2. In Arduino IDE, go to **File > Examples > ArduinoMotorCarrier > NanoMotorCarrier** and select the **DCMotorTest** sketch.
73+
3. Connect the DC motor to one of the motor ports on the Nano Motor Carrier. (Tip: To test the motors without the Rover moving, place it on an elevated object so its wheels can spin freely)
74+
75+
![Rover placed on an elevated object with its wheels spinning freely](img/AEK-R2-Rover-Spinning-test.png)
76+
77+
4. Upload the sketch.
78+
79+
Once done, the DC motor should loop between the duty cycles from -100 to 100 and back again, and the values printed in the Serial Monitor.
80+
81+
![The Arduino Serial Monitor with the Motor Duty Cycle printed](img/AEK-R2-DC-Motor-test.png)
21.8 KB
Loading
25.7 KB
Loading
201 KB
Loading
186 KB
Loading
85.3 KB
Loading

0 commit comments

Comments
 (0)