RG3-303S-R15
AI

The **RG3-303S-R15** is a high-performance **rotary coded switch** (often referred to as a rotary selector or DIP rotary switch) manufactured by companies like Copal Electronics (Nidec). These components are designed to provide a binary-coded output based on the physical position of the rotor.
### 1. General Specifications
Below is a summary of the technical characteristics of the RG3 series, specifically the 303S-R15 variant.
| Feature | Specification |
| :--- | :--- |
| **Code Type** | Real Binary Code (3-bit/8-position) |
| **Number of Positions** | 8 Positions (0 through 7) |
| **Actuator Type** | Shaft type (usually for knob attachment) |
| **Mounting Type** | Through-hole (PCB Mount) |
| **Contact Rating** | 5V DC, 100mA (Switching) / 50V DC, 100mA (Non-switching) |
| **Terminal Pitch** | 2.54mm (Standard Breadboard/PCB spacing) |
| **Operating Temp** | -25°C to +70°C |
---
### 2. Electronic Functionality
The RG3-303S-R15 functions as a digital encoder. As the shaft is rotated to a specific number (0-7), it internally connects specific output pins to the Common (C) pin to represent that number in binary format.
#### Logic Truth Table (Real Code)
| Position | Pin 1 ($2^0$) | Pin 2 ($2^1$) | Pin 4 ($2^2$) |
| :---: | :---: | :---: | :---: |
| 0 | OFF | OFF | OFF |
| 1 | **ON** | OFF | OFF |
| 2 | OFF | **ON** | OFF |
| 3 | **ON** | **ON** | OFF |
| 4 | OFF | OFF | **ON** |
| 5 | **ON** | OFF | **ON** |
| 6 | OFF | **ON** | **ON** |
| 7 | **ON** | **ON** | **ON** |
---
### 3. Key Electronic Components & Materials
* **Gold-Plated Contacts:** To ensure low contact resistance and prevent oxidation over long periods of use.
* **Wiping Action Mechanism:** The internal contacts "wipe" across the pads as they turn, which helps clear away dust and ensures a reliable electrical connection.
* **Thermoplastic Housing:** Usually made of high-temperature resistant PBT or PPS to withstand wave soldering processes.
### 4. Typical Applications
* **Address Setting:** Used in industrial networking (like RS-485 or CAN bus nodes) to set a unique ID for a device.
* **Mode Selection:** Selecting between different firmware operating modes on a control board.
* **Configuration:** Replacing standard DIP switches where a single rotary interface is more intuitive for the user.
---
### 5. Circuit Integration Example
When connecting this to a microcontroller (like an Arduino or STM32), it is standard practice to use **pull-up resistors**.
```cpp
// Example: Reading the RG3-303S-R15 state
int pin1 = 2; // Connected to Bit 1 (2^0)
int pin2 = 3; // Connected to Bit 2 (2^1)
int pin4 = 4; // Connected to Bit 4 (2^2)
void setup() {
pinMode(pin1, INPUT_PULLUP);
pinMode(pin2, INPUT_PULLUP);
pinMode(pin4, INPUT_PULLUP);
}
void loop() {
// Logic is inverted if using INPUT_PULLUP (Active LOW)
int bit0 = !digitalRead(pin1);
int bit1 = !digitalRead(pin2);
int bit2 = !digitalRead(pin4);
int position = (bit2 << 2) | (bit1 << 1) | bit0;
}
```
- ⤷What is the difference between 'Real Code' and 'Complementary Code' in these switches?
- ⤷ Can this switch be used for AC voltage applications?
- ⤷ What are the mechanical life cycle ratings for the RG3 series?