Connecting a 2 pin push button switch to LED, relay and motor circuits
2026-12-02
HOSONG Button
Article overview
This guide walks through every stage of a 2 pin push button switch connection — from identifying the two terminals and testing them with a multimeter, to wiring the switch into LED indicator, relay and motor control circuits. It also covers safety requirements specific to Malaysia's 240 V/50 Hz supply, common wiring faults, and how to troubleshoot a switch that does not respond or causes contact bounce. Suitable for DIY beginners, electronics students and electrical apprentices preparing for their first wiring project.
Table of contents
- What a 2 pin push button switch actually does
- Identifying the terminals: NO, NC and how to test with a multimeter
- Wiring a 2 pin push button switch to an LED circuit
- Wiring a 2 pin push button switch to a relay circuit
- Wiring a 2 pin push button switch to a motor circuit
- AC vs DC circuits: 240 V safety, insulation and Malaysia-specific requirements
- Choosing the right push button switch: panel size, ratings and local sourcing
- Troubleshooting: when the button does not work as expected
- Frequently asked questions
A 2 pin push button switch connection is straightforward in principle: one terminal connects to your power or signal source, the other connects to the load or the next stage of the circuit. What makes the difference between a working circuit and a frustrating debugging session is understanding which pin type you have — normally open (NO) or normally closed (NC) — and then applying the correct wiring sequence for your specific application, whether that is a simple LED indicator, a 12 V relay module or a single-phase motor starter. This guide covers all three, alongside the safety steps that matter when working near Malaysia's 240 V/50 Hz mains supply.
What a 2 pin push button switch actually does
A push button switch basics article on Wikipedia describes a push button as an actuator designed to close or open an electrical circuit when pressed, and to return to its original state when released. That return action is what separates a momentary switch from a latching toggle switch: with a push-to-make (PTM) momentary button, the circuit only completes while your finger is on it. Release the button, and the circuit opens again.
The 2 pin variant is the simplest possible switch contact configuration. There are exactly two terminals — no common, no separate NO and NC outputs on the same body. Current either flows between those two pins or it does not. This makes the switch pin configuration easy to understand but also means you must decide upfront whether you need a normally open or normally closed arrangement, because a single 2 pin body gives you one or the other, not both.
Common applications in Malaysia include doorbell switch wiring, panel-mounted reset button wiring on control boxes, Arduino or microcontroller input triggers, and emergency stop additions to small machinery. The same physical button appears in everything from a RM 1.50 tactile switch on a PCB to a 22 mm metal-bodied industrial push button rated for hundreds of thousands of operations.
Identifying the terminals: NO, NC and how to test with a multimeter
Before any wiring begins, confirm what you have. Connecting a normally closed (NC) button where a normally open (NO) is expected will reverse your circuit logic entirely — a motor that should start on press will instead run continuously and stop when you press.
Visual identification
Many 2 pin push buttons are labelled directly on the body or in the datasheet. Look for the markings NO (normally open, also called push-to-make) or NC (normally closed, also called push-to-break). On PCB-mounted tactile switches, the two pins on the same side of the package are internally connected, while pins on opposite sides form the switch contact — check the component datasheet to confirm the internal switch schematic.
Testing with a multimeter — step by step
This is the most reliable method, especially for unmarked or second-hand buttons sourced locally.
- Power off all circuits connected to the switch. Never test continuity on a live circuit.
- Set your multimeter to the continuity or resistance (Ω) mode. A continuity mode will beep when a connection is detected.
- Place one probe on each of the two terminals.
- Without pressing the button: if the meter beeps or reads near 0 Ω, the switch is normally closed (NC). If there is no beep and the meter reads OL (open loop), the switch is normally open (NO).
- While pressing the button: the reading should flip. A NO switch will now show continuity; an NC switch will now show open.
- Release the button and confirm the reading returns to its original state. If it does not, the switch mechanism may be damaged — do not use it in a live circuit.
This six-step test also confirms the switch is functioning correctly before installation, saving significant fault-finding time later.
Wiring a 2 pin push button switch to an LED circuit
An LED circuit is the most common beginner project and a good way to verify switch behaviour before moving to higher-power loads. The following steps assume a 5 V DC supply (such as a USB power bank or Arduino 5 V pin) and a standard 5 mm through-hole LED.
Components needed
- 2 pin NO push button switch
- 5 mm LED (any colour)
- 330 Ω resistor (for 5 V supply; use 1 kΩ for 3.3 V)
- Connecting wires and a breadboard or terminal block
- 5 V DC power source
Wiring steps
- Connect the positive rail of the power supply to one terminal of the push button switch.
- Connect the second terminal of the push button switch to one leg of the 330 Ω resistor.
- Connect the other leg of the resistor to the anode (longer leg) of the LED.
- Connect the cathode (shorter leg) of the LED back to the negative (GND) rail of the power supply.
- Apply power. The LED should remain off. Press the button — the LED lights. Release — it goes off.
This is a classic push-to-make switch circuit diagram. The resistor is essential: without it, the LED draws excessive current and will fail within seconds. If you are using a 12 V DC source instead, increase the resistor to approximately 560 Ω to 1 kΩ to keep LED current within the 10–20 mA safe operating range.
For Arduino projects, the button typically wires between the input pin and GND, with the internal pull-up resistor enabled in code (pinMode(pin, INPUT_PULLUP)). This inverts the logic: the pin reads HIGH at rest and LOW when pressed. This is a standard push button electrical connection pattern in microcontroller circuits.
Wiring a 2 pin push button switch to a relay circuit
A relay allows a low-voltage, low-current push button to switch a completely separate, higher-power circuit. This is the core method used to control 240 V AC appliances from a 5 V or 12 V control signal — a common requirement in Malaysian DIY home automation projects.
How the circuit works
The relay coil (typically rated 5 V DC or 12 V DC) is energised by the push button closing the control circuit. When energised, the relay's internal armature moves, closing (or opening) a separate set of heavy-duty contacts that can carry the main load current. The two circuits — control and load — are physically isolated inside the relay, which is why this arrangement is safe for mixing low-voltage DC control with 240 V AC loads, provided correct insulation clearances are maintained.
Wiring a 5 V relay module with a 2 pin push button
- Connect the positive supply (5 V DC) to one terminal of the push button switch.
- Connect the second terminal of the push button to the IN pin of the relay module.
- Connect the relay module's VCC pin to 5 V DC and GND to the supply ground. Some relay modules include a flyback diode and optocoupler for coil protection — these are preferred for longevity.
- On the relay's output side, the terminals are typically labelled COM (common), NO (normally open) and NC (normally closed). For a load that should activate when the button is pressed, wire your 240 V live feed into COM, and the load into NO.
- The neutral wire connects directly to the load without passing through the relay.
- Pressing the button energises the coil, closes the NO contact, and the load receives power.
Important: Always fuse the load side appropriately. For a 240 V AC load drawing up to 5 A, a 6 A fuse is a reasonable margin. The relay contact rating must exceed the load current — do not use a 10 A rated relay contact for a 10 A load continuously; apply a 20–30% current derating to account for heat and contact wear.
Wire gauge on the 240 V side should be at minimum 1.5 mm² (approximately 15 AWG) for loads up to 10 A, and 2.5 mm² (approximately 13 AWG) for loads up to 16 A, consistent with Malaysian wiring practice under MS IEC 60364.
Wiring a 2 pin push button switch to a motor circuit
Motor circuits introduce additional considerations: motors draw a surge current at startup (often 3–6 times the rated running current), generate back-EMF when stopping, and may require directional control. A single 2 pin momentary push button is suitable for simple start/stop control of small DC motors or as the trigger input in a contactor-based motor starter for AC motors.
Direct DC motor control (small motors, up to 2 A)
For small brushed DC motors running from a 12 V supply:
- Connect the positive supply to one terminal of the NO push button.
- Connect the second terminal of the push button to the positive terminal of the motor.
- Connect the motor's negative terminal to supply ground.
- Add a flyback diode (such as a 1N4007) across the motor terminals, with the cathode (stripe) towards the positive supply, to suppress voltage spikes when the motor is switched off.
For motors above 2 A, use the push button to trigger a relay or MOSFET transistor, with the motor powered through the relay contacts rather than through the button directly. Passing high current through a small push button's contacts will accelerate wear and cause overheating.
AC motor starter circuit (contactor-based, 240 V)
In industrial and workshop panels, a 2 pin NO push button typically wires into the contactor coil circuit rather than the motor power circuit directly. The standard arrangement:
- A START button (NO, momentary) is wired in series with the contactor coil.
- A STOP button (NC, momentary) is wired in series before the START button.
- A set of auxiliary contacts on the contactor forms a holding circuit (also called a seal-in circuit) in parallel with the START button, keeping the coil energised after the START button is released.
This is a safety-critical design: if the NC STOP button is accidentally wired as NO, the motor will not stop when the button is pressed. Always verify terminal polarity with a multimeter before first power-on of any motor control panel.
Overload protection (a thermal overload relay in series with the main power circuit) is mandatory in any fixed motor installation in Malaysia to comply with MS IEC 60947-4-1.
AC vs DC circuits: 240 V safety, insulation and Malaysia-specific requirements
Malaysia operates on a 240 V/50 Hz single-phase mains supply with Type G (BS 1363) three-pin sockets. This voltage is lethal at accessible current levels, and the wiring practices appropriate for a 5 V Arduino project are not adequate for mains-connected circuits.
Key differences when working at 240 V
| Factor | Low-voltage DC (5–24 V) | 240 V AC mains |
|---|---|---|
| Insulation voltage rating | 50 V minimum | 300 V or 500 V minimum (check button datasheet) |
| Push button contact rating | Any DC rating sufficient | Must be rated AC 250 V or higher |
| Creepage and clearance | Less critical | Follow IEC 60664-1 (minimum 3 mm clearance at 240 V) |
| Wire insulation | Standard PVC, 300 V rated | 600 V or 1000 V rated PVC; heat-resistant in confined spaces |
| Malaysia's humidity consideration | Low risk | Select IP54 or higher rated enclosures in humid or outdoor locations |
Mandatory safety steps before working on any mains circuit
- Isolate the supply: switch off the MCB (miniature circuit breaker) for the relevant circuit and lock it out if possible.
- Verify isolation: use a non-contact voltage tester or a known-good multimeter set to AC voltage to confirm the conductors are dead before touching them. Do not rely on the MCB position alone.
- Check all conductors: in a 240 V single-phase circuit, test both the live (brown) and neutral (blue) conductors relative to earth. A wiring fault can leave neutral at a dangerous potential.
- Work with one hand where practical: reduces the risk of current passing across the chest if accidental contact occurs.
SIRIM certification and local standards
Push button switches intended for use in Malaysian mains-voltage equipment should ideally carry SIRIM certification, which confirms compliance with Malaysian Standards (MS). For control switches in industrial panels, the relevant standard is MS IEC 60947-5-1 (low-voltage switchgear — control circuit devices and switching elements). For switches used in consumer equipment, MS IEC 60335 series applies. When sourcing from local electrical wholesalers or platforms such as Shopee and Lazada, check whether the product listing mentions IEC compliance or SIRIM approval, particularly for any switch that will be installed in a panel carrying 240 V.
Malaysia's equatorial climate means relative humidity regularly exceeds 80%. For outdoor, rooftop, or plant-room installations, choose push button enclosures rated at minimum IP54 (dust-protected, splash-resistant). For wash-down environments or direct rain exposure, IP65 or IP67 is more appropriate.
Choosing the right push button switch: panel size, ratings and local sourcing
The most common panel cutout sizes for push button switches in Malaysia are 12 mm, 16 mm and 22 mm. The 22 mm format is the dominant industrial standard and fits most DIN-rail control panels; 16 mm and 12 mm are common in compact enclosures and hobbyist projects. Tactile PCB-mounted switches follow a different sizing convention based on body footprint (typically 6×6 mm or 12×12 mm).
| Cutout size | Typical application | Approximate price range (Malaysia, 2024–2025) |
|---|---|---|
| 12 mm | Small panels, Arduino projects, 3D-printed enclosures | RM 1–5 per unit (plastic), RM 5–15 (metal) |
| 16 mm | Mid-size control panels, doorbell switches | RM 3–8 per unit (plastic), RM 8–20 (metal) |
| 22 mm | Industrial control panels, motor starters, machinery | RM 8–30 per unit (plastic), RM 15–60 (metal, IP rated) |
Price ranges are indicative based on commonly listed products on Malaysian e-commerce platforms and may vary with exchange rate and supplier. Always verify current pricing before purchasing.
Mechanical life and contact ratings
Budget tactile switches are typically rated for 50,000 to 100,000 operations. Industrial metal push buttons — including those in the 12 mm to 22 mm range designed for panel mounting — are commonly rated at 1,000,000 or more mechanical operations. For applications where the button is pressed dozens of times per day (a production line start button, for example), mechanical life is a real selection criterion, not a marketing figure. Check the datasheet for both mechanical life and electrical life at rated current, as electrical life under load is usually lower.
Contact current rating is equally important. A button rated 3 A at 240 V AC should not be used to switch a 3 A load continuously — apply the same 20–30% derating principle mentioned for relay contacts. For resistive loads (heating elements, incandescent lamps) this is straightforward; for inductive loads (motors, solenoids, fluorescent ballasts), derate further or select a switch with an AC-15 contact rating, which is specifically designed for inductive switching duty.
Troubleshooting: when the button does not work as expected
Even with correct wiring, push button circuits fail for a handful of predictable reasons. The following covers the most common faults in approximate order of frequency for DIY and light industrial use in Malaysia.
Button pressed, no response in the circuit
- Wrong pin type: you have wired an NC button where NO is expected (or vice versa). Re-test with a multimeter as described in section 2.
- Loose terminal connection: in humid conditions, wire ends in screw terminals can work loose due to thermal cycling. Check terminal screws and re-torque. For 2.5 mm² wire, a typical terminal torque is 0.5–0.8 Nm — do not over-tighten, which cracks insulation; do not under-tighten, which creates high-resistance joints.
- Oxidised contacts: switches stored in humid conditions or used infrequently can develop a thin oxide layer on the contact surface, raising contact resistance enough to prevent reliable switching. Operate the button rapidly 20–30 times; if the circuit begins working intermittently, the contact surface is likely oxidised and the switch should be replaced.
- Open circuit elsewhere: the button may be working but a blown fuse, tripped MCB, or broken wire elsewhere in the circuit is preventing current flow. Test continuity along the entire circuit path.
Circuit activates without pressing the button
- NC button installed where NO is required: the most common cause. The circuit is complete at rest because the contact is closed by default.
- Wire short: a strand of wire bridging two terminals in a terminal block. Inspect visually and use a multimeter to check for unintended continuity.
Intermittent operation or contact bounce (debounce issue)
Mechanical contacts do not open and close cleanly in a single transition — they bounce between open and closed for a brief period (typically 1–10 milliseconds) before settling. In LED or relay circuits this is rarely noticeable, but in microcontroller or counter circuits it causes multiple false triggers for each physical press.
- Hardware debounce: add a 0.1 µF ceramic capacitor across the switch terminals (for a pull-up/pull-down resistor circuit). This filters out rapid transitions.
- Software debounce: in Arduino code, add a short delay (10–50 ms) after detecting a state change before reading the pin again. The Arduino documentation and community libraries provide well-tested debounce routines.
LED lights dimly or relay chatters
- Insufficient supply voltage or current: check that the power supply can deliver the required current. A USB power bank in low-power mode may limit output.
- Wrong resistor value for the LED: too high a resistance drops excessive voltage, leaving too little for the LED. Recalculate: R = (Vsupply − Vforward) ÷ Idesired. For a standard red LED at 5 V: R = (5 − 2.0) ÷ 0.015 = 200 Ω.
- Relay coil voltage mismatch: using a 12 V relay on a 5 V supply will cause chattering as the coil cannot fully pull in the armature. Match coil voltage to supply voltage.
Frequently asked questions
Can I use a 2 pin push button switch to control a 240 V appliance directly?
Only if the button's contact rating explicitly covers 240 V AC and the rated current meets or exceeds your load, with appropriate derating applied. Many small plastic push buttons sold for hobbyist use are rated for low-voltage DC only. For 240 V mains loads, the safer and more common approach is to use the button to trigger a relay rated for 240 V AC, keeping the button itself in the low-voltage control circuit.
What is the difference between a 2 pin and a 4 pin push button switch?
A 2 pin switch has a single pair of contacts — it is either NO or NC, not both. A 4 pin switch (common in PCB-mounted tactile switches) contains two pairs of contacts internally connected in parallel, providing more reliable current distribution and mechanical stability on a PCB, but still functioning as a single switch contact. Some 4 pin momentary switches offer both NO and NC outputs on separate pin pairs — check the internal switch schematic in the datasheet to confirm.
How do I wire a push button switch for a doorbell in Malaysia?
Standard Malaysian doorbell wiring uses a 2 pin NO momentary button. The doorbell transformer (typically 8–12 V AC output) connects one terminal to the bell unit and the other to the push button. The second terminal of the push button connects back to the bell unit, completing the circuit when pressed. The 240 V primary side of the transformer should be connected by a qualified electrician if you are not familiar with mains wiring.
Why does my push button feel like it is working but the circuit does not respond?
The most likely causes are: (1) the button is NC but wired expecting NO behaviour — test with a multimeter as described above; (2) a loose or oxidised connection at the terminal, particularly in humid environments; (3) a fault elsewhere in the circuit such as a blown fuse or open wire. Work through the circuit systematically with continuity mode on your multimeter, testing each segment from the supply to the load.
Is SIRIM certification required for push button switches in Malaysia?
SIRIM certification is mandatory for electrical products listed under the Electricity Supply Act 1990 and its subsidiary regulations. Control switches used inside fixed electrical installations or industrial panels are generally subject to compliance with the relevant MS IEC standard. For hobbyist low-voltage DC projects not connected to mains supply, the practical risk is lower, but purchasing from suppliers that reference IEC compliance still provides assurance of minimum quality. When in doubt, consult a registered electrical contractor or engineer.
MESSAGE
Leave a Message Online
*Note: Please ensure that all information is accurate and keep your contact details up to date. We will get in touch with you as soon as possible.
Contact Information
Contact: Manager Zhang (Business Department)
Phone:+86 0769-86302535-8808
Mobile phone:+86 18025227237
E-mail:hosong@hosong.cn
Address: No. 2, Industrial Road No. 1, Xiajiangcheng, Gaobu Town, Dongguan City, Guangdong Province, China