Soldering four-pin SMT switch? - Page 1
Forum section: electronics / beginners

author: Winfried
author_rank: Contributor
timestamp: November 21, 2022, 10:39:07 pm
content: Hello,I bought a bag of compact tactile switches so I can insert one between the battery and the JST plug on an ESP32 micro-controller.I have a couple of questions:1. Will the solder hold if I apply some directly on the pins?2. Which pins should I use for the two red wires — Apparently, I should connect the two black wires directly?Thank you.

author: jpanhalt
author_rank: Super Contributor
timestamp: November 21, 2022, 10:45:49 pm
content: There is no reason not to connect all four pins to PCB pads, even if mechanical robustness is the only reason. Not all pairs of pads need to be connected electrically, of course.

author: EPAIII
author_rank: Super Contributor
timestamp: November 22, 2022, 02:18:24 am
content: As for how to wire them,The only thing that the photo tells about those switches is that they have four terminals/pins. That does not tell me/us what the switching configuration may be or even if all of the pins are actually used. With four pins there are several switching configurations that are possible:SPST (Single Pole - Single Throw)SPDT (Single Pole - Double Throw)SP3T (Single Pole - 3 Throw)(not likely but possible)DPST (Double Pole - Single Throw)In some of these the pins may be doubled up with internal shorts. Also in some of them one or more pins may have no connection. This may have been done to have the pins there for a better mechanical mount.You can easily determine the switching arrangement inside the switches with a multimeter, using the resistance scale or the continuity setting. I believe you marked the pins as A, B, C, and D. Start with the meter connected to pins A and B and note the reading. Call this by the switch position as "Switch 1". It should be either close to 0 Ohms (closed circuit) or infinity (open circuit). Now, with the meter probes still connected, change the button to the opposite setting and again note the reading. Call this by the switch position as "Switch 2". Keep track of the current switch position. These readings tell you something about pins A and B.Switch 1 = 0 OhmsSwitch 2 = infinite OhmsA and B are switched with Switch 1 being the ON state.Switch 1 = infinite OhmsSwitch 2 = 0 OhmsA and B are switched with Switch 2 being the ON state.Switch 1 = 0 OhmsSwitch 2 = 0 OhmsA and B are NOT switched and they are connected internally.Switch 1 = infinite OhmsSwitch 2 = infinite OhmsA and B are NOT switched. By itself this does not tell you if those pins are in use or not.That test tells you a bit about the switch. Now you must repeat it for the other five combinations of the terminals:ACADBCBDand CD.Once you have the above information on all of those pairs of terminals, you can determine the internal configuration with a bit of logic. If you have difficulty interpreting the results of these tests please post the readings and I/we will help.

author: Winfried
author_rank: Contributor
timestamp: November 22, 2022, 06:05:59 pm
content: Thanks for the infos.This is what it looks underneath, and this is the multimeter I have — which I barely know how to use.I set to 2k Ohms and touched the pins but it only says "1". The switch is tiny and it's hard to hold it down to measure things.

author: jpanhalt
author_rank: Super Contributor
timestamp: November 22, 2022, 06:54:32 pm
content: The bottom of that switch seems to show which pair pins are connected. If it reads "1" always, that may mean open circuit, but more likely you have set something up wrong. Get small micro clips/grabbers to hold onto SMD pins.

author: wasedadoc
author_rank: Super Contributor
timestamp: November 22, 2022, 07:40:26 pm
content: Those switches look like "push on, release off" types. Meaning that they only connect while the button is pushed. If they are indeed that type, are they really suitable for your intended purpose?Almost always with those little 4 contact switches there are two pairs of commoned contacts. The two of each pair will always show zero ohms. Testing between either of the two in one pair and either of the two in the other pair will only show zero ohms when the button is held down. If you cannot determine the pairs, using two diagonally opposite pins will work as the switch.But as I already wrote, if you want an on-off switch that disconnects the battery from your device, you will probably find those switches are not suitable. They appear to be the same as those on the RaspberryPi Pico board.

