|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
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. |
|
#2
|
||||
|
||||
|
Re: Turning LEDs on/off
source (in this case)
![]() |
|
#3
|
||||
|
||||
|
Re: Turning LEDs on/off
Quote:
|
|
#4
|
||||
|
||||
|
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? |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
||||
|
||||
|
Re: Turning LEDs on/off
While we're on the subject of series resistors for the signal line, attached is a sketch of the circuit using one of those NPN transistors you got in the package you bought (2N3904). Can someone please check my calculation for the base resistor? I tried to size it to saturate the transistor with a 5V signal. |
|
#7
|
|||
|
|||
|
Re: Turning LEDs on/off
100K is extremely conservative. I generally put as large an R in series as I can get away with for a given switching speed, others will put as small an R in as necessary to damp gate ringing. For reference, I'm putting ~5 ohms in gate series for a 400kHz switcher for a hobby project.
So, the PM Ether quoted explains why a resistor is necessary. The reason it is so much larger than you might expect is just to over-protect the gate. It costs the same and lets you rest a bit easier. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|