Hi, post a CAD or pic of a hand drawn circuit of your existing circuit, you may just have a value or component placement as your problem with it being slow to turn off.
Have you got a 10Kohm resistor between gate and source to make sure gate turns off?
I tried lowering R10 to 1.5k
makes no difference to the results
when ON the voltage rises to 20 volts very quickly (the label is wrong it's driven by 20 volts
when turned OFF it drops to about 10 volts
I'm driving it PWM so it never gets below 10 volts before being switched on again
odd thing is the LED brightness looks about right :scratches head:
Hi, take R8 out of circuit.
It with R9 is keeping the T1 ON.
Disconnect L1 from base of T1 and fitt a 1K between T1 gate and L1, this will limit the current into the base of T1.
Do not be surprised if T1 that you are using is now faulty, you should have somesort of current limiting in this config to the base circuit.
Sorry Lq1 is connected to an opto coupler, t'other end to ground
So the base of the transistor is biased on, and pulled low by L1
Tried removing R9, no change
<<I'm driving it PWM so it never gets below 10 volts before being switched on again
odd thing is the LED brightness looks about right :scratches head:
oh and the MOSFET is staying completely cold >>
LED are nonlinear, perhaps it is so with voltage under 10 volts the current are almost zero and with a small cap the voltage stay at 10 volts under the off period.
Your MOSFET are cold and that's indicating low switchlosses.
Replace the LED with an resistor and measure again.
Hi, okay on the opto.
This makes the PWM act in reverse,
Arduino output ON, opto output short base T1 so T1 OFF, so T2 OFF.
So arduino 10% pwm = T2 PWM 90%
" " 50% 50%
90% 10%
mmcp42:
would this work?
I added an N channel MOSFET to force the output low
dammit I will be obeyed!
(or is it just another way to fry MOSFETs?)
Its completely unnecessary to add a second MOSFET.
Here's what to do with the previous circuit:
1 As people said remove the pull-up on the transistor base,
2 as people said add a 1k resistor in line with the base to the
Arduino pin to limit current (essential).
3 Change R10 to 1k so switching is faster. - you tried this already,
its a good idea to reduce switching losses
4 Replace the backwards diode across the LED load with a
1k resistor. Diodes are needed only for inductive loads, not LEDs.
The 1k will carry away any leakage current from the MOSFET
when off.
If you want you can introduce an opto coupler too, in which case it replaces the BC847 - the output of an opto coupler is a photo-transistor.
Mark
thanks tried all that
even with a 47 ohm (yup!) across the LEDs the turn off is still way too slow
we're not dealing with MOSFET leakage here, the load just turns OFF too slowly
that's why I thought of another MOSFET to force it off?
Seems like what you said earlier that the led array is the cause of the LEDs turning off slowly.
If using a resistor in place of the array gives a "perfect square wave", then some changes need to be made in the array circuitry for a quicker shut off.
Have a link to the LED array you are using?
mmcp42:
Mark
thanks tried all that
even with a 47 ohm (yup!) across the LEDs the turn off is still way too slow
we're not dealing with MOSFET leakage here, the load just turns OFF too slowly
that's why I thought of another MOSFET to force it off?
Oh, that's easy, drive the MOSFET gate with a MIC4422. Get 100ns turn-off no problem.
Hi, its seems weird that the LED's are slow to turn OFF. Can you post a copy of your complete sketch to show us how you are programming the arduino?
Please use code # tags to format it for the posting.
You said that you aren't just driving LEDs, but that they include driver circuits. Those will include bypass and smoothing capacitors. That is likely the reason for the slow turn-off.
no link but it is a commercial fish tank luminaire
a quick eyeball (surprising really - it has a glass cover
aside from the LEDs I can see a couple of passives for each, a diode across the voltage in, and a couple of chips labelled
C11
J112G
and an Omicron logo
at one of the earlier poster (scrolled off screen now)
I don't think the FET turning OFF is the issue, it's the LED array refusing to lie down when told
using quite a low resistor, the waveform is perfectly sharp
@Tom
the complete sketch is HUGE as it's only one corner of the project
the bit that's relevant is that the driving signal is a PWM signal from pin 5, to an optocoupler, thence to the circuitry