Author Topic: Wiring 4-pin push button in Kicad  (Read 14646 times)

0 Members and 5 Guests are viewing this topic.

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Wiring 4-pin push button in Kicad
« on: September 05, 2023, 12:01:34 am »
Do I have the wrong footprint for my 4 pin push button? The wiring looks wrong to me, but the rats nest wants me to connect it this way, per the screenshot attached.


This is the push button style I'm using https://www.amazon.com/GZFY-6x6x4-5mm-Momentary-Tactile-Button/dp/B01N6GU7TA

 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 12463
  • Country: us
    • Personal site
Re: Wiring 4-pin push button in Kicad
« Reply #1 on: September 05, 2023, 12:28:57 am »
Looks correct to me. What specifically looks wrong to you?
Alex
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 15871
  • Country: ch
Re: Wiring 4-pin push button in Kicad
« Reply #2 on: September 05, 2023, 01:04:40 am »
Do I have the wrong footprint for my 4 pin push button? The wiring looks wrong to me, but the rats nest wants me to connect it this way, per the screenshot attached.


This is the push button style I'm using https://www.amazon.com/GZFY-6x6x4-5mm-Momentary-Tactile-Button/dp/B01N6GU7TA
Just use a continuity tester to verify which pins of your switch are bridged when the switch isn’t pressed. It should match the pins shorted in the rats nest.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2430
  • Country: pl
Re: Wiring 4-pin push button in Kicad
« Reply #3 on: September 05, 2023, 03:45:34 am »
Short answer: it is ok, but check as indicated by ataradov.

Longer answer:

Bad news: each manufacturer’s may make their switches as they wish. That is for both wiring and their operation. One should consult the documentation, which in the case of NoName brands is impossible and may differ from batch to batch. This seller did not even mention, what kind of switch this is.

Good news: NoName brands sold by random vendors on eBay/Amazon/… are normally SPST-NO switches between two pairs of pins. They are copied from popular series from other manufacturers and virtually all manufacturers use (1,2) - (3,4) configuration, pin counting nort-west, north-east, south-west, south-east looking from the wider side. See the attachment for a few examples.

Conclusion: if your tact switches follow the universally found layout, you are good. Two top pins are shorted, two bottom pins are shorted, and the switch connects these two pairs. While not ordering specific models from known brands with datasheets, check each batch before use. I never encountered a different layout myself, but this possibility can’t be exluded.

My guess regarding the layout is the ease of manufacturing. It seems easier to make and assemble a switch from two strips of metal than having to deal with separate elements for each pins pair or two weirdly shaped strips on each side.

« Last Edit: September 05, 2023, 03:54:29 am by golden_labels »
Why 📎 | We live in times when half of people have IQ below 100.
 

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Wiring 4-pin push button in Kicad
« Reply #4 on: September 05, 2023, 05:03:22 am »
I used the DM in continuity mode to find which pins cause the circuit to close when the switch is pressed. Unfortunately this means that the footprint is not correct because the pins will no longer fit my board unless bent. Where can I find decent SPST-NO switches for sale? For the life of mine I can't find them on mouser or digikey, all I find are industrial size switches which is why I purchased mine off Amazon.
Even with this adjustment the switch doesn't work in my circuit though.
« Last Edit: September 05, 2023, 05:05:08 am by newtekuser »
 

Offline Zoli

  • Frequent Contributor
  • **
  • Posts: 789
  • Country: ca
  • Grumpy old men
Re: Wiring 4-pin push button in Kicad
« Reply #5 on: September 05, 2023, 05:17:28 am »
...
Where can I find decent SPST-NO switches for sale? For the life of mine I can't find them on mouser or digikey, all I find are industrial size switches which is why I purchased mine off Amazon.
...
Digikey call them "tactile switches":
https://www.digikey.com/en/products/filter/tactile-switches/197
 

Offline Shonky

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: Wiring 4-pin push button in Kicad
« Reply #6 on: September 05, 2023, 05:27:12 am »
Your switch will only produce a very short low going pulse when pressed. Once the cap charges the IO line will be high again. The time constant is only 100us. Unless you edge trigger the input you really have no chance of detecting the pulse.

I suspect you want the switch in parallel with the cap.

Also every tact switch I've seen has the pins commoned on the long side as per your PCB layout. Are you sure you've buzzed it out right?
« Last Edit: September 05, 2023, 05:31:20 am by Shonky »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 12463
  • Country: us
    • Personal site
Re: Wiring 4-pin push button in Kicad
« Reply #7 on: September 05, 2023, 05:34:32 am »
I think you are missing something. This is the most common button type and the most common pinout. What is not correct about it?

And yes, your schematic looks incorrect.
Alex
 
The following users thanked this post: tooki

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Wiring 4-pin push button in Kicad
« Reply #8 on: September 05, 2023, 05:41:28 am »
Your switch will only produce a very short low going pulse when pressed. Once the cap charges the IO line will be high again. The time constant is only 100us. Unless you edge trigger the input you really have no chance of detecting the pulse.

I suspect you want the switch in parallel with the cap.

Also every tact switch I've seen has the pins commoned on the long side as per your PCB layout. Are you sure you've buzzed it out right?

I'm 100% positive on the pins after checking them with the DM, the short side are commoned on these ones and won't fit into the holes of my board  :-//
Also, on my breadboard I have the 10nF caps in series with the 10K resistor which are connected to +5V (circuit works fine on the breadboard which makes me think I may have screed something in kicad which later translated to a bad  non-functioning board).
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 12463
  • Country: us
    • Personal site
Re: Wiring 4-pin push button in Kicad
« Reply #9 on: September 05, 2023, 05:48:41 am »
What is "the short side" and what is "commoned"? You are 100% wrong, and it is hard to tell what you are measuring wrong. Nobody is going to make buttons not like the others, all buttons of this type have the same pinout.
Alex
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2430
  • Country: pl
Re: Wiring 4-pin push button in Kicad
« Reply #10 on: September 05, 2023, 06:40:41 am »
Please take a picture and mark, where you connected the multimeter. Or use the picture from Amazon. Just mark, where exactly did you connect the multimeter.

Also, to clarify: you did the measurement on the element itself, not while it was in circuit? Right?
Why 📎 | We live in times when half of people have IQ below 100.
 

Offline Shonky

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: Wiring 4-pin push button in Kicad
« Reply #11 on: September 05, 2023, 07:10:20 am »
I have introduced the short and long side terminology (just how I remember these switches). The main body is square. The short sides are the sides with pins ie the pins are closer together.

Your schematic matches the PCB for the circuit. However the design as is, is not a good design for debouncing IMO. I doubt your breadboard is the same. Like the switch, take a photo.

It's much easier for those with experience to tell from pictures, particularly as your terminology is a bit off.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6919
  • Country: es
Re: Wiring 4-pin push button in Kicad
« Reply #12 on: September 05, 2023, 08:27:05 am »
The resistor and the cap are placed wrong!
Also, better to not short a cap directly with the switch, even 10nF can discharge several amps for microseconds, this will wear/damage the switch contacts over time.
It's a great way of adding obsolescence to your product, though. New button board every few months/years depending on usage :).




And the footprint is OK:


« Last Edit: September 05, 2023, 08:34:21 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: newtekuser

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1730
  • Country: gb
Re: Wiring 4-pin push button in Kicad
« Reply #13 on: September 05, 2023, 01:24:24 pm »
I find that using either pair of diagonally opposite pins of those switches always succeeds.
 
The following users thanked this post: Jacon


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf