Power buttons with LED's

Hello All,

Im very new to this, excited to be part of the community. I built my first project.. which works!! Although, there is one thing i'm a little confused by and need some help.

I am using a teensy 2.0

I built a simple Midi controller with 4 buttons connected to the digital inputs. Simple on/off. The box functions correctly and does exactly what i want it to do.

The four buttons have LED's inside them. They can light up. Link to buttons here (http://www.mouser.com/ProductDetail/E-Switch/PV6F240SS-341/?qs=S%2FCBhQS5rCqnI1hpFigwow%3D%3D&gclid=CJTdiMjgis8CFdgBgQodet8ASA)

Im wondering what is my best way to power these 4 buttons from the teensy 2.0? Can i connect the first button to the VCC on the board and then wire them in series? Is it not as simple as that?

I want it to function, when i plug in the USB, all four buttons light up. I would really rather not have any other power supply as the box is small and is intended for usb bus power only. Can i light these four buttons purely from the teensy?

Thank you so much

The data sheet says about the LEDs

Base voltage for LED colors red, yellow, and orange is 1.8V @ 20mA
Base voltage for LED colors blue, green and white is 2.8V @ 20mA

The teensy has a maximum recommended output of 10mA so you either run those LEDs at low current or you get a transistor to drive them.

How would they physically be wired if I decided to run them at low current?

Gusbert22:
How would they physically be wired if I decided to run them at low current?

In the same way as normal current. A resistor to an output pin the other end of the resistor to the LED's anode and the cathode to ground.
It is the resistor value that determines the current.

I think I understand but the problem is... There are four buttons. So, in the example you stated above... Should I just add the other three led's in the middle? Or wire each one individually from the teensy power point?

I think one LED makes sense, it's once I add 4 l, I'm not sure how to do it...

I think one LED makes sense, it's once I add 4 l, I'm not sure how to do it

You repeat the circuit but on a different output pin. In that way you have full control over what the LEDs do.

Oh ok, ideally i want all LEDs to be constantly lit, no matter what the state of the buttons are. I would love for all 4 buttons to be illuminated always. I figured it would be best to power all buttons from one VCC pin

OK in which case wire it up the same only use the 5V in place of the output pin. Each LED needs its own resistor.

However, the expectation of a user would be that the LED state changes when it it pushed, either for the LED to change state while it is being pushed or that a push and release changes the LED state.

Grumpy Mike,

Could you please look at my attached diagram i made and tell me if it would work or how i would ammend it to make it work?

Thank you

tell me if it would work

It might light up but the current would not be distributed evenly to the LEDs.

how i would ammend it to make it work?

I have told you wire each LED with it's own resistor. So that means not connecting all the LED + lines together but to the power THROUGH a resistor like you have with the one on the right hand side. You also need to connect the LED -ve connector to ground as well as the common connector.

Ok, this completely makes sense now. I guess the only thing i am worried about is how i physically solder 4 resistors onto the tiny VCC pin on the teensy. Is there such a thing that i can solder it to something that i can then connect the four resistors too? Like some sort of 1 input 4 output thing?

If you have one small pin like that, how do you make so many connections to go to all the buttons resistors separately?

Thank you so much for all your help!

how i physically solder 4 resistors onto the tiny VCC pin on the teensy

There are lots of ways. Maybe the simplest is to connect one resistor lead to the teensy pin and then connect the other three resistors to that first resistors wire.

wiring.jpg