AI

The **2SES-1HA-R** is a specific model of an **Optical Encoder Switch** (specifically a rotary encoder) manufactured by **COPALS** (Nidec Copal Electronics). It is widely used in electronic devices for menu navigation, volume control, and parameter adjustments.
---
## 1. Component Overview
The 2SES-1HA-R is an incremental rotary encoder that uses optical sensing technology. Unlike mechanical encoders that use physical metal brushes, optical encoders use a light beam and a photo-detector, leading to a much longer lifespan and higher reliability.
### Key Specifications
| Feature | Specification |
| :--- | :--- |
| **Type** | Incremental Optical Encoder |
| **Output Type** | 2-phase (A & B) Quadrature |
| **Resolution** | 24 pulses per rotation (PPR) |
| **Detents** | 24 click positions |
| **Mounting Type** | Surface Mount (SMD / SMT) |
| **Switch Function** | Integrated Push-button switch |
| **Operating Life** | ~1,000,000 cycles |
---
## 2. Technical Working Principle
### Optical Sensing
Inside the component, there is an Infrared (IR) LED and a phototransistor. A slotted disk rotates between them. As the disk turns, it breaks the light beam, creating digital pulses.
### Quadrature Output (A and B Channels)
The device outputs two signals, typically called **Channel A** and **Channel B**.
* **Direction Sensing:** If A leads B, the rotation is clockwise. If B leads A, the rotation is counter-clockwise.
* **Resolution:** By counting the rising and falling edges of both signals, the microcontroller can determine the exact position of the knob.
---
## 3. Terminal Configuration
The "1HA" designation refers to the physical terminal layout. This model is designed for horizontal mounting on a PCB.
### Pinout Structure
1. **VCC:** Power supply (usually 5V).
2. **GND:** Ground.
3. **Phase A:** Pulse output A.
4. **Phase B:** Pulse output B.
5. **Switch 1:** Terminal for the integrated push-button.
6. **Switch 2:** Terminal for the integrated push-button.
---
## 4. Typical Applications
* **Audio Equipment:** Digital volume knobs or frequency tuning.
* **Medical Devices:** Navigation of menus on portable monitors.
* **Communication Devices:** Channel selection on handheld radios.
* **Test Instruments:** Adjusting voltage or current parameters on lab power supplies.
---
## 5. Circuit Implementation Example
To interface this with a microcontroller (like an Arduino or ESP32), you typically need pull-up resistors on the A and B lines.
```cpp
// Basic Arduino Logic for 2SES-1HA-R
const int pinA = 2; // Connect to Phase A
const int pinB = 3; // Connect to Phase B
void setup() {
pinMode(pinA, INPUT_PULLUP);
pinMode(pinB, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
// Logic to detect state change and determine direction
}
```
---
- ⤷What are the main advantages of using an optical encoder over a mechanical one?
- ⤷ How do I calculate the RPM limits for the 2SES-1HA-R?
- ⤷ Can this encoder operate at 3.3V logic levels?