AI

The **M2UDS-34-R2** is a specific model of a **Rotary DIP Switch** (Dual In-line Package). These components are commonly used in electronics to set binary-coded values or manual configurations on a printed circuit board (PCB) without needing external software.
---
### 1. Technical Specifications
The "M2UDS-34-R2" typically follows a standard industry naming convention for rotary switches. Below is a breakdown of its key electronic characteristics:
| Feature | Specification |
| :--- | :--- |
| **Switch Type** | Rotary DIP Switch |
| **Positions** | 10 (Decimal) or 16 (Hexadecimal) |
| **Coding** | Real Code (Binary Coded Decimal/Hex) |
| **Actuator Style** | Sunk / Flat Type (requiring a screwdriver) |
| **Mounting Type** | Surface Mount (SMD) or Through-Hole (depending on series) |
| **Voltage Rating** | Switching: 5V - 24V DC / Non-switching: 50V DC |
| **Current Rating** | Switching: 100mA / Non-switching: 400mA |
---
### 2. Functional Description
The part functions as a **4-bit digital encoder**. As you rotate the dial, it creates specific electrical connections between the common pin and the output pins (1, 2, 4, and 8).
#### Internal Logic Table (Example)
| Dial Position | Pin 1 (1) | Pin 2 (2) | Pin 3 (4) | Pin 4 (8) |
| :--- | :--- | :--- | :--- | :--- |
| **0** | Open | Open | Open | Open |
| **1** | Closed | Open | Open | Open |
| **2** | Open | Closed | Open | Open |
| **3** | Closed | Closed | Open | Open |
| **...** | ... | ... | ... | ... |
---
### 3. Connection Diagram (General)
In a typical circuit, the "Common" pin is connected to Ground (GND) or VCC, and the four output pins are connected to a microcontroller with pull-up or pull-down resistors.
```cpp
// Example: Reading a Rotary DIP switch in Arduino
int pin1 = 2; // Bit 0
int pin2 = 3; // Bit 1
int pin4 = 4; // Bit 2
int pin8 = 5; // Bit 3
void setup() {
pinMode(pin1, INPUT_PULLUP);
pinMode(pin2, INPUT_PULLUP);
pinMode(pin4, INPUT_PULLUP);
pinMode(pin8, INPUT_PULLUP);
}
```
---
### 4. Common Applications
* **Address Setting:** Assigning a unique ID to a device on a bus (e.g., RS-485 or DMX networks).
* **Mode Selection:** Choosing between different operating modes (e.g., Baud rate, Test mode).
* **Industrial Controls:** Hard-coding settings that should not be easily changed by end-users.
- ⤷What is the difference between 'Real Code' and 'Complement Code' in these switches?
- ⤷ Can the M2UDS-34-R2 be used for high-voltage AC switching?
- ⤷ What are the footprint dimensions for the SMD version of this switch?