2
\$\begingroup\$

I need a fast (100kHz) switching on-off LED driven with a constant current. With an OpAmp (TL082) and a p-channel SIPMOS (BSS84P) I get a fixed current source. I then placed a n-channel enhancement mode MOSFET (BSS123) and drive the gate with the output of a controller. To limit the current, I have a 100E resistor (R3) in front of the gate. Please see the appended schematic.

What I see is that the BSS123 switches far too slow. While the signal at the gate switches very fast (fall time is approx. 150ns), the voltages measured at D1 rises in approx. 100us (see picture below). I thought that R2 influences the speed, but it has no impact at all, I see the 100us with 50E and 200E. The BSS123 has a low input capacitance of 60pF maximum, and the switching delays as of the datasheet are a few ns.

What is also strange for me is that the voltage rises linear.

Probably I am missing an important point. Thanks!

a busy cat

a busy cat

\$\endgroup\$
  • \$\begingroup\$ Hi, I've been reading your question but there are two things I don't understand: 1) Why is there a capacitor in the negative feedback of the op amp? 2) How is U1A and T1 providing fixed current? 3) Why did you put T2 in your circuit? What purpose does it have? 4) Is Vin AC or DC voltage? I've been trying to simulate your circuit with the exact same components but the LED does not turn on and I'm not sure what I'm doing wrong. Thank you! \$\endgroup\$ – Eran Apr 20 '18 at 16:24
  • 1
    \$\begingroup\$ Hi! C1 is only for stability, you can remove it. This is just a standard circuit for a current source, you can find many information when searching with for example google for "current source op amp transistor". T2 is there because I want to pulse the LED, signal LED_CLK1 defines when T2 is conduction and when not. VIN is a fixed voltage that defines the current one wants to have. Best regards! \$\endgroup\$ – STB Apr 23 '18 at 9:42
2
\$\begingroup\$

I'm not sure at what constant current you are driving your LED, but you have a 100 nF capacitor there. A constant current into a capacitor results in a linear voltage increase.

You might want to check if the math checks out.

The ramp looks like 4 V in 100 µs. So if I'm not doing it wrong:

$$ I = \frac{C*U}{t} = \frac{100 \text{nF}*4 \text{V}}{100 \text{µs}} = 4 \text{mA}$$

Sounds reasonable for a small LED - but at that drive level I'd probably not go through the trouble of a constant current source.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks! Yes you are right. I was completely fixed to a problem with the MOSFET. \$\endgroup\$ – STB Apr 19 '18 at 12:43
  • \$\begingroup\$ The currents are small. I have several LEDs in parallel that must be driven with different variable currents. \$\endgroup\$ – STB Apr 19 '18 at 12:45
  • \$\begingroup\$ @STB ah if the current has to be variable then this approach makes more sense, yes. \$\endgroup\$ – Arsenal Apr 19 '18 at 13:20
1
\$\begingroup\$

The rise time that you see on the LED voltage turn on is entirely due to the capacitor across the LED. When the LED_CLK signal turns off the BSS123 the capacitor will charge to the LED forward voltage. It charges in a linear manner due to the constant current source. If you want the the turn on of the LED to be more of a square wave then remove the capacitor.

The LT-Spice simulation below shows this result.

enter image description here

Note that in the simulation I placed the V3 voltage source in the way it shows because its voltage level directly translates to milliamps of current from the current source.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ +1 for effort with simulation \$\endgroup\$ – Arsenal Apr 19 '18 at 13:19
0
\$\begingroup\$

What is also strange for me is that the voltage rises linear.

T2 shorts C2 (100nF), so when T2 no longer conducts, the current source has to charge C2 up to the LED forward voltage... I'm going to bet that the ramp-up time you see on your screen is due to "i=C dv/dt" with C=100nF and i=your current value.

Fix: get rid of C2. The diode's parasitic capacitance may still slow down rise time, though, depending on its value.

If the accuracy of the current isn't that important, but you really want fast turn-on and turn-off, you can try something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

BUF would be a logic gate with suitable voltage and drive strength like 74AC. R1 sets the current. C1 should be roughly equal to the LED's parasitic capacitance (LedCp on schematic) to compensate for it and reduce the RC charging delay.

If you need really accurate current, please give more info.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks! As I read "C1" in your answer all is clear. I was so fixed to a problem with the MOSFET... \$\endgroup\$ – STB Apr 19 '18 at 12:42
0
\$\begingroup\$

Instead of a parallel capacitor C2 which is causing your problems, consider a series inductor that will help maintain the constant current.

Then you just short the LED with T2 to turn it off.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.