Optocoupler PS2501-1-H-A-ND

Optocouplers are good switches when you don’t want your electronics to burn πŸ™‚

Datasheet