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
-[Edge Impulse CLI tools](https://docs.edgeimpulse.com/docs/cli-installation) for data forwarding
58
58
59
-
***The Arduino Nano R4 features hardware specifications identical to the UNO R4 Minima, providing enhanced processing capabilities with a 32-bit Renesas RA4M1 microcontroller running at 48 MHz, 256 kB Flash memory, and 32 kB SRAM for efficient machine learning inference.***
59
+
***The Nano R4 board provides enhanced processing capabilities with a 32-bit Renesas RA4M1 microcontroller running at 48 MHz, 256 kB Flash memory and 32 kB SRAM for efficient machine learning inference. For detailed hardware specifications, please refer to the Arduino Nano R4 documentation.***
60
60
61
61
## Hardware Setup Overview
62
62
63
-
The electrical connections for the motor anomaly detection system are outlined in the diagram below:
63
+
The electrical connections for the motor anomaly detection system are outlined in the diagram shown below:
64
64
65
65

66
66
67
-
This diagram shows how the components are connected. The **Arduino Nano R4**serves as the **primary controller**, while the **ADXL335 accelerometer** collects 3-axis vibration data from the motor being monitored.
67
+
This diagram shows how the system components are connected. The Nano R4 board serves as the **primary controller**, while the ADXL335 accelerometer collects **3-axis vibration data** from the motor being monitored.
68
68
69
-
The ADXL335 accelerometer connects to the Arduino Nano R4 using analog input pins. The system operates with a single power supply from the Arduino Nano R4 (+5V), which powers the ADXL335 through its onboard voltage regulator. The Arduino Nano R4 is powered via its onboard USB-C port for development and testing purposes.
69
+
The ADXL335 accelerometer connects to the Nano R4 board using analog input pins. For this application note, the system uses an external +5 VDC power supply that powers both the Nano R4 and the test motor, while the ADXL335 is powered through its onboard voltage regulator from the board's +5 VDC pin.
70
+
71
+
***This power configuration is designed specifically for testing and demonstration purposes in this application note. In real industrial environments, proper power system design should consider factors such as electrical isolation, noise filtering, surge protection, and compliance with industrial safety standards appropriate for the specific application and operating environment.***
70
72
71
73
### Circuit Connections
72
74
73
-
The following connections establish the interface between the Arduino Nano R4 and ADXL335:
75
+
The following connections establish the interface between the Nano R4 board and the ADXL335 accelerometer:
For effective vibration monitoring, proper mounting of the accelerometer is crucial. The accelerometer should be securely attached to the motor housing or equipment being monitored using appropriate mechanical fasteners. The mounting surface should provide good mechanical coupling to ensure accurate transmission of vibrations to the sensor.
88
+
Proper accelerometer mounting is essential for effective vibration monitoring. The sensor must be securely attached to the motor housing or monitored equipment using suitable mechanical fasteners. A good mechanical coupling between the mounting surface and sensor ensures accurate vibration transmission and reliable measurements.
89
+
90
+
***For this application note, we will use a computer cooling fan to simulate motor operation and demonstrate the anomaly detection system. The ADXL335 accelerometer will be mounted on top of the fan using a custom 3D-printed enclosure, providing a stable and repeatable mounting solution for testing and demonstration purposes.***
87
91
88
92
## Understanding Motor Vibration Analysis
89
93
90
-
Motor vibrations contain valuable information about the mechanical condition of the equipment. Normal motor operation produces characteristic vibration patterns that remain relatively consistent during healthy operation. Abnormal conditions manifest as changes in vibration amplitude, frequency content, or temporal patterns.
94
+
Motor vibrations contain valuable information about the mechanical condition of the equipment. Normal motor operation produces characteristic vibration patterns that remain relatively consistent during healthy operation. Abnormal conditions manifest as changes in vibration amplitude, frequency content or temporal patterns.
91
95
92
96
### Common Motor Faults
93
97
94
-
Motor faults that can be detected through vibration analysis include the following conditions:
98
+
Typical motor faults that can be detected through vibration analysis include the following conditions:
95
99
96
100
-**Bearing wear**: Creates higher frequency components and increased overall vibration levels across all axes
97
101
-**Misalignment**: Produces specific frequency signatures related to rotational speed, typically appearing in radial directions
@@ -101,27 +105,31 @@ Motor faults that can be detected through vibration analysis include the followi
101
105
102
106
### The Role of Sensors in Vibration Monitoring
103
107
104
-
This application note uses the ADXL335 analog accelerometer to provide accurate, real-time measurements of motor vibrations. The ADXL335 offers several advantages for this application:
108
+
Effective motor condition monitoring relies on sensors capable of accurately detecting and measuring mechanical vibrations. These sensors must capture the subtle changes in vibration patterns that indicate developing faults or abnormal operating conditions. The choice of sensor technology directly impacts the system's ability to detect problems early and provide reliable maintenance insights.
109
+
110
+
This application note uses the [ADXL335 analog accelerometer](https://www.analog.com/media/en/technical-documentation/data-sheets/adxl335.pdf) to provide accurate, real-time measurements of motor vibrations. The ADXL335 offers several key advantages for motor monitoring applications:
105
111
106
-
-**3-Axis Measurement**: Captures vibrations in X, Y, and Z directions for comprehensive analysis
107
-
-**Analog Output**: Direct compatibility with Arduino analog inputs without digital interface complexity
108
-
-**Low Power Consumption**: Only 320 μA current consumption, suitable for continuous monitoring
109
-
-**Wide Frequency Range**: 0.5 Hz to 1600 Hz bandwidth covers most motor fault frequencies
112
+
-**3-Axis measurement**: Captures vibrations in X, Y, and Z directions
113
+
-**Analog output**: Direct compatibility with the Nano R4 board analog inputs without requiring complex digital interfaces
114
+
-**Low power consumption**: Only 320 μA current consumption makes it suitable for continuous monitoring applications
115
+
-**Wide frequency range**: 0.5 Hz to 1600 Hz bandwidth covers most typical motor fault frequencies
110
116
111
-
The ADXL335 specifications include:
117
+
The ADXL335 technical specifications include the following characteristics:
112
118
113
-
-**Measurement Range**: ±3g on all axes, suitable for most motor vibration levels
114
-
-**Sensitivity**: 330 mV/g nominal, providing good resolution for vibration analysis
115
-
-**Output**: Ratiometric analog voltages with 1.65V at 0g acceleration
116
-
-**Power Supply**: 1.8V to 3.6V (regulated to 3.3V on breakout boards)
119
+
-**Measurement range**: ±3g on all axes, appropriate for typical motor vibration levels
120
+
-**Sensitivity**: 330 mV/g nominal sensitivity provides good resolution for vibration analysis
121
+
-**Output**: Ratiometric analog voltages with +1.65 VDC representing 0g acceleration
122
+
-**Power supply**: +1.8 to +3.6 VDC (regulated to +3.3 VDC usually on breakout boards)
117
123
118
-
Signal processing considerations include proper sampling rates based on expected frequency content, typically following the Nyquist criterion. The Arduino Nano R4's 14-bit ADC provides sufficient resolution for most vibration monitoring applications.
124
+
Signal processing considerations include selecting appropriate sampling rates based on the expected frequency content of motor vibrations, typically following the Nyquist criterion to avoid aliasing. The Nano R4 board's 14-bit ADC provides enough resolution for most vibration monitoring applications.
119
125
120
126
## Simple Vibration Monitor Example Sketch
121
127
122
-
Now that we have covered the hardware components and vibration analysis fundamentals, let's examine the software that enables vibration data collection. The example sketch in this section manages data acquisition from the ADXL335 accelerometer connected to the Arduino Nano R4, allowing us to monitor real-time vibration data for baseline establishment and anomaly detection training.
128
+
Now that we have covered the hardware components and vibration analysis fundamentals, let's examine the software that enables vibration data collection. Before implementing intelligent anomaly detection, we need to collect training data representing normal motor operation for Edge Impulse, a platform that simplifies embedded AI development.
123
129
124
-
This section breaks down the provided example sketch, guiding you through its functionality. We will explore how the accelerometer is initialized, how vibration data is collected at consistent intervals, and how the results are formatted for Edge Impulse data collection.
130
+
Edge Impulse requires training data in a specific format to build effective anomaly detection models. Our data collection sketch formats the accelerometer readings so Edge Impulse can analyze normal operation patterns and create a model that identifies when new data deviates from these established patterns.
131
+
132
+
This section breaks down the provided example sketch, guiding you through its functionality. We will explore how the accelerometer is initialized, how vibration data is collected at consistent intervals and how the results are formatted specifically for Edge Impulse data collection and model training.
125
133
126
134
The complete example sketch is shown below.
127
135
@@ -167,12 +175,13 @@ void setup() {
167
175
Serial.begin(115200);
168
176
169
177
// Configure ADC for maximum resolution
170
-
analogReadResolution(14); // Use 14-bit ADC resolution
178
+
// Use 14-bit ADC resolution
179
+
analogReadResolution(14);
171
180
172
181
// System ready message
173
-
Serial.println("Motor Vibration Data Collector");
174
-
Serial.println("Send 'start' to begin data collection");
Serial.print("- Data collection stopped. Samples collected: ");
228
238
Serial.println(sampleCount);
229
-
Serial.println("Send 'start' to collect another window");
239
+
Serial.println("- Send 'start' to collect another window");
230
240
}
231
241
232
242
/**
@@ -282,7 +292,7 @@ The following sections will help you understand the main components of the examp
282
292
283
293
### Hardware Configuration and Calibration
284
294
285
-
The first step involves configuring the Arduino Nano R4 for optimal accelerometer interfacing and establishing the ADXL335 calibration parameters.
295
+
Before we can collect vibration data, we need to configure the Nano R4 board to properly interface with the ADXL335 accelerometer and establish its calibration parameters.
- Pin assignments define the analog inputs for each accelerometer axis
302
-
- Sensitivity and zero-g voltage values are based on ADXL335 datasheet specifications
303
-
- Reference voltage matches the accelerometer's regulated output voltage
311
+
- Pin assignments map each accelerometer axis to specific analog inputs on the Nano R4
312
+
- Sensitivity and zero-g voltage values come directly from the ADXL335 datasheet specifications
313
+
- Reference voltage is set to match the accelerometer's regulated output voltage
304
314
305
315
### Data Collection Timing and Control
306
316
307
-
The sampling system ensures consistent data collection timing critical for vibration analysis and machine learning training.
317
+
To ensure accurate vibration analysis and successful machine learning training, we need consistent data collection timing. These sampling parameters control how data is gathered:
308
318
309
319
```arduino
310
320
// Sampling parameters for Edge Impulse
@@ -315,13 +325,13 @@ const unsigned long sampleInterval = 1000 / sampleRate; // 10ms between samples
315
325
316
326
In the code snippet shown above:
317
327
318
-
- Sample rate of 100 Hz provides adequate frequency response for most motor faults
319
-
- Window size of 200 samples creates 2-second data segments suitable for Edge Impulse training
320
-
- Sample interval calculation ensures precise timing between measurements
328
+
- Sample rate of 100 Hz captures adequate frequency response for detecting most motor faults
329
+
- Window size of 200 samples creates 2-second data segments that work well with Edge Impulse training
330
+
- Sample interval calculation automatically determines the precise timing needed between measurements
321
331
322
332
### Signal Processing and Conversion
323
333
324
-
The conversion process transforms raw ADC readingsinto meaningful acceleration values for analysis.
334
+
Once we have the raw sensor readings, we need to convert them into meaningful acceleration values. This conversion process transforms the ADC readings into data we can analyze:
- Timing control ensures consistent sample intervals for proper frequency analysis
351
-
- ADC conversion accounts for the Nano R4's 14-bit resolution (0-16383 range)
352
-
- Acceleration calculation applies ADXL335 calibration parameters for accurate g-force values
360
+
- Timing control maintains consistent sample intervals, which is essential for proper frequency analysis
361
+
- ADC conversion takes into account the Nano R4's 14-bit resolution that ranges from 0 to 16383
362
+
- Acceleration calculation applies the ADXL335 calibration parameters to get accurate g-force values
353
363
354
364
### Edge Impulse Data Formatting
355
365
356
-
The output formatting prepares data for direct use with Edge Impulse data collection tools.
366
+
The final step formats our acceleration data so it can be easily used with Edge Impulse data collection tools:
357
367
358
368
```arduino
359
369
// Output data in CSV format for Edge Impulse
@@ -366,11 +376,11 @@ The output formatting prepares data for direct use with Edge Impulse data collec
366
376
367
377
In the code snippet shown above:
368
378
369
-
- CSV format with four decimal places provides precision for machine learning training
370
-
- Single-line output per sample enables easy integration with Edge Impulse data forwarder
371
-
- Comma separation follows standard CSV conventions for data processing
379
+
- CSV format with four decimal places gives us the precision needed for machine learning training
380
+
- Single-line output per sample makes it easy to integrate with the Edge Impulse data forwarder
381
+
- Comma separation follows standard CSV conventions that most data processing tools expect
372
382
373
-
After uploading the example sketch to the Arduino Nano R4, you should see the following output in the Arduino IDE's Serial Monitor when data collection is active:
383
+
After uploading the example sketch to the Nano R4 board, you should see the following output in the Arduino IDE's Serial Monitor when data collection is active:
374
384
375
385

0 commit comments