I have an LED wired to the digital side car power and ground pins. I want to be able to turn it on/off programatically, but it always stays on. I am using Labview to open a digital output sand setting it to false, but the LED is always staying on.
I have the jumper on the DSC’s port.
What am I ding wrong? Should the LED be wired to the ground and signal pins?
The power stays on. Only the signal turns on/off. Whether or not the LED will illuminate when you connect it between signal and ground depends on how much current the LED requires to illuminate, and how much current the signal can source. What’s the part number of the LED?
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
Reversing polarity on a LED will not damage the LED (or the Digital Sidecar, for that matter) – it will simply not night. LEDs are diodes. Feeding them too much power, however, can make them pop.
Only reason I said that is because I actually did make one pop when I wired it backwards.
And like flameout said it won’t hurt the sidecar or the LED at that voltage. An LED is a diode so it only lets current through in one direction and also happens to light up.
Caution: the above is true only if driving the LED with a source whose open-circuit voltage is less than the reverse voltage which would damage the LED.
A high voltage high impedance source might work fine in the forward direction but damage the LED if polarity is reversed.
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.
Sounds to me like the output impedance of the DIO signal line is too high to provide enough current to light the LED (as mentioned in my earlier post).
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.
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.
Your application is really light load and low voltage, so most FETs will work fine. Here are the general things you look for:
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.
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