author: Winfried
author_rank: Contributor
timestamp: November 23, 2022, 02:07:59 pm
content: I can hear a click when I push the button.I chose those because they're very compact, but maybe they weren't a good choice :-/How should I set the multimeter before touching one pin with the red tip and another with the black tip to figure it out?

author: wasedadoc
author_rank: Super Contributor
timestamp: November 23, 2022, 03:10:20 pm
content: The click is not significant. It does not prove or disprove anything.Turn the knob to the 9 o'clock position. Touch the probes together and you should hear the beeper sound. You can concentrate on touching the switch pins while pressing the button without needing to look at the meter.

author: Winfried
author_rank: Contributor
timestamp: November 24, 2022, 02:55:39 pm
content: After turning the dial to 1,5V, there's no sound but maybe that meter has no beeper.Using other switches I bought, with only two ends: When touching one end with the red probe and the other with the black probe, it only shows "0.00", no matter the position of the switch. Same result when setting the meter to 20V DC.I'll drop by a fablab and ask the experts.Thanks for the help.

author: wasedadoc
author_rank: Super Contributor
timestamp: November 24, 2022, 03:23:26 pm
content: Quote from: Winfried on November 24, 2022, 02:55:39 pmThere is no 1.5V position on the meter in the picture you posted. If that is the meter you have, turn its knob two clicks clockwise from the position shown in the picture.That meter comes with a good manual. Look for the instructions about "Continuity". Section 7.8 in the language section you prefer, even German. If you lost the manual you can download from Lidl's service site. Put IAN308530 in the search box.I'm 99% sure that all four of those switches are non-latching. Same as a door-bell button switch that only rings the bell when the button is pressed. Let the button go and the bell stops. Same with those switches. You need a switch that can stay in both on and off positions. Like a light switch or the plunger at the top of a retractable ball point pen. I have neve seen a switch which works like that in such a small size as those in your photo.

author: jpanhalt
author_rank: Super Contributor
timestamp: November 24, 2022, 04:03:18 pm
content: Maybe a picture will help. Turn the pointer to the lime-color circled position.

author: tooki
author_rank: Super Contributor
timestamp: November 26, 2022, 05:57:46 pm
content: Quote from: EPAIII on November 22, 2022, 02:18:24 amWhile everything you wrote is technically correct, when is the last time you encountered a tact switch that was anything other than SPST NO momentary? (Yes, other types exist, but are specialty parts you have to seek out.) Other switch configurations are common on other types of switches (non-tact push buttons, rocker, toggle, slide, etc), but in tact switches, SPST NO momentary is the norm.Consequently, I think you might just be confusing the OP unnecessarily. The chances that their button isn’t SPST NO momentary are vanishingly small.

author: tooki
author_rank: Super Contributor
timestamp: November 26, 2022, 06:09:38 pm
content: Quote from: Winfried on November 24, 2022, 02:55:39 pm1.5V is almost certainly a battery test function. You need either continuity test, diode test, or ohms measurement mode.But I’m guessing that you want to use your switch as a latching on/off switch, right? (Latching = press once to turn on, press again to turn off.) Then it’s probably not what you’re looking for. Those little tactile switches aremomentaryswitches, meaning they close the circuit only while you hold the button. As soon as you release it, the circuit opens again. Tact switches are also not designed to switch large amounts of current. The size you have is typically rated for 50mA maximum, while a typical ESP32 dev board draws around 60mA already, unless you remove the LED and change some power settings, and if you attach peripherals, you could draw much more. (The on-board regulators of most ESP32 boards can supply up to 800mA, far beyond what your switch could survive.)

author: EPAIII
author_rank: Super Contributor
timestamp: November 29, 2022, 05:22:33 am
content: Perhaps so, but I was trying to cover all the bases.I think our OP could benefit immensely from a few hours spent reading an elementary book on electricity. He can probably find one at a local library. Then a few more hours with an elementary one on electronics.Quote from: tooki on November 26, 2022, 05:57:46 pm