|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Quote:
However, if I'm reading things correctly, it costs more than five dollars per piece from Digi-Key! A discrete LED and separate resistor are much, much less expensive. Quote:
Different LEDs have different forward voltage drops, and work best at different currents. That's why you will need different resistor values for different colors. Section 3.1.6.2 Driver Station Digital Outputs of the 2009 FRC Control System manual says: "The DS digital output pins are driven directly by 5V transceiver (SN74LVC4245A device). Be sure to use caution as each pin can source/sink more than 40mA. It is possible to damage the device if too much current is driven on a single pin or the total current supplied by the device on all pins is excessive. Best practice should be to use a limiting resistor to prevent external loads from drawing excessive current, especially for LEDs, be sure to use a series resistor to limit the current." The overview of Driver Station ports earlier in the manual also mentions them: "Digital Output pins 5V output level (8) – Provides 5V TTL for interfacing to digital devices and to drive LEDs (with current limiting resistors)." |
|
#2
|
||||
|
||||
|
Re: Wiring LED to Driverstation
Quote:
That Digi-Key part is already wired, big, and ready for panel mounting so I figured why re-invent the wheel if they had a part I could use? :-) So to repeat I go from red 5V from digital output through my LED and then to the signal pin on the digital output? Is this correct? And then my program can turn it off and on by cycling the digital output in code? |
|
#3
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Quote:
The way you connect it should depend on whether you want the LED to be on or off when the system is reset, before the cRIO software has a chance to control it. |
|
#4
|
||||
|
||||
|
Re: Wiring LED to Driverstation
Quote:
Thanks everyone, I imagine with the info here I can get it to work. I'll let you know after I get a chance to try it tonight. I can't exactly bring the control system to work so have to wait till the evening to play with it. |
|
#5
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Quote:
The center pin is 5v. The bottom pin is ground. Wiring from the center pin to ground should leave the LED on constantly. |
|
#6
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Could you point me to something that would tell me what resistances are required for which color? I am not extremely knowledgable about electronics design, but I can wire things up and solder them if given the design. This may be my first foray into design during the off season.
|
|
#7
|
||||
|
||||
|
Re: Wiring LED to Driverstation
Quote:
Suppose you have a typical 5v supply, like on the driver station. Some of that voltage is "used up" by the LED, and some is "used up" by the resistor. The current through both will be the same. If the LED takes 2v, then the resistor takes 3v, to make the total of 5 from the supply. The Voltage/Current/Resistance formula is "V = I * R" (where V = Voltage, I = Current, R = Resistance). In our example, the voltage drop across the resistor is 3v and the current is 30mA (or 0.03A -- always make sure you get your decimal points right). 3v/0.03A = 100 ohms, so you would want a 100 ohm resistor. I picked example numbers to make the math easy. If you get some value for a resistor and can't find common resistors with that value, just pick something close. The brightness of the LED is related to the current through it. If you pick a resistor which is too small, then the current will be higher and the LED will be brighter (and burn out sooner, up to the point of burning out right away). If you pick a resistor which is too big, then the current will be higher and the LED will be dimmer. |
|
#8
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Quote:
Wikipedia has a decent list of colors and voltages here. If you have documentation for your LED, I would go with that, but if you don't this should give you some hints. |
|
#9
|
|||||
|
|||||
|
Re: Wiring LED to Driverstation
Robert,
As you can see from the above reference, most LEDs are near 2 volts when turned on. The exceptions are the blue and white and combinations of those. To make the resistance calculation, subtract the LED voltage from the power supply voltage. In our case, 5volts-2volts(LED)=3 volts. This is the voltage the resistor must drop. A good rule of thumb for most general purpose LEDs is 20ma. Using Ohm's Law solving for resistance R=V/I=3/20ma=3/.02A=150 ohms. 150 is a standard value of resistance but if you can't find one, 180 ohms is also a standard value. Using Ohm's law for current I=V/R=3/180=.016=16ma. Although the LED would be not as brite at 16ma, you might never see the difference. As pointed out in the documentation, the output circuitry is limited to a maximum amount of current so using the 180 ohm resistor is better for the circuit but gives a dimmer output for the LED. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Writing to DriverStation cRio screen | alexjplant | NI LabVIEW | 2 | 17-01-2009 10:59 |
| Wiring an LED from the OI | Windward | Electrical | 6 | 21-01-2007 13:54 |
| Team LED | Gamer930 | Control System | 1 | 18-02-2006 15:57 |
| Led | tyguy2021 | Electrical | 7 | 15-11-2005 21:30 |
| LED Flashlights | Justin | Chit-Chat | 3 | 06-08-2004 05:35 |