LED Issue on Button Box

  • Thread starter dirk808
  • 8 comments
  • 4,211 views
5
Australia
Melbourne
Hello All, 1st post..

I made a Button Box using a Generic USB controller, I am dying to ask how you connect your LED lights up, I have 2 LED Lights, 1 for the Pit limiter which I want to put a Flashing LED and 1 for the headlight.

I have them currently connected Direct to the switch but this isnt working, Could anyone offer advice as to how I can get the LED to work so when i flip the switch the LED will come on.


buttonbox.jpg
 
Well the 12v bulb would not have worked well. The 6.3 will be better but I'm not sure how much current it will draw. The best choice would be an actual LED.

Making it blink will be more difficult although you can purchase LED's that blink when powered... You'll have to do some looking. That said... This should be how to wire it with a simple bulb... (sorry for the simple ascii)

Code:
                switch
controller ---- |    | ---- +5v (probably)
                |
                bulb --------- Ground

Wire it so that when voltage is sent to the controller, it's also sent to the bulb. This really isn't the best way to do this, but with the parts you have, it should work fine.
 
Cheers,

I'll try that and see how it goes..

Im probably going to take out the Glode a run LED as they need bugger all power.
 
When you go to an LED, make sure you use a resistor with the LED like this:

Code:
                switch
controller ---- |    | ---- +5v (probably)
                |
                |
                restistor---- LED --------- Ground

Use this to find the proper resistor value http://led.linear1.org/1led.wiz

- For the "Source voltage" put 5v (it's likely 5v, but may be 3.3. If the LED isn't bright, use 3.3 here and recalculate)

- Next to the "diode forward voltage" text, click the "?" There is a list of colors and the common forward voltages. Pick the right one there and use the value in the "diode forward voltage" field.

- For the "diode forward current" field, put in 20

When they say "diode" they are talking about the diode because a LED is a diode. :)
 
Just to explain why a LED is called a led and is thus called a diode. It's simply in the name. ;)

LED = Light Emitting Diode
 
Are the LEDs for those toggle switches? It should be relatively easy to wire them up. If you want a flashing LED you could make your own with a 555 timer in astable mode, if you do that you can control the rate at which it flashes and, if you wanted, you could make it flash asymmetrically, as in the on period and off period could be different. If you want, anyway.

You could also use non-locking switches for LEDs with a flip flop, I guess a T type (a clocked JK flip flop with J and K held high, the button hooked up to the clock input (with a debouncing circuit) and the LED wired to Q).

If you're using the USB connector for power bear in mind you're limited to 5V at a maximum of 500mA, but I'm sure without the illumination you're well within that and common LEDs only draw about 10-20mA. Don't mess around with filament bulbs, they've been replaced by LEDs for a reason, but remember of course that diodes can only be wired one way. You most likely won't kill them with 5V reverse bias so don't worry too much, but don't leave them connected the wrong way for too long; the flat side or short leg is the cathode which goes to ground. Have at least a 330 ohm resistor in series with the LED, too, generally speaking a common LED will require at least that much with a 5V supply. Add more resistance to dim the LED.

Edit: if you want to run a filament bulb you could always use a small 5V relay and hook up a Molex power supply or something, just make sure you have a flyback diode or else chances are you'll kill your board and possibly your USB port. If you don't want any clicking sound effects there may be suitable opto couplers, or maybe just a transistor would do it but that would mean you have to have a common ground between your 5V supply and 12V supply, and I don't know how the USB standard would feel about that.
 

Latest Posts

Back