M2UDS2-23-R2
AI

The **M2UDS2-23-R2** is a specific model of an **Ultrasonic Distance Sensor**, typically used in industrial automation, robotics, and tank level monitoring. It operates by emitting high-frequency sound waves and measuring the time it takes for the echo to return after hitting an object.
---
### 1. Key Technical Specifications
The following table outlines the core electronic and physical characteristics of this component:
| Feature | Specification |
| :--- | :--- |
| **Sensing Range** | Typically 30mm to 300mm (depends on configuration) |
| **Output Type** | Analog (0-10V or 4-20mA) or Switching (PNP/NPN) |
| **Supply Voltage** | 10V - 30V DC |
| **Transducer Frequency** | ~300 kHz |
| **Connection Type** | M12 Connector (4-pin or 5-pin) |
| **Housing Material** | Nickel-plated brass or Stainless Steel |
| **IP Rating** | IP67 (Dust tight and water immersion resistant) |
---
### 2. Core Electronic Components
The internal architecture of the M2UDS2-23-R2 consists of several critical stages:
#### A. Piezoelectric Transducer
The "heart" of the sensor. It converts electrical energy into mechanical vibrations (ultrasonic sound) and then converts the returning mechanical vibrations back into an electrical signal.
#### B. Signal Processing Unit (MCU/ASIC)
* **Time-of-Flight (ToF) Calculation:** It measures the interval between the "ping" and the "echo."
* **Temperature Compensation:** Since the speed of sound varies with air temperature, the sensor often includes an internal thermistor to adjust readings for accuracy.
#### C. Output Driver
* **Analog Stage:** Uses a Digital-to-Analog Converter (DAC) to provide a linear voltage or current signal proportional to the distance.
* **Digital Stage:** Uses transistors (PNP/NPN) to act as a switch when an object enters a specific "teach-in" zone.
---
### 3. Connection Diagram (Standard M12)
Most R2 series sensors follow this standard wiring convention:
| Pin Number | Wire Color | Function |
| :--- | :--- | :--- |
| **1** | Brown | +VCC (10-30V DC) |
| **2** | White | Teach-in / Mode Selection |
| **3** | Blue | GND (0V) |
| **4** | Black | Output Signal (Switching/Analog) |
---
### 4. Implementation Example
To interface this sensor with a PLC or Microcontroller, you generally treat the output as an analog input.
```cpp
// Pseudo-code for reading distance via a 0-10V Analog Input
float sensorValue = analogRead(A0); // Read 10-bit ADC
float voltage = (sensorValue / 1023.0) * 10.0;
// Map 0-10V to the 30mm-300mm range
float distance = map(voltage, 0, 10, 30, 300);
Serial.print("Distance: ");
Serial.println(distance);
```
- ⤷
How do you calibrate the 'Teach-in' function on this sensor?
- ⤷ What are the common causes of interference for ultrasonic sensors?
- ⤷ Does this model support IO-Link communication?