SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By joshuaKane
#181546
Hello,

I was interested in using some of these buttons in a project I was working on with an Arduino. Looking at the data sheet there are four metal tabs for the "Switch" and two for the "LED" What is the recommended way to hook these up so that that the LED is lit up? I would guess that I could hook the switch pins up on one side of the button. One running to the Pin on the Arduino (SWITCH Signal) and another to the Ground (GROUND Signal) and then power the LED from the top and bottom pins.

Also I came across this picture, how is this switch wired? There appears to be a resistor tying the switch to the LED.

Image

Thanks,

Joshua
By n1ist
#181559
Got to love useless data sheets... The way it is wired in the picture is that the red wire connects to one side of the switch, and to the LED through the resistor. The black is the other side of the switch, and the green is the other side of the LED.

Since the data sheet doesn't bother to mention LED polarity, I would guess the red wire is +5, green is GND, and black is contact, though that would require an external pulldown on the switch. More likely, red is GND, green is +5, and black is contact, and you can use the on-chip pullup on your micro.

/mike
User avatar
By Ross Robotics
#181580
It depends on your supply.. My advice is to use a resistor on the positive supply while probing the connections. This way you don't burn the LED..

As for the datasheet, at least they included a Salt Mist Test.. That should come in handy. Really don't know what Sparkfun was thinking.. I thought that SF researched every product and choose these based on certain criteria..?? Guess not.