Key Switch Diagram: Wiring, Types, and Circuit Applications

Key Switch Diagram — circuit diagram showing component connectionsBreakerSwitchLight230V AC UtilityLight Switch Wiring
Key Switch Diagram: Wiring, Types, and Circuit Applications — interactive diagram. Open it in the editor to customise components and wiring.

This is a free printable key switch diagram: download the diagram as SVG or open it and print to paper or PDF.

A key switch diagram shows how a mechanically-keyed rotary or barrel switch is wired into a control or power circuit, allowing access or operation only when the correct physical key is inserted and turned.

A key switch is an electromechanical switch whose operating mechanism is a removable key, providing a physical access control layer in electrical and electronic circuits. The key must be inserted and turned to change the switch state; removing the key in some positions allows the mechanism to be locked against further change.

Key switches are available in two primary form factors:

Rotary key switches are the most common. A cylindrical lock barrel sits in a panel-mount hole (typically 16 mm, 19 mm, or 22 mm diameter). Turning the key rotates a contact cam that opens or closes one or more sets of electrical contacts. Contact arrangements follow standard SPST (single-pole single-throw), SPDT (single-pole double-throw), DPST, or DPDT configurations, with operating positions ranging from 2 to 4 (0°, 45°, 90°, 135° rotation steps). Some positions are momentary (spring-return when key is released); others are maintained (key stays in position).

Flat-key or barrel-lock switches use a flat-key cylinder and are common in smaller panel-mount formats.

In industrial control applications, key switches are used to: enable or disable machine operation; select between operating modes (local/remote, manual/automatic); provide maintenance bypass of safety interlocks; and grant or restrict access to control panel functions.

Electrically, a key switch wires exactly as its contact configuration specifies. For a 2-position SPDT key switch: Common (C), Normally Open (NO), and Normally Closed (NC) terminals follow the same logic as any SPDT switch — Common connects to the circuit's control supply; NO connects to the circuit that activates when the key is turned; NC connects to the circuit that is active in the default (key-removed) position.

Key switches are graded by IP (ingress protection) rating for outdoor and industrial use, and by the key-retention policy: whether the key can be removed in all positions, only in some, or only in the home position. This policy is critical for safety-critical applications — a key-retains-in-ON switch prevents the operator from leaving the machine in an active state without taking the key.

Key cylinder interchangeability allows one key to operate multiple switches (common-key systems) or each switch to require a unique key — an important consideration in multi-machine or multi-zone installations.

How to wire key switch diagram

  1. Define the circuit function and determine the required contact configuration Decide whether the key switch needs to simply enable a circuit (SPST or SPDT-NO), select between two circuits (SPDT), or control multiple independent circuits simultaneously (DPDT or multi-cam). Determine how many positions are needed: typically 2 positions (off/on) for simple enable, or 3–4 positions for mode selection.
  2. Determine panel cutout and mounting requirements Standard rotary key switches mount in 16 mm, 19 mm, or 22 mm round panel cutouts (verify with the specific product datasheet). Mark and drill or punch the panel cutout to the correct diameter and ensure the panel material thickness is within the switch's specified clamping range.
  3. Identify key retention requirement and IP rating needed For safety-critical or access-control applications, specify key retention in OFF only so the key must remain in the switch during operation. Confirm the selected IP rating is appropriate for the environment. Specify the key code if multiple switches must share one key or if each must be unique.
  4. Mount the key switch in the panel Insert the switch body through the panel cutout from the front. Tighten the retaining nut from behind the panel to the torque specified in the datasheet — over-tightening can crack plastic panels or deform the switch body. Install any supplied sealing gasket between the switch bezel and panel surface before tightening.
  5. Wire the key switch contacts to the control circuit Connect the Common (C) terminal to the control supply live. Connect the Normally Open (NO) terminal to the circuit that should activate when the key is turned to ON. Connect the Normally Closed (NC) terminal (if used) to any circuit that must be active in the default/OFF position. Use the manufacturer's contact diagram to verify the position-to-contact state table.
  6. Apply appropriate cable management and strain relief Use cable ties or conduit entries to provide strain relief on the wiring to the switch terminals. Key switches are often in panel doors or covers that move — ensure wiring has enough slack and appropriate flex rating (silicone or PVC rated for the environment) to avoid conductor fatigue from door opening cycles.
  7. Test all switch positions and connected circuit functions With the key inserted, test each switch position in sequence. Use a multimeter in continuity mode (with circuit de-energised) to verify the correct contacts close and open at each position, or observe the circuit function at each position with power applied. Confirm key cannot be removed in restricted positions.

