-1
\$\begingroup\$

I recently asked this question where I'm trying to wire up this momentary switch to my Raspberry Pi 1 Model A such that:

  • The switch is normally open; and
  • When pushed down: it closes the circuit, lights up and fires a HIGH signal to a GPIO input pin (GPIO 04 in my case); and
  • If needed, I can make the GPIO 07 pin an output pin and make it available to help run the light/LED inside the switch, but not sure if that's needed

The answerer to that question called out that I need a 6VDC power source for this button, because the RPi (which provides both 3.3VDC and 5VDC pins) is not enough for this switch.

I'm wondering what I could use to provide this 6VDC power. According to Wikipedia, AA batteries provide around 1.5V each. So I'm wondering if I could use a battery holder like this one to use 4 AA batteries (1.5V x 4 = 6VDC) to power my button, or whether that would provide too much or too little voltage/current. Either way, what is a safe & efficient (energy-wise and financially-speaking!) to power this switch?

\$\endgroup\$
1
\$\begingroup\$

All mechanical contact switches have a plating material designed for a specific voltage and current.

There are two basic categories:

  • <= 2A implies gold plating for microamp circuits so that oxidation leakage is not an issue.
  • ">"2A implies silver/copper/paladium/tungsten combinations over nickel or similar

Since this switch is an industrial type rated or 2.5kV we can assume it is the latter > 2A so we must supply a wetting current to burn off contact oxides. I learnt how to solve this problem 40 yrs ago with power relay contacts that had a sense relay contact that would fail from a reputable source P&B. Normally you need 10% of rated current occasionally to prevent oxidation build up so the contact arc burns off the oxide.

The solution is to use a tantalum or any low ESR Cap ~0.1 ohm with > 10uF accros the switch between Vdd and logic input with a 100k pull down resistor or whatever is needed to satisfy your logic input. This RC=T time constant needs to be long than the bounce time, which is undefined and may be 20 ~100ms for a large switch. So choose wisely and test it to verify bounce time and give it 2x margin.

e.g. C>=10uF to Vdd , Rpulldown <100k

\$\endgroup\$
  • \$\begingroup\$ Thanks @Tony (+1) but I'm kind of shocked by your answer...it almost sounds like you're saying that I have to wire up my own power connector in order to deal with the switch that I'm using. I figured that Omron would provide a suitable/compatible 6VDC power supply to work with their own switches...is that not the case? \$\endgroup\$ – smeeb Oct 9 '17 at 18:28
  • \$\begingroup\$ Not really they offer LEDs with different R ratings for switching industrial AC voltage or 6Vdc. You on the other hand are using for uC. The internal 10K is only needed for >=100V I have no idea what you are switching but it appears to be logic level only. \$\endgroup\$ – Sunnyskyguy EE75 Oct 9 '17 at 19:00
  • \$\begingroup\$ Hey @Tony what about something like this: amazon.com/NOCO-G750-UltraSafe-Battery-Charger/dp/B004LX3AS6/… would that work? Technically, I need to power two (2) of these switches...could I use this charger to power both of them at the same time? \$\endgroup\$ – smeeb Oct 9 '17 at 19:17
  • 1
    \$\begingroup\$ That does not include a battery. Using 5V on the Omron 6Vdc option just means the 2~3V LED + R uses less current and may be slightly less brighter. So you can use 5V in and 5V out and a USB battery that does same. It has all the converters inside. amazon.com/SKG-Economical-Portable-External-Battery/dp/… I believe you are just using it as a big microcurrent switch with indicator LED, so that should work. But you can also consider 6V Gel cell and many other options. \$\endgroup\$ – Sunnyskyguy EE75 Oct 9 '17 at 20:00
  • \$\begingroup\$ Thanks @Tony I'll give it some thought. Any safe/known way to wire that USB battery (that you posted the Amazon link to above)? Looks like it just has USB/MicroUSB ports on it...so sounds like I'll be cutting the connectors off, stripping the USB wire and doing some kind of hackery maybe? \$\endgroup\$ – smeeb Oct 10 '17 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.