Keyswitch Wiring

The figure below shows two options to wire a key switch to the controller. When the switch is closed, the controller is powered on. When the switch is open, the controller is powered off. The value of R is 4.7kΩ.

Keyswitch Wiring