Specifications

Standard panel cutout sizes16 mm, 19 mm, 22 mm (22 mm is most common for industrial control panels)
Typical contact rating6–10 A at 250 V AC; 6 A at 24 V DC (varies by manufacturer and model)
Typical switch positions2-position (0° and 90°) or 3-position (0°, 45°, 90°) — maintained or spring-return on specific positions
IP rating (typical, with gasket installed)IP65 (dust-tight and jet-proof water) — verify against specific product datasheet
Mechanical life (typical)50,000–100,000 operations (consult manufacturer datasheet)
Applicable standard for control switchesIEC 60947-5-1 (low-voltage switchgear and controlgear — control circuit devices)
Key cylinder standard (common format)DIN 18252 or proprietary per manufacturer; key codes specified at time of order

Safety warnings

Tools needed

Common mistakes

Troubleshooting

Circuit does not activate when key is turned to ON position
Cause: Wire connected to NC instead of NO terminal, broken connection at the NO terminal, or switch mechanism worn so contacts do not make correctly in the ON position Fix: With circuit de-energised, use a multimeter in continuity mode: with key at OFF, verify continuity between C and NC; with key at ON, verify continuity between C and NO and open circuit between C and NC. If contact states are wrong or missing, check wiring and replace switch if mechanism is faulty.
Key cannot be removed from switch
Cause: Switch is in a position that does not permit key withdrawal per the specified retention configuration, key is bent or damaged, or the lock cylinder mechanism is jammed Fix: Confirm the switch position — most key switches only release the key in the 0° (home/off) position. Turn to the release position. If the key is stuck despite being in the correct position, the cylinder may be jammed; contact the manufacturer. Do not force the key as this can break the lock cylinder.
Intermittent circuit operation — works sometimes, not others
Cause: Worn or corroded contact surfaces inside the switch from age or switching inductive loads without arc suppression, or a loose terminal connection Fix: Check and tighten all terminal connections. If the issue persists, replace the switch — key switch contacts are not user-serviceable in most models. If the circuit controls an inductive load, add appropriate arc suppression (RC snubber for AC; diode for DC) across the load to reduce contact erosion.

Frequently asked questions

What are the typical electrical contact configurations for key switches?

Key switches are available in SPST (single-pole single-throw: one circuit open or closed), SPDT (single-pole double-throw: one common, one normally open, one normally closed), DPST (two independent SPST), and DPDT (two independent SPDT) configurations. Multi-position switches (3 or 4 positions) may have more complex contact logic. Always consult the manufacturer's contact truth table.

What does 'key retention in position' mean and why is it important?

Key retention policy describes which switch positions allow key removal. A switch that retains the key only in the OFF (home) position forces the operator to leave the key in the switch while it is ON, meaning the key is not available to turn on another machine simultaneously. A switch that releases in all positions allows removal and re-use elsewhere. The policy is a safety design decision, not an electrical one.

How is a key switch different from a normal toggle or pushbutton switch?

A key switch requires a specific physical key to operate, providing access control and preventing unauthorised or inadvertent switching. A toggle or pushbutton switch is operated by hand without restriction. Key switches are used where control authority must be restricted to designated personnel who hold the key, or where accidental state change must be positively prevented.

Can one key operate multiple key switches in a system?

Yes, if the switches use the same key cylinder code (key code or master key system). This is called a common-key arrangement. Alternatively, individual key codes are used so each switch requires its own unique key. The key cylinder is typically a standard lock format (e.g., CH751, or manufacturer's custom series) — specify the key code when ordering multiple switches for a system.

What IP rating should I specify for an outdoor or washdown-area key switch?

For outdoor or exposed installations, specify IP65 (dust-tight, jet-proof water) as a minimum. Washdown areas in food processing or industrial environments may require IP66 or IP67. The IP rating covers the complete switch assembly in the panel, including the seal between the key switch body and the panel cutout. Check that the rating applies to the switch in its installed position.

Full written guides

Related diagrams

Free electrical calculators

Edit this diagram free in the online editor