# Tactile switch wiring question



## jbflyfshr (Jul 24, 2006)

Hey all,

got my tactile switches recently and was trying to test the LED and see how things worked and can't seem to get anything to work no matter what battery I try.

Even tried a triple AAA to get it to fire and nothing. Any ideas on what I am doing wrong?

JB


----------



## znomit (Dec 27, 2007)

jbflyfshr said:


> Hey all,
> 
> got my tactile switches recently and was trying to test the LED and see how things worked and can't seem to get anything to work no matter what battery I try.
> 
> ...


More details please.
Battery, number or leds, driver, switch?


----------



## jbflyfshr (Jul 24, 2006)

Sorry,

I mean it is an illuminated tactile switch that I will be connecting to a hipflex driver eventually (don't have it yet).

I wanted to test the switch itself to make sure the led in it was working so I was wondering if I could mock up something to test it.

My attempts have failed so far since I SUCK at electronics in general...

Is the led part wired separately? If so how?

My questions always come out wonky :madman:

here is the diagram which didn't clear anything up except I know The 1,2 pins are connected and 3,4 pins are connected.When the button is pressed, 1,2 pair connect 3,4 pair.


----------



## davep (Mar 11, 2005)

Can you dig up the documents for the switch? It should give you connectivity, voltage, and current requirements/maximums for the LED somewhere. May take some googling (do you have a mfg name or model number for the switch?).


BTW. directly connecting a battery to the LED in the switch will cook the LED (you wont even see it turn on). You will need some way to limit the current....like a 1K Ohm resistor (find the max current for the LED and use V=IR). LEDs are also polar..that is, unlike an incandescent bulb, they have a positive and negative lead, and you will need to figure out which is which.


----------



## yetibetty (Dec 24, 2007)

jbflyfshr, not a wonky question more like a wonky diagram.

I think that the pins I've marked are for the LED inside the switch. I'm not 100% sure so test with very low voltage like a watch battery.


----------



## znomit (Dec 27, 2007)

yetibetty said:


> I think that the pins I've marked are for the LED inside the switch. I'm not 100% sure so test with very low voltage like a watch battery.


I think thats correct.

The indicator led needs at least 2V to light, maybe closer to 3 depending on the colour, so a single AAA wont be enough 
Hook up 2 AA/AAA batteries and a 1k resistor to test.


----------



## jbflyfshr (Jul 24, 2006)

Do I run the switch and the led off the same wires in series or parallel? Or do I need to power it off of a different source from the driver?


----------



## yetibetty (Dec 24, 2007)

I assume that you want it wired so that the switch LED will act as a status LED (low battery warning etc).
If so then the hipFlex driver has its own output points for a status LED.


----------



## znomit (Dec 27, 2007)

jbflyfshr said:


> Do I run the switch and the led off the same wires in series or parallel? Or do I need to power it off of a different source from the driver?


See emptyvoxels diagram here for the maxflex, 
https://forums.mtbr.com/showthread.php?t=583329

Also see the taskled Hookup information:
https://www.taskled.com/techhipflex.html

_"The STAT pin can be wired the the cathode of a status LED. The anode of the LED should be wired to a current limiting resistor and then to IN+. It is the user's responsibility to calculate the necessary resistor value to limit the current to the LED. The resistor value can be calculated using the following equation.

Resistor_value = (VIN - STAT_LED_Vf) / STAT_LED_CURRENT

As an example, for 10mA to a Red LED with Vf of 2.5V and running from 16V battery:

Resistor_value = (16 - 2.5) / 0.010 = 1350 ohms.

The SWA hole is one side of an external momentary action switch. The other side of the switch must be wired to SWB (which is electrically the same as IN-). The switch only switches a control signal and carries at most 350microamps."_









Wherever you got your switch from there should be a datasheet showing which is the +/- pins for the status led.


----------



## HuffyPuffy (Jun 9, 2008)

Hi jbflyfshr, would you mind sharing the source for those, they look pretty cool. I did a quick scan of Mouser and did not see anything similar. Thanks!


----------



## jbflyfshr (Jul 24, 2006)

They were an ebay purchase. that is why I am looking for more insight. The only data was what he put on the listing...

I have asked for a data sheet but I don't think he has one. If anyone knows the OEM that would be great. I have looked a bit with no success.

see here

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=270509541524&ssPageName=STRK:MEWNX:IT


----------



## znomit (Dec 27, 2007)

!!!


----------



## HuffyPuffy (Jun 9, 2008)

jbflyfshr said:


> They were an ebay purchase. that is why I am looking for more insight. The only data was what he put on the listing...
> 
> I have asked for a data sheet but I don't think he has one. If anyone knows the OEM that would be great. I have looked a bit with no success.
> 
> ...


Thanks! I have some project ideas those could be good with.


----------



## jbflyfshr (Jul 24, 2006)

I noticed it gives the data on the listing but I don't have any way to limit my power to .5ma to make sure they work. I guess I will figure what resistor I need and go tomorrow and get one at the local electronics supply.

my initial question was in part so I could click the switch and when the light was powered on, the led would be on and when you power it down, the led would be off. I don't think it is how that will work. I think it will be a status light only when the batt gets low? Or could I wire the led in series with the switch to get what I want...

Still ask questions wrong it seems...


----------



## MtbMacgyver (Jan 23, 2007)

This is a momentary switch that will only pass power when it's actually pressed. If you're connecting the switch to a hipflex, then it essentially becomes an input to the micro-controller on the hipflex. You can't wire the led into the switch circuit directly for a couple of reasons. First, current will only flow when the switch is actually pressed and I doubt you want the LED to light just while the switch is depressed. Second, the switch simply grounds a pull-up resistor that creates the input to the micro-controller. The currents involved in that circuit are not high enough to actually light the led in the switch. 

In a setup like this, using the status LED output from the hipflex is about the only thing that makes any sense. Unless you're going to build some additional circuitry to drive the LED for some different function. But the first step in something like that is to decide what function you want the LED to perform.

If you simply want to test the LED. Then connect a current limiting resistor, the switch LED, the switch contacts, and battery all together in series. Then the LED will should light while the switch is pressed. Select a value for the current limiting resistor that'll give you 10ma. For a 3V power source that would be a 160 ohm resistor.

If you're already hooked the LED to a battery that's over the Vf of the LED without a current limiting resistor, there's a good chance the LED is fried. Vf for these types of LEDs is typically 1.3-1.4 volts.


----------



## jbflyfshr (Jul 24, 2006)

if I fried one switch, it will still work as a momentary right...

Still have 3 more. I will try your recommendation tomorrow and hopefully just make sure things are working.

Thanks MtbMacgyver. I understand why it is a 'momentary' switch. Ding what's my prize? Here's my sign


----------



## Vancbiker (May 25, 2005)

jbflyfshr said:


> if I fried one switch, it will still work as a momentary right...


You probably did not fry the switch, just the LED. The easiest way to understand what you have, is to think of it as 2 devices in one housing. You have a momentary pushbutton switch and an indicator LED. Other than the fact they are mechanically in the same housing, they are electrically 2 separate, unrelated, devices.

Do you have a multimeter? If you do, does it have a diode test mode ( diode symbol on the dial)? If it does you can use that to test the LED in the switch housing just like in the picture posted by znomit.


----------



## jbflyfshr (Jul 24, 2006)

Yep have a multimeter but never really knew how to use it...

thanks for clearing up another electronics question for me.

JB


----------

