|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
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 ![]() ![]() |
|
#5
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
The gate is connected to the signal, as you said. So in the sketch I posted earlier, the source is on the bottom of the FET, and the drain is at the top. See annotated sketch attached. Last edited by Ether : 08-07-2012 at 14:11. Reason: added annotated sketch |
|
#6
|
||||
|
||||
|
Re: Turning LEDs on/off
Thanks for that timely information, just starting to put this thing together.
|
|
#7
|
||||
|
||||
|
Re: Turning LEDs on/off
Maybe it's just my connection, but my DNS can't resolve rsisk.com:
|
|
#8
|
|||
|
|||
|
Re: Turning LEDs on/off
It resolves for me, that FET will work fine. It is a beefy fellow.
An easy way to figure out which way to orient a FET is to look at the arrow in its schematic symbol, as it (sort of) represents the FET's bonus parallel diode. You want this diode to oppose normal current flow, or else it will always allow it and you won't be able to turn the flow off. In your symbol it points from the source, so you want normal current flow to go the other direction (from the drain). Sometimes they draw the diode more explicitly, I've seen it several ways. |
|
#9
|
||||
|
||||
|
Re: Turning LEDs on/off
I just ran tracert from a web server and it found it:
216.86.200.206 I'll try that... edit: got it, using http://216.86.200.206/electronics1s.jpg weird. Last edited by Ether : 08-07-2012 at 15:15. |
|
#10
|
||||
|
||||
|
Re: Turning LEDs on/off
Rick, just a heads-up: be careful with the part number 276-1617 package of 15 NPN transistors.
According the the reviews here (scroll down), the package may contain PNPs instead of NPNs. And if they are NPNs, the pin labeling on the package may be wrong. Check the datasheets. ... and let us know when you get that MOSFET working. |
|
#11
|
|||||
|
|||||
|
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. |
|
#12
|
||||
|
||||
|
Re: Turning LEDs on/off
source (in this case)
![]() |
|
#13
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
|
|
#14
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
So, I have too admit I am feeling pretty foolish, and I want to get this in the thread for accuracy, as I was working on the wiring for the circuit, I pulled up the specs on the DSC and figured out I had the LED plugged into the PWM instead of the DIO. Moving the LED to the DIO power/ground and turning in on/off via the Digital Output works just fine. Sorry for the diversion and thanks for the info n making the switch. Now I want to try out the switch to see if I can mAke it work. Question: why was a 100K ohm resistor used on the gate? |
|
#15
|
||||
|
||||
|
Re: Turning LEDs on/off
Credit for the following answer goes to Eric VanWyk:
The purpose of the 100K resistor is to dampen electrical oscillations. The gate of the FET has some capacitance. The wiring leading to the gate pin may have some inductance. Under certain circumstances, together these may form an LC oscillator. The resistance is there to prevent those oscillations. The 100K is not critical. It can probably range over an entire order of magnitude. The higher the resistance, the better the damping, but the slower the FET's response to a step input signal (because of the gate capacitance). The lower the resistance, the faster the FET responds to a step input signal, but you increase the chances of oscillations. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|