To understand the yl105 datasheet, you must first identify the physical components and pin assignments.
| Label | Type | Description | |-----------|----------|-----------------| | VCC | Power Input | +5V DC (regulated) – powers the module’s optocoupler and relay coil. | | GND | Power Ground | Common ground for both control and relay power. | | IN | Digital Input | Control signal from microcontroller (active HIGH or LOW, depending on jumper). | | JD-VCC | Jumper/VCC | Jumper selects whether relay power is isolated from logic power. | | COM | Terminal | Common terminal of the relay switch. | | NC | Terminal | Normally Closed – connected to COM when relay is OFF. | | NO | Terminal | Normally Open – connected to COM when relay is ON. | yl105 datasheet
If the jumper is installed, the relay activates when IN = LOW. The wiring is identical, but logic is reversed. To understand the yl105 datasheet, you must first
digitalWrite(relayPin, LOW); // relay ON
digitalWrite(relayPin, HIGH); // relay OFF
The LM393 output is open collector. The datasheet usually notes this, meaning you can pull it up to a different voltage (e.g., 3.3V for a Raspberry Pi) than the module’s VCC (5V). This is a major plus for mixed-voltage systems. The LM393 output is open collector