Precharging a transistor gate for faster trigger response (fade on/off circuit)

Thread Starter

Jordan Gray

Joined Sep 22, 2018
1
The circuit is a LED night light; triggered by a PIR motion sensor; just enough light to keep from stumbling in the dark.

[TL;DR_the value of R2 is required in order to make a 100uF capacitor work, but there is now a ~1.5 sec delay before forward voltage of the LED is met and fade-in begins. A larger capacitor is too bulky for the project; R4 was later added to mitigate the delay.]

Is R4 the right way to pre-charge a transistor gate?
led-fade (1).png
Besides running out of 1M-ohm resistors, R4 seems wasteful, especially if this was driven with a battery. Is this a circumstance for a voltage comparator to be used? This began by forcing a 100uF cap to perform as desired by changing resistor values, and it has revealed new challenges.

To the peanut gallery: I'm not looking to install a boat anchor, please do not comment on the glories of larger value capacitors. The focus is manipulating a transistor gate correctly or a better way to go about it. The transistor may not be necessary for this design, but this is a proof of concept and what is learned will be used for larger scale designs. If anything, I'd try to make an even smaller capacitor perform the same task.

I didn't realize on the breadboard how much of a difference 1.5 seconds makes; the time it takes to achieve the LED's forward voltage due to R2's value. In practice, when walking into a dark room, it's a lifetime. I may have oversized R3 (somewhere I read (R2 x 7 = R3)); but the capacitor cannot be increased for size constraints.

I added R4 to keep the gate "precharged" to mitigate the delay-on time, I believe I've seen this done similarly, but I don't remember exactly how. 13M Ohms is arbitrary; I started with 9M and kept adding to hunt for the right gate voltage; just added two more and it's holding at 340-350mV on the gate; LED seems to light just above that, but I don't know how to test for certain besides visually.

I've seen tons of posts on the LED fade subject, like most all forums, threads get swamped with unhelpful responses. I searched for "precharging transistor gate" and found nothing, so I posted this. To me, it is a different topic.
 
Last edited by a moderator:

DickCappels

Joined Aug 21, 2008
6,381
Listen to cruschow. In addition, why do you feel the need to filter the output of the pyroelectric sensor at all? Those things tend to be pretty slow.

Your use of R4 should be adequate for biasing the signal to the base up a little.
 

ebp

Joined Feb 8, 2018
2,332
The arrangement is wrong.

The capacitor should be charged directly from the output of the detector, using a resistor just high enough in value to limit the current to what the detector output can handle. The base of the transistor should connect to the capacitor through a resistor suitable for the base current required. Look at the gain spec for the transistor to determine this. DO NOT use the silly rule of thumb of setting the base current to 10% of the collector current (this value comes from the way saturation voltage is specified and is nonsensical to actually use for many applications - there is no point using a transistor with a gain of 200 if you treat it like it has a gain of 20).

With the cap where it is the voltage across it is clamped to the base emitter voltage of the transistor, so it is is prevented from charging sufficiently to keep the transistor on for more than a very brief time.

D1 may not be required - it depends on the output circuit of the detector. It also limits the peak voltage to which the cap can be charged. [EDIT:] If you do need D1 and use a 1N400x series, you don't need R3. The reverse leakage current of a 1N400x will be much greater than the collector-base leakage current of the transistor, which is the only reason for using R3.
 
Last edited:

crutschow

Joined Mar 14, 2008
24,938
there is no point using a transistor with a gain of 200 if you treat it like it has a gain of 20).
There is if you want the transistor to fully saturate when on.
If you look at a data sheet you will see that the gain is specified with several volts on the collector.
I would not use higher than a gain of 20 if you are using the transistor as a switch.
 
Last edited:

crutschow

Joined Mar 14, 2008
24,938
If you want a fade on/off then you should add a resistor in series from the transistor emitter to ground.
That will avoid the abrupt on/off of the transistor and make the LED current more proportional to the base voltage.
 

ebp

Joined Feb 8, 2018
2,332
There is if you want the transistor to fully saturate when on.
If you look at a data sheet you will see that the gain is specified with several volts on the collector.
I would not use higher than a gain of 20 if you are using the transistor as a switch.
But the need to have the transistor saturated in this case is non-existent. It needs to be ON-ish to some reasonable degree.
 

ebp

Joined Feb 8, 2018
2,332
I'm assuming that the requirement here is to keep the LED turned on after the output of the detector goes low, rather than to slow the turn-on, since the objection to the existing circuit is the delay.

Circuits that use the IC in eric's link at #6 usually have an adjustable stay-on time built in, but I'm also assuming that isn't available on the module in question.

I may be wrong on both assumptions.
 
Top