|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
|
|
#2
|
||||
|
||||
|
Re: Turning LEDs on/off
I think you are right when you say that you should wire to signal and ground, just don't mix up positive and negative on the LED, they make a nice pop sometimes, you can also run LEDs on spike relays if they are 12 volt
Edit: Also the signal may not carry enough current to power LEDs in which case you should use a spike |
|
#3
|
||||
|
||||
|
Re: Turning LEDs on/off
LEDs from SuperBrightLED
Qty | Product / Options | Price/ea | ================================================== ========== 12 | RL5-G7532: 5mm Green LED | $ 0.54 | RL5-G7532: Green LED ---------------------------------------------------------- Resistors from www.MOUSER.com 299-82-RC 299-82-RC 82ohms Assuming the flat side of the LED is the negative side. Going to try the ground/signal setup now.... thanks |
|
#4
|
||||
|
||||
|
Re: Turning LEDs on/off
Last edited by Ether : 07-07-2012 at 22:13. |
|
#5
|
||||
|
||||
|
Re: Turning LEDs on/off
I used the calculator linked below to determine the resistor. Forward current was 20mA, source voltage was 5v and the forward voltage was taken from the LED specs.
http://led.linear1.org/1led.wiz When I switched to the signal tonight, there was no light when I set the DIO to true or false. When the LED is on power and ground, it comes on Last edited by rsisk : 07-07-2012 at 23:28. |
|
#6
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
Disconnect your LED circuit and put a voltmeter (a cheap $10 one will do) between signal and ground at the DIO output. Flip the DIO true/false and confirm that you are getting 5 volts and zero volts. Now connect your LED circuit (leaving the voltmeter connected between signal and ground). My guess is that you will no longer see 5 volts. The load from the LED acting on the impedance of the signal source will drop the voltage below that necessary to provide the current to light the LED. Last edited by Ether : 08-07-2012 at 00:43. |
|
#7
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
If I use a spike to control it, I assume I will need a different resistor to handle a 12v input? Or I run 5v throught the spike? |
|
#8
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
I'll draw a sketch and post it here in a few minutes. |
|
#9
|
||||
|
||||
|
Re: Turning LEDs on/off
Very cool thanks Ether.
|
|
#10
|
||||
|
||||
|
Re: Turning LEDs on/off
Something like this.
edit: corrected resistor value Last edited by Ether : 08-07-2012 at 03:25. Reason: corrected resistor value |
|
#11
|
||||
|
||||
|
Re: Turning LEDs on/off
When I buy the FET, is there anything specific I need to look for? Probably going to Radio Shack to find one tomorrow. If not available then will probably go to mouser.
|
|
#12
|
|||
|
|||
|
Re: Turning LEDs on/off
Quote:
Type: Your options are "N" or "P" channel. Either can be made to work, but Ether drew the schematic with an N channel. N is generally preferred because they have better electron mobility. Vds: Maximum voltage from Drain to Source, or how much voltage you can block. You need at least 5V, but I've never seen a normal discrete FET with a Vds rating less than 5V. Vgs: Maximum voltage from Gate to Source, or how much signal voltage you can apply. Again, most FETs can handle 5V just fine. Vgs_thresh: Minimum voltage from Gate to Source to guarantee turning on the FET. Most FETs will be in the 1 to 3 V range, so you'll be fine. Rds: Resistance from Drain to Source while on. Subtract this from the 82 ohm series resistor you calculated. It'll be relatively small, you can likely ignore it. Ids: Maximum current from Drain to Source while on. It needs to be more than 20mA. Just about any FET that is big enough to be in its own package can handle this. |
|
#13
|
||||
|
||||
|
Re: Turning LEDs on/off
OK, just got back from Radio Shack trying to get the right components. The transistors were hard to match up, so I got a couple.
One is a MOSFET N-channel transistor and the other is a bag of NPN-Type transistors. I've included pictures below. My guess is the MOSFET is the closest match and where I am starting to build the circuit. Am I correct in assuming the following: Source - The +5V/82ohm/LED side of Ether's diagram Drain - The ground side of the diagram Gate - The DIO Signal/100Kohm side of the diagram Here are the components I purchased, 100K-ohm resistors, MOSFET transistor, and NPN transistors ![]() And the back of the MOSFET transistor and NPN transistor bag ![]() ![]() |
|
#14
|
|||||
|
|||||
|
Re: Turning LEDs on/off
The DSC Digital I/O does not appear to be able to sink 20 mA.
Ether's transistor switch should work fine. A FET (especially an IFF510) may be overkill, a plain NPN switching transistor will be fine. All these parts (resistors, 2n2222 or 2n3906 transistors) are available at Radio Shack. Last edited by DonRotolo : 08-07-2012 at 15:22. |
|
#15
|
||||
|
||||
|
Re: Turning LEDs on/off
source (in this case)
